本文整理汇总了Python中FaultCohesive.FaultCohesive.preinitialize方法的典型用法代码示例。如果您正苦于以下问题:Python FaultCohesive.preinitialize方法的具体用法?Python FaultCohesive.preinitialize怎么用?Python FaultCohesive.preinitialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FaultCohesive.FaultCohesive
的用法示例。
在下文中一共展示了FaultCohesive.preinitialize方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: preinitialize
# 需要导入模块: from FaultCohesive import FaultCohesive [as 别名]
# 或者: from FaultCohesive.FaultCohesive 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
示例2: preinitialize
# 需要导入模块: from FaultCohesive import FaultCohesive [as 别名]
# 或者: from FaultCohesive.FaultCohesive 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
示例3: preinitialize
# 需要导入模块: from FaultCohesive import FaultCohesive [as 别名]
# 或者: from FaultCohesive.FaultCohesive 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
示例4: preinitialize
# 需要导入模块: from FaultCohesive import FaultCohesive [as 别名]
# 或者: from FaultCohesive.FaultCohesive 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