Example #1
0
 def _configure(self):
   """
   Setup members using inventory.
   """
   BoundaryCondition._configure(self)
   TimeDependentPoints._configure(self)
   return
Example #2
0
 def finalize(self):
     """
 Cleanup.
 """
     BoundaryCondition.finalize(self)
     Constraint.finalize(self)
     return
Example #3
0
 def preinitialize(self, mesh):
   """
   Do pre-initialization setup.
   """
   BoundaryCondition.preinitialize(self, mesh)
   Constraint.preinitialize(self, mesh)
   return
Example #4
0
 def _configure(self):
     """
 Setup members using inventory.
 """
     BoundaryCondition._configure(self)
     TimeDependentPoints._configure(self)
     return
Example #5
0
 def preinitialize(self, mesh):
   """
   Do pre-initialization setup.
   """
   BoundaryCondition.preinitialize(self, mesh)
   Integrator.preinitialize(self, mesh)
   return
Example #6
0
 def finalize(self):
   """
   Cleanup.
   """
   BoundaryCondition.finalize(self)
   Constraint.finalize(self)
   return
Example #7
0
 def preinitialize(self, mesh):
     """
 Do pre-initialization setup.
 """
     BoundaryCondition.preinitialize(self, mesh)
     Constraint.preinitialize(self, mesh)
     return
Example #8
0
 def preinitialize(self, mesh):
     """
 Do pre-initialization setup.
 """
     BoundaryCondition.preinitialize(self, mesh)
     Integrator.preinitialize(self, mesh)
     return
Example #9
0
 def finalize(self):
   """
   Cleanup.
   """
   BoundaryCondition.finalize(self)
   Integrator.finalize(self)
   self._modelMemoryUse()
   return
Example #10
0
 def _configure(self):
     """
 Setup members using inventory.
 """
     BoundaryCondition._configure(self)
     self.bcQuadrature = self.inventory.quadrature
     ModuleAbsorbingDampers.db(self, self.inventory.db)
     return
Example #11
0
 def __init__(self, name="pointforce"):
   """
   Constructor.
   """
   BoundaryCondition.__init__(self, name)
   Integrator.__init__(self)
   self._loggingPrefix = "PFBC "
   return
Example #12
0
 def __init__(self, name="dirichletbc"):
   """
   Constructor.
   """
   BoundaryCondition.__init__(self, name)
   Constraint.__init__(self)
   self._loggingPrefix = "DiBC "
   return
Example #13
0
 def __init__(self, name="pointforce"):
     """
 Constructor.
 """
     BoundaryCondition.__init__(self, name)
     Integrator.__init__(self)
     self._loggingPrefix = "PFBC "
     return
Example #14
0
 def _configure(self):
   """
   Setup members using inventory.
   """
   BoundaryCondition._configure(self)
   self.bcQuadrature = self.inventory.quadrature
   ModuleAbsorbingDampers.db(self, self.inventory.db)
   return
Example #15
0
 def finalize(self):
     """
 Cleanup.
 """
     BoundaryCondition.finalize(self)
     Integrator.finalize(self)
     self._modelMemoryUse()
     return
Example #16
0
 def __init__(self, name="absorbingdampers"):
   """
   Constructor.
   """
   BoundaryCondition.__init__(self, name)
   Integrator.__init__(self)
   self._loggingPrefix = "AbBC "
   return
Example #17
0
 def __init__(self, name="dirichletbc"):
     """
 Constructor.
 """
     BoundaryCondition.__init__(self, name)
     Constraint.__init__(self)
     self._loggingPrefix = "DiBC "
     return
Example #18
0
 def __init__(self, name="absorbingdampers"):
     """
 Constructor.
 """
     BoundaryCondition.__init__(self, name)
     Integrator.__init__(self)
     self._loggingPrefix = "AbBC "
     return
Example #19
0
 def _configure(self):
   """
   Setup members using inventory.
   """
   BoundaryCondition._configure(self)
   TimeDependent._configure(self)
   self.bcQuadrature = self.inventory.bcQuadrature
   self.output = self.inventory.output
   return
Example #20
0
 def _configure(self):
   """
   Setup members using inventory.
   """
   BoundaryCondition._configure(self)
   TimeDependent._configure(self)
   self.bcQuadrature = self.inventory.bcQuadrature
   self.output = self.inventory.output
   return
Example #21
0
 def preinitialize(self, mesh):
   """
   Do pre-initialization setup.
   """
   BoundaryCondition.preinitialize(self, mesh)
   Integrator.preinitialize(self, mesh)
   self.bcQuadrature.preinitialize(mesh.coordsys().spaceDim())
   self.quadrature(self.bcQuadrature)
   self.createSubMesh(mesh)
   return
Example #22
0
 def preinitialize(self, mesh):
     """
 Do pre-initialization setup.
 """
     BoundaryCondition.preinitialize(self, mesh)
     Integrator.preinitialize(self, mesh)
     self.bcQuadrature.preinitialize(mesh.coordsys().spaceDim())
     self.quadrature(self.bcQuadrature)
     self.createSubMesh(mesh)
     return
Example #23
0
    def verifyConfiguration(self):
        """
    Verify compatibility of configuration.
    """
        logEvent = "%sverify" % self._loggingPrefix
        self._eventLogger.eventBegin(logEvent)

        BoundaryCondition.verifyConfiguration(self, self.mesh())

        self._eventLogger.eventEnd(logEvent)
        return
Example #24
0
 def _configure(self):
   """
   Setup members using inventory.
   """
   try:
     BoundaryCondition._configure(self)
     TimeDependentPoints._configure(self)
   except ValueError, err:
     aliases = ", ".join(self.aliases)
     raise ValueError("Error while configuring Dirichlet boundary condition "
                      "(%s):\n%s" % (aliases, err.message))
Example #25
0
  def verifyConfiguration(self):
    """
    Verify compatibility of configuration.
    """
    logEvent = "%sverify" % self._loggingPrefix
    self._eventLogger.eventBegin(logEvent)

    BoundaryCondition.verifyConfiguration(self, self.mesh())

    self._eventLogger.eventEnd(logEvent)
    return
Example #26
0
 def _configure(self):
     """
 Setup members using inventory.
 """
     try:
         BoundaryCondition._configure(self)
         TimeDependentPoints._configure(self)
     except ValueError, err:
         aliases = ", ".join(self.aliases)
         raise ValueError(
             "Error while configuring Dirichlet boundary condition "
             "(%s):\n%s" % (aliases, err.message))
Example #27
0
  def verifyConfiguration(self):
    """
    Verify compatibility of configuration.
    """
    logEvent = "%sverify" % self._loggingPrefix
    self._eventLogger.eventBegin(logEvent)

    BoundaryCondition.verifyConfiguration(self, self.mesh())
    spaceDim = self.mesh().coordsys().spaceDim()
    for d in self.bcDOF:
      if d < 0 or d >= spaceDim:
        raise ValueError("Attempting to constrain DOF (%d) that doesn't exist. Space dimension is %d." % \
                         (d, spaceDim))

    self._eventLogger.eventEnd(logEvent)
    return
Example #28
0
 def __init__(self, name="neumann"):
   """
   Constructor.
   """
   BoundaryCondition.__init__(self, name)
   Integrator.__init__(self)
   TimeDependent.__init__(self)
   self._loggingPrefix = "NeBC "
   self.availableFields = \
       {'vertex': \
          {'info': [],
           'data': []},
        'cell': \
          {'info': [],
           'data': []}}
   return
Example #29
0
 def __init__(self, name="neumann"):
   """
   Constructor.
   """
   BoundaryCondition.__init__(self, name)
   Integrator.__init__(self)
   TimeDependent.__init__(self)
   self._loggingPrefix = "NeBC "
   self.availableFields = \
       {'vertex': \
          {'info': [],
           'data': []},
        'cell': \
          {'info': [],
           'data': []}}
   return
Example #30
0
    def verifyConfiguration(self):
        """
    Verify compatibility of configuration.
    """
        logEvent = "%sverify" % self._loggingPrefix
        self._eventLogger.eventBegin(logEvent)

        BoundaryCondition.verifyConfiguration(self, self.mesh())
        spaceDim = self.mesh().coordsys().spaceDim()
        for d in self.bcDOF:
            if d < 0 or d >= spaceDim:
                raise ValueError("Attempting to constrain DOF (%d) that doesn't exist. Space dimension is %d." % \
                                 (d, spaceDim))

        self._eventLogger.eventEnd(logEvent)
        return
Example #31
0
    def initialize(self, totalTime, numTimeSteps, normalizer):
        """
    Initialize PointForce boundary condition.
    """
        logEvent = "%sinit" % self._loggingPrefix
        self._eventLogger.eventBegin(logEvent)

        from pylith.mpi.Communicator import mpi_comm_world
        comm = mpi_comm_world()

        if 0 == comm.rank:
            self._info.log("Initializing point forces '%s'." % self.label())

        Integrator.initialize(self, totalTime, numTimeSteps, normalizer)
        BoundaryCondition.initialize(self, totalTime, numTimeSteps, normalizer)

        self._eventLogger.eventEnd(logEvent)
        return
Example #32
0
  def initialize(self, totalTime, numTimeSteps, normalizer):
    """
    Initialize PointForce boundary condition.
    """
    logEvent = "%sinit" % self._loggingPrefix
    self._eventLogger.eventBegin(logEvent)

    from pylith.mpi.Communicator import mpi_comm_world
    comm = mpi_comm_world()

    if 0 == comm.rank:
      self._info.log("Initializing point forces '%s'." % self.label())

    Integrator.initialize(self, totalTime, numTimeSteps, normalizer)
    BoundaryCondition.initialize(self, totalTime, numTimeSteps, normalizer)

    self._eventLogger.eventEnd(logEvent)    
    return
Example #33
0
    def verifyConfiguration(self):
        """
    Verify compatibility of configuration.
    """
        logEvent = "%sverify" % self._loggingPrefix
        self._eventLogger.eventBegin(logEvent)

        BoundaryCondition.verifyConfiguration(self, self.mesh())
        Integrator.verifyConfiguration(self)
        if self.bcQuadrature.cellDim() != self.mesh().dimension() - 1:
            raise ValueError, "Quadrature scheme and mesh are incompatible.\n" "Dimension for quadrature: %d\n" "Dimension of mesh boundary '%s': %d" % (
                self.bcQuadrature.cellDim,
                self.label(),
                self.mesh().dimension() - 1,
            )
        ModuleAbsorbingDampers.verifyConfiguration(self, self.mesh())

        self._eventLogger.eventEnd(logEvent)
        return
Example #34
0
  def preinitialize(self, mesh):
    """
    Do pre-initialization setup.
    """
    BoundaryCondition.preinitialize(self, mesh)
    Integrator.preinitialize(self, mesh)
    self.bcQuadrature.preinitialize(mesh.coordsys().spaceDim())
    self.quadrature(self.bcQuadrature)
    self.createSubMesh(mesh)
    self.output.preinitialize(self)

    fields = []
    if not isinstance(self.inventory.dbInitial, NullComponent):
      fields += ["initial_value"]
    if not isinstance(self.inventory.dbRate, NullComponent):
      fields += ["rate_of_change", "rate_start_time"]
    if not isinstance(self.inventory.dbChange, NullComponent):
      fields += ["change_in_value", "change_start_time"]
    self.availableFields['cell']['info'] += fields
    return
Example #35
0
    def verifyConfiguration(self):
        """
    Verify compatibility of configuration.
    """
        logEvent = "%sverify" % self._loggingPrefix
        self._eventLogger.eventBegin(logEvent)

        BoundaryCondition.verifyConfiguration(self, self.mesh())
        Integrator.verifyConfiguration(self)
        if self.bcQuadrature.cellDim() != self.mesh().dimension() - 1:
            raise ValueError, \
                  "Quadrature scheme and mesh are incompatible.\n" \
                  "Dimension for quadrature: %d\n" \
                  "Dimension of mesh boundary '%s': %d" % \
                  (self.bcQuadrature.cellDim,
                   self.label(), self.mesh().dimension()-1)
        ModuleAbsorbingDampers.verifyConfiguration(self, self.mesh())

        self._eventLogger.eventEnd(logEvent)
        return
Example #36
0
  def preinitialize(self, mesh):
    """
    Do pre-initialization setup.
    """
    BoundaryCondition.preinitialize(self, mesh)
    Integrator.preinitialize(self, mesh)
    self.bcQuadrature.preinitialize(mesh.coordsys().spaceDim())
    self.quadrature(self.bcQuadrature)
    self.createSubMesh(mesh)
    self.output.preinitialize(self)

    fields = []
    if not isinstance(self.inventory.dbInitial, NullComponent):
      fields += ["initial_value"]
    if not isinstance(self.inventory.dbRate, NullComponent):
      fields += ["rate_of_change", "rate_start_time"]
    if not isinstance(self.inventory.dbChange, NullComponent):
      fields += ["change_in_value", "change_start_time"]
    self.availableFields['cell']['info'] += fields
    return
Example #37
0
  def initialize(self, totalTime, numTimeSteps, normalizer):
    """
    Initialize Neumann boundary condition.
    """
    logEvent = "%sinit" % self._loggingPrefix
    self._eventLogger.eventBegin(logEvent)
    
    from pylith.mpi.Communicator import mpi_comm_world
    comm = mpi_comm_world()

    if 0 == comm.rank:
      self._info.log("Initializing Neumann boundary '%s'." % self.label())

    Integrator.initialize(self, totalTime, numTimeSteps, normalizer)
    BoundaryCondition.initialize(self, totalTime, numTimeSteps, normalizer)

    self.output.initialize(normalizer, self.bcQuadrature)
    self.output.writeInfo()

    self._eventLogger.eventEnd(logEvent)
    return
Example #38
0
  def initialize(self, totalTime, numTimeSteps, normalizer):
    """
    Initialize Neumann boundary condition.
    """
    logEvent = "%sinit" % self._loggingPrefix
    self._eventLogger.eventBegin(logEvent)
    
    from pylith.mpi.Communicator import mpi_comm_world
    comm = mpi_comm_world()

    if 0 == comm.rank:
      self._info.log("Initializing Neumann boundary '%s'." % self.label())

    Integrator.initialize(self, totalTime, numTimeSteps, normalizer)
    BoundaryCondition.initialize(self, totalTime, numTimeSteps, normalizer)

    self.output.initialize(normalizer, self.bcQuadrature)
    self.output.writeInfo()

    self._eventLogger.eventEnd(logEvent)
    return