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
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
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
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
def _createModuleObj(self): """ Create handle to C++ FaultCohesiveKin. """ ModuleFaultCohesiveKin.__init__(self) return