Пример #1
0
  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
0
    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
0
 def getCellField(self, name, fields=None):
   """
   Get cell field.
   """
   if None == fields:
     field = ModuleFaultCohesiveKin.cellField(self, name)
   else:
     field = ModuleFaultCohesiveKin.cellField(self, name, fields)
   return field
Пример #4
0
 def getVertexField(self, name, fields=None):
   """
   Get vertex field.
   """
   if None == fields:
     field = ModuleFaultCohesiveKin.vertexField(self, name)
   else:
     field = ModuleFaultCohesiveKin.vertexField(self, name, fields)
   return field
Пример #5
0
 def getCellField(self, name, fields=None):
     """
 Get cell field.
 """
     if None == fields:
         field = ModuleFaultCohesiveKin.cellField(self, name)
     else:
         field = ModuleFaultCohesiveKin.cellField(self, name, fields)
     return field
Пример #6
0
 def getVertexField(self, name, fields=None):
     """
 Get vertex field.
 """
     if None == fields:
         field = ModuleFaultCohesiveKin.vertexField(self, name)
     else:
         field = ModuleFaultCohesiveKin.vertexField(self, name, fields)
     return field
Пример #7
0
  def verifyConfiguration(self):
    """
    Verify compatibility of configuration.
    """
    logEvent = "%sverify" % self._loggingPrefix
    self._eventLogger.eventBegin(logEvent)

    FaultCohesive.verifyConfiguration(self)
    Integrator.verifyConfiguration(self)
    ModuleFaultCohesiveKin.verifyConfiguration(self, self.mesh())

    for eqsrc in self.eqsrcs.components():
      eqsrc.verifyConfiguration()
    
    self._eventLogger.eventEnd(logEvent)
    return
Пример #8
0
    def verifyConfiguration(self):
        """
    Verify compatibility of configuration.
    """
        logEvent = "%sverify" % self._loggingPrefix
        self._eventLogger.eventBegin(logEvent)

        FaultCohesive.verifyConfiguration(self)
        Integrator.verifyConfiguration(self)
        ModuleFaultCohesiveKin.verifyConfiguration(self, self.mesh())

        for eqsrc in self.eqsrcs.components():
            eqsrc.verifyConfiguration()

        self._eventLogger.eventEnd(logEvent)
        return
Пример #9
0
 def _createModuleObj(self):
   """
   Create handle to C++ FaultCohesiveKin.
   """
   ModuleFaultCohesiveKin.__init__(self)
   return
Пример #10
0
 def _createModuleObj(self):
     """
 Create handle to C++ FaultCohesiveKin.
 """
     ModuleFaultCohesiveKin.__init__(self)
     return