本文整理匯總了Python中pylith.utils.PetscManager.PetscManager.options方法的典型用法代碼示例。如果您正苦於以下問題:Python PetscManager.options方法的具體用法?Python PetscManager.options怎麽用?Python PetscManager.options使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pylith.utils.PetscManager.PetscManager
的用法示例。
在下文中一共展示了PetscManager.options方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_initfinal
# 需要導入模塊: from pylith.utils.PetscManager import PetscManager [as 別名]
# 或者: from pylith.utils.PetscManager.PetscManager import options [as 別名]
def test_initfinal(self):
"""
Test initialize/finalize.
"""
from pylith.utils.PetscManager import PetscManager
from pylith.utils.petsc import optionsSetValue
manager = PetscManager()
manager.options = [("vec_type", "seq")]
manager.initialize()
manager.finalize()
return
示例2: main
# 需要導入模塊: from pylith.utils.PetscManager import PetscManager [as 別名]
# 或者: from pylith.utils.PetscManager.PetscManager import options [as 別名]
def main(self):
"""
Run the application.
"""
from pylith.utils.PetscManager import PetscManager
petsc = PetscManager()
petsc.options = [("malloc_dump", "true")]
petsc.initialize()
unittest.TextTestRunner(verbosity=2).run(self._suite())
petsc.finalize()
return
示例3: main
# 需要導入模塊: from pylith.utils.PetscManager import PetscManager [as 別名]
# 或者: from pylith.utils.PetscManager.PetscManager import options [as 別名]
def main(self):
"""
Run the application.
"""
from pylith.utils.PetscManager import PetscManager
petsc = PetscManager()
petsc.options = self.petscOptions
petsc.initialize()
success = unittest.TextTestRunner(verbosity=2).run(self._suite()).wasSuccessful()
petsc.finalize()
if not success:
import sys
sys.exit(1)
return