本文整理匯總了Python中pylith.utils.PetscManager.PetscManager類的典型用法代碼示例。如果您正苦於以下問題:Python PetscManager類的具體用法?Python PetscManager怎麽用?Python PetscManager使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了PetscManager類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: main
def main(self):
"""
Run the application.
"""
from pylith.utils.PetscManager import PetscManager
manager = PetscManager()
manager.initialize()
unittest.TextTestRunner(verbosity=2).run(self._suite())
manager.finalize()
return
示例2: main
def main(self, *args, **kwds):
"""
Run the application.
"""
from pylith.utils.PetscManager import PetscManager
manager = PetscManager()
manager.initialize()
self._runTest()
manager.finalize()
return
示例3: test_initfinal
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
示例4: main
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
示例5: main
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