本文整理汇总了Python中output.Output方法的典型用法代码示例。如果您正苦于以下问题:Python output.Output方法的具体用法?Python output.Output怎么用?Python output.Output使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类output
的用法示例。
在下文中一共展示了output.Output方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import output [as 别名]
# 或者: from output import Output [as 别名]
def __init__(self, vis, dt, writecsv):
if vis == "mpl":
import visualizer.visMatplotlib
self.visualizer = visualizer.visMatplotlib.VisMatplotlib()
elif vis == "vispy":
import visualizer.visVispy
self.visualizer = visualizer.visVispy.VisVispy()
else:
raise Exception("Unknown visualization backend: {}".format(vis))
self.t = 0.0
self.dt = dt
self.crazyflies = []
if writecsv:
import output
self.output = output.Output()
else:
self.output = None
示例2: __init__
# 需要导入模块: import output [as 别名]
# 或者: from output import Output [as 别名]
def __init__(self,param,grid):
self.list_param=['modelname','tend','fixed_dt','dt','cfl',
'plot_var','cax','colorscheme',
'plot_interactive','fixed_dt','dtmax',
'freq_save','freq_plot']
param.copy(self,self.list_param)
self.list_grid=['dx','nh','msk']
grid.copy(self,self.list_grid)
if param.modelname=='euler':
from euler import Euler
self.model = Euler(param,grid)
if param.modelname=='advection':
from advection import Advection
self.model = Advection(param,grid)
if param.modelname=='boussinesq':
from boussinesq import Boussinesq
self.model = Boussinesq(param,grid)
if param.modelname=='quasigeostrophic':
from quasigeostrophic import QG
self.model = QG(param,grid)
self.diag = Diag(param,grid)
self.plotting = Plotting(param)
# here's a shortcut to the model state
self.state = self.model.var.state
self.t = 0.
self.kt = 0
self.output=Output(param,grid,self.diag)