本文整理汇总了Python中RunApp.RunApp.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python RunApp.__init__方法的具体用法?Python RunApp.__init__怎么用?Python RunApp.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RunApp.RunApp
的用法示例。
在下文中一共展示了RunApp.__init__方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from RunApp import RunApp [as 别名]
# 或者: from RunApp.RunApp import __init__ [as 别名]
def __init__(self, name, params):
RunApp.__init__(self, name, params)
self.moose_dir = os.environ.get('MOOSE_DIR',
os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)),
'..')))
if os.environ.has_key("LIBMESH_DIR"):
self.libmesh_dir = os.environ['LIBMESH_DIR']
else:
self.libmesh_dir = os.path.join(self.moose_dir, 'libmesh', 'installed')
if util.getPetscVersion(self.libmesh_dir) < '3.9':
self.specs['cli_args'].append('-snes_type test')
else:
self.specs['cli_args'].extend(['-snes_test_jacobian', '-snes_force_iteration'])
if not self.specs['run_sim']:
self.specs['cli_args'].extend(['-snes_type', 'ksponly',
'-ksp_type', 'preonly', '-pc_type', 'none', '-snes_convergence_test', 'skip'])
示例2: __init__
# 需要导入模块: from RunApp import RunApp [as 别名]
# 或者: from RunApp.RunApp import __init__ [as 别名]
def __init__(self, name, params):
RunApp.__init__(self, name, params)
示例3: __init__
# 需要导入模块: from RunApp import RunApp [as 别名]
# 或者: from RunApp.RunApp import __init__ [as 别名]
def __init__(self, name, params):
RunApp.__init__(self, name, params)
self.specs['cli_args'].append('-snes_type test')
示例4: __init__
# 需要导入模块: from RunApp import RunApp [as 别名]
# 或者: from RunApp.RunApp import __init__ [as 别名]
def __init__(self, name, params):
RunApp.__init__(self, name, params)
if (params.isValid("expect_err") == False and params.isValid("expect_assert") == False):
raise RuntimeError('Either "expect_err" or "expect_assert" must be supplied in RunException')
示例5: __init__
# 需要导入模块: from RunApp import RunApp [as 别名]
# 或者: from RunApp.RunApp import __init__ [as 别名]
def __init__(self, name=None, params=None):
RunApp.__init__(self, name, params)
if params is not None:
self.nPosts = self.getParam('nPosts')
self.port = int(self.getParam('port'))