本文整理汇总了Python中pylith.feassemble.Integrator.Integrator.preinitialize方法的典型用法代码示例。如果您正苦于以下问题:Python Integrator.preinitialize方法的具体用法?Python Integrator.preinitialize怎么用?Python Integrator.preinitialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pylith.feassemble.Integrator.Integrator
的用法示例。
在下文中一共展示了Integrator.preinitialize方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: preinitialize
# 需要导入模块: from pylith.feassemble.Integrator import Integrator [as 别名]
# 或者: from pylith.feassemble.Integrator.Integrator import preinitialize [as 别名]
def preinitialize(self, mesh):
"""
Do pre-initialization setup.
"""
BoundaryCondition.preinitialize(self, mesh)
Integrator.preinitialize(self, mesh)
return
示例2: preinitialize
# 需要导入模块: from pylith.feassemble.Integrator import Integrator [as 别名]
# 或者: from pylith.feassemble.Integrator.Integrator import preinitialize [as 别名]
def preinitialize(self, mesh):
"""
Do pre-initialization setup.
"""
from pylith.mpi.Communicator import mpi_comm_world
comm = mpi_comm_world()
if 0 == comm.rank:
self._info.log("Pre-initializing fault '%s'." % self.label())
FaultCohesive.preinitialize(self, mesh)
Integrator.preinitialize(self, mesh)
ModuleFaultCohesiveKin.quadrature(self, self.faultQuadrature)
for eqsrc in self.eqsrcs.components():
eqsrc.preinitialize()
ModuleFaultCohesiveKin.eqsrcs(self, self.eqsrcs.inventory.facilityNames(),
self.eqsrcs.components())
for name in self.eqsrcs.inventory.facilityNames():
self.availableFields['vertex']['info'] += ["final_slip_%s" % name]
self.availableFields['vertex']['info'] += ["slip_time_%s" % name]
if mesh.dimension() == 2:
self.availableFields['vertex']['info'] += ["strike_dir"]
elif mesh.dimension() == 3:
self.availableFields['vertex']['info'] += ["strike_dir",
"dip_dir"]
return
示例3: preinitialize
# 需要导入模块: from pylith.feassemble.Integrator import Integrator [as 别名]
# 或者: from pylith.feassemble.Integrator.Integrator import preinitialize [as 别名]
def preinitialize(self, mesh):
"""
Do pre-initialization setup.
"""
from pylith.mpi.Communicator import mpi_comm_world
comm = mpi_comm_world()
if 0 == comm.rank:
self._info.log("Pre-initializing fault '%s'." % self.label())
FaultCohesive.preinitialize(self, mesh)
Integrator.preinitialize(self, mesh)
ModuleFaultCohesiveDyn.quadrature(self, self.faultQuadrature)
if mesh.dimension() == 2:
self.availableFields['vertex']['info'] += ["strike_dir"]
elif mesh.dimension() == 3:
self.availableFields['vertex']['info'] += ["strike_dir",
"dip_dir"]
if not isinstance(self.tract, NullComponent):
self.tract.preinitialize(mesh)
self.availableFields['vertex']['info'] += self.tract.availableFields['vertex']['info']
self.availableFields['vertex']['info'] += \
self.friction.availableFields['vertex']['info']
self.availableFields['vertex']['data'] += \
self.friction.availableFields['vertex']['data']
return
示例4: preinitialize
# 需要导入模块: from pylith.feassemble.Integrator import Integrator [as 别名]
# 或者: from pylith.feassemble.Integrator.Integrator import preinitialize [as 别名]
def preinitialize(self, mesh):
"""
Do pre-initialization setup.
"""
BoundaryCondition.preinitialize(self, mesh)
Integrator.preinitialize(self, mesh)
self.bcQuadrature.preinitialize(mesh.coordsys().spaceDim())
self.quadrature(self.bcQuadrature)
self.createSubMesh(mesh)
return
示例5: preinitialize
# 需要导入模块: from pylith.feassemble.Integrator import Integrator [as 别名]
# 或者: from pylith.feassemble.Integrator.Integrator import preinitialize [as 别名]
def preinitialize(self, mesh):
"""
Do pre-initialization setup.
"""
self._info.log("Pre-initializing fault '%s'." % self.label())
FaultCohesive.preinitialize(self, mesh)
Integrator.preinitialize(self, mesh)
ModuleFaultCohesiveTract.quadrature(self, self.faultQuadrature)
if mesh.dimension() == 2:
self.availableFields['cell']['info'] += ["strike_dir"]
elif mesh.dimension() == 3:
self.availableFields['cell']['info'] += ["strike_dir",
"dip_dir"]
return
示例6: preinitialize
# 需要导入模块: from pylith.feassemble.Integrator import Integrator [as 别名]
# 或者: from pylith.feassemble.Integrator.Integrator import preinitialize [as 别名]
def preinitialize(self, mesh):
"""
Do pre-initialization setup.
"""
BoundaryCondition.preinitialize(self, mesh)
Integrator.preinitialize(self, mesh)
self.bcQuadrature.preinitialize(mesh.coordsys().spaceDim())
self.quadrature(self.bcQuadrature)
self.createSubMesh(mesh)
self.output.preinitialize(self)
fields = []
if not isinstance(self.inventory.dbInitial, NullComponent):
fields += ["initial_value"]
if not isinstance(self.inventory.dbRate, NullComponent):
fields += ["rate_of_change", "rate_start_time"]
if not isinstance(self.inventory.dbChange, NullComponent):
fields += ["change_in_value", "change_start_time"]
self.availableFields['cell']['info'] += fields
return
示例7: preinitialize
# 需要导入模块: from pylith.feassemble.Integrator import Integrator [as 别名]
# 或者: from pylith.feassemble.Integrator.Integrator import preinitialize [as 别名]
def preinitialize(self, mesh):
"""
Do pre-initialization setup.
"""
from pylith.mpi.Communicator import mpi_comm_world
comm = mpi_comm_world()
if 0 == comm.rank:
self._info.log("Pre-initializing fault '%s'." % self.label())
FaultCohesive.preinitialize(self, mesh)
Integrator.preinitialize(self, mesh)
ModuleFaultCohesiveImpulses.quadrature(self, self.faultQuadrature)
if mesh.dimension() == 2:
self.availableFields['vertex']['info'] += ["strike_dir"]
elif mesh.dimension() == 3:
self.availableFields['vertex']['info'] += ["strike_dir",
"dip_dir"]
return