当前位置: 首页>>代码示例>>Python>>正文


Python FaultCohesive.preinitialize方法代码示例

本文整理汇总了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
开发者ID:rishabhdutta,项目名称:pylith,代码行数:31,代码来源:FaultCohesiveKin.py

示例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
开发者ID:jjle,项目名称:pylith,代码行数:31,代码来源:FaultCohesiveDyn.py

示例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
开发者ID:jjle,项目名称:pylith,代码行数:19,代码来源:FaultCohesiveTract.py

示例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
开发者ID:youngsolar,项目名称:pylith,代码行数:22,代码来源:FaultCohesiveImpulses.py


注:本文中的FaultCohesive.FaultCohesive.preinitialize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。