本文整理汇总了Python中anuga.Domain.get_timestep方法的典型用法代码示例。如果您正苦于以下问题:Python Domain.get_timestep方法的具体用法?Python Domain.get_timestep怎么用?Python Domain.get_timestep使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类anuga.Domain
的用法示例。
在下文中一共展示了Domain.get_timestep方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_create_operator
# 需要导入模块: from anuga import Domain [as 别名]
# 或者: from anuga.Domain import get_timestep [as 别名]
def test_create_operator(self):
points = num.array([[0.0,0.0],[1.0,0.0],[0.0,1.0]])
elements = num.array([[0,1,2]])
boundary_map = {}
boundary_map[(0,0)] = 'edge0'
boundary_map[(0,1)] = 'edge1'
boundary_map[(0,2)] = 'edge2'
domain = Domain(points, elements, boundary_map)
operator = Operator(domain)
message = operator.statistics()
assert message == 'You need to implement operator statistics for your operator'
message = operator.timestepping_statistics()
assert message == 'You need to implement timestepping statistics for your operator'
domain.timestep = 3.0
assert operator.get_timestep() == domain.get_timestep()
try:
operator()
except:
pass
else:
raise Exception('should have raised an exception')