Esempio n. 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)

    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
    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
 def getCellField(self, name, fields=None):
     """
 Get cell field.
 """
     if None == fields:
         field = ModuleFaultCohesiveDyn.cellField(self, name)
     else:
         field = ModuleFaultCohesiveDyn.cellField(self, name, fields)
     return field
 def getVertexField(self, name, fields=None):
     """
 Get vertex field.
 """
     if None == fields:
         field = ModuleFaultCohesiveDyn.vertexField(self, name)
     else:
         field = ModuleFaultCohesiveDyn.vertexField(self, name, fields)
     return field
Esempio n. 5
0
 def getCellField(self, name, fields=None):
   """
   Get cell field.
   """
   if None == fields:
     field = ModuleFaultCohesiveDyn.cellField(self, name)
   else:
     field = ModuleFaultCohesiveDyn.cellField(self, name, fields)
   return field
Esempio n. 6
0
 def getVertexField(self, name, fields=None):
   """
   Get vertex field.
   """
   if None == fields:
     field = ModuleFaultCohesiveDyn.vertexField(self, name)
   else:
     field = ModuleFaultCohesiveDyn.vertexField(self, name, fields)
   return field
    def verifyConfiguration(self):
        """
    Verify compatibility of configuration.
    """
        logEvent = "%sverify" % self._loggingPrefix
        self._eventLogger.eventBegin(logEvent)

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

        self._eventLogger.eventEnd(logEvent)
        return
Esempio n. 8
0
  def verifyConfiguration(self):
    """
    Verify compatibility of configuration.
    """
    logEvent = "%sverify" % self._loggingPrefix
    self._eventLogger.eventBegin(logEvent)

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

    self._eventLogger.eventEnd(logEvent)
    return
Esempio n. 9
0
 def _configure(self):
   """
   Setup members using inventory.
   """
   FaultCohesive._configure(self)
   if not isinstance(self.inventory.tract, NullComponent):
     ModuleFaultCohesiveDyn.tractPerturbation(self, self.inventory.tract)
   ModuleFaultCohesiveDyn.frictionModel(self, self.inventory.friction)
   ModuleFaultCohesiveDyn.zeroTolerance(self, self.inventory.zeroTolerance)
   ModuleFaultCohesiveDyn.zeroToleranceNormal(self, self.inventory.zeroToleranceNormal)
   ModuleFaultCohesiveDyn.openFreeSurf(self, self.inventory.openFreeSurf)
   self.output = self.inventory.output
   return
Esempio n. 10
0
 def _createModuleObj(self):
     """
 Create handle to C++ FaultCohesiveDyn.
 """
     ModuleFaultCohesiveDyn.__init__(self)
     return
Esempio n. 11
0
 def _createModuleObj(self):
   """
   Create handle to C++ FaultCohesiveDyn.
   """
   ModuleFaultCohesiveDyn.__init__(self)
   return