本文整理匯總了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)