本文整理汇总了Python中anuga.Domain.timestepping_statistics方法的典型用法代码示例。如果您正苦于以下问题:Python Domain.timestepping_statistics方法的具体用法?Python Domain.timestepping_statistics怎么用?Python Domain.timestepping_statistics使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类anuga.Domain
的用法示例。
在下文中一共展示了Domain.timestepping_statistics方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: RealtimeVisualiser
# 需要导入模块: from anuga import Domain [as 别名]
# 或者: from anuga.Domain import timestepping_statistics [as 别名]
vtk_visualiser = True
if vtk_visualiser:
from anuga.visualiser import RealtimeVisualiser
vis = RealtimeVisualiser(domain)
vis.render_quantity_height("height",dynamic=True)
#vis.render_quantity_height("stage", zScale =1.0, dynamic=True)
vis.colour_height_quantity('stage', (0.0, 0.0, 1.0))
vis.start()
#===============================================================================
#------------------------------------------------------------------------------
# Evolve system through time
#------------------------------------------------------------------------------
i = 0
for t in domain.evolve(yieldstep = 0.01, finaltime = 0.25):
#print domain.timestepping_statistics(track_speeds=True)
print domain.timestepping_statistics()
if vtk_visualiser:
vis.update()
fileName = 'stage_%03d' % i + '.vtk'
i = i+1
vis.store_height_quantity('height',fileName)
#test against know data
if vtk_visualiser: vis.evolveFinished()
示例2: pprint
# 需要导入模块: from anuga import Domain [as 别名]
# 或者: from anuga.Domain import timestepping_statistics [as 别名]
#------------------------------------------------------------------------------
# Produce a documentation of parameters
#------------------------------------------------------------------------------
if myid == 0:
parameter_file=open('parameters.tex', 'w')
parameter_file.write('\\begin{verbatim}\n')
from pprint import pprint
pprint(domain.get_algorithm_parameters(),parameter_file,indent=4)
parameter_file.write('\\end{verbatim}\n')
parameter_file.close()
#------------------------------------------------------------------------------
# Evolve system through time
#------------------------------------------------------------------------------
for t in domain.evolve(yieldstep = 0.1, finaltime = 5.):
#print domain.timestepping_statistics(track_speeds=True)
if myid == 0: print domain.timestepping_statistics()
domain.sww_merge(delete_old=True)
finalize()
#
示例3: pprint
# 需要导入模块: from anuga import Domain [as 别名]
# 或者: from anuga.Domain import timestepping_statistics [as 别名]
# Associate boundary tags with boundary objects
domain.set_boundary({'left': Bd, 'right': Bd, 'top': Br, 'bottom': Br})
#------------------------------------------------------------------------------
# Produce a documentation of parameters
#------------------------------------------------------------------------------
if myid == 0:
parameter_file=open('parameters.tex', 'w')
parameter_file.write('\\begin{verbatim}\n')
from pprint import pprint
pprint(domain.get_algorithm_parameters(),parameter_file,indent=4)
parameter_file.write('\\end{verbatim}\n')
parameter_file.close()
#------------------------------------------------------------------------------
# Evolve system through time
#------------------------------------------------------------------------------
for t in domain.evolve(yieldstep = 1.0, finaltime = 20.):
#print domain.timestepping_statistics(track_speeds=True)
if myid == 0 and verbose: print domain.timestepping_statistics()
domain.sww_merge(delete_old=True)
finalize()