[cig-commits] r9106 - in short/3D/PyLith/trunk/pylith: . faults feassemble meshio problems

brad at geodynamics.org brad at geodynamics.org
Mon Jan 21 19:58:49 PST 2008


Author: brad
Date: 2008-01-21 19:58:49 -0800 (Mon, 21 Jan 2008)
New Revision: 9106

Added:
   short/3D/PyLith/trunk/pylith/meshio/OutputFaultKin.py
   short/3D/PyLith/trunk/pylith/meshio/OutputSoln.py
Modified:
   short/3D/PyLith/trunk/pylith/Makefile.am
   short/3D/PyLith/trunk/pylith/faults/Fault.py
   short/3D/PyLith/trunk/pylith/faults/FaultCohesiveKin.py
   short/3D/PyLith/trunk/pylith/feassemble/Constraint.py
   short/3D/PyLith/trunk/pylith/feassemble/Integrator.py
   short/3D/PyLith/trunk/pylith/meshio/OutputManager.py
   short/3D/PyLith/trunk/pylith/meshio/SingleOutput.py
   short/3D/PyLith/trunk/pylith/meshio/__init__.py
   short/3D/PyLith/trunk/pylith/problems/Formulation.py
Log:
Started setting up output of fault information (Python level changes).

Modified: short/3D/PyLith/trunk/pylith/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/pylith/Makefile.am	2008-01-21 18:56:42 UTC (rev 9105)
+++ short/3D/PyLith/trunk/pylith/Makefile.am	2008-01-22 03:58:49 UTC (rev 9106)
@@ -84,6 +84,8 @@
 	meshio/MeshIOCubit.py \
 	meshio/MeshIOLagrit.py \
 	meshio/OutputManager.py \
+	meshio/OutputSoln.py \
+	meshio/OutputFaultKin.py \
 	meshio/SingleOutput.py \
 	meshio/VertexFilter.py \
 	problems/__init__.py \

Modified: short/3D/PyLith/trunk/pylith/faults/Fault.py
===================================================================
--- short/3D/PyLith/trunk/pylith/faults/Fault.py	2008-01-21 18:56:42 UTC (rev 9105)
+++ short/3D/PyLith/trunk/pylith/faults/Fault.py	2008-01-22 03:58:49 UTC (rev 9106)
@@ -74,7 +74,6 @@
     ##
     ## \b Facilities
     ## @li \b quadrature Quadrature object for numerical integration
-    ## @li \b output Output manager associated with fault data.
 
     import pyre.inventory
 
@@ -108,12 +107,6 @@
     matDB.meta['tip'] = "Spatial database for bulk material properties " \
                         "(used in improving conditioning of Jacobian matrix)."
 
-    from pylith.meshio.OutputManager import OutputManager
-    output = pyre.inventory.facility("output", family="output_manager",
-                                     factory=OutputManager)
-    output.meta['tip'] = "Output manager associated with fault data."
-
-
   # PUBLIC METHODS /////////////////////////////////////////////////////
 
   def __init__(self, name="fault"):
@@ -151,7 +144,6 @@
     
     self.quadrature.preinitialize()    
     self.cppHandle.quadrature = self.quadrature.cppHandle
-    #self.cppHandle.output = self.output
     return
   
 
@@ -167,8 +159,6 @@
             (self.quadrature.cell.cellDim, faultDim)
 
     # :TODO: Make sure mesh has group of vertices with label.
-
-    #self.output.verifyConfiguration()
     return
   
 
@@ -178,31 +168,26 @@
     """
     self.quadrature.initialize()
     self.matDB.initialize()
-    #self.output.initialize(self.quadrature.cppHandle)
 
     assert(None != self.cppHandle)
     self.cppHandle.initialize(self.mesh.cppHandle,
                               self.mesh.coordsys.cppHandle,
                               self.upDir, self.normalDir,
                               self.matDB.cppHandle)
+    from pylith.topology.Mesh import Mesh
+    self.faultMesh = Mesh()
+    self.faultMesh.initialize(self.mesh.coordsys)
+    #self.faultMesh.cppHandle = self.cppHandle.faultMesh() # TODO
     return
 
 
-  def poststep(self, t, dt, totalTime):
+  def getDataMesh(self):
     """
-    Hook for doing stuff after advancing time step.
+    Get mesh associated with data fields.
     """
-    logEvent = "%spoststep" % self._loggingPrefix
-    self._logger.eventBegin(logEvent)
+    return self.faultMesh
 
-    self._info.log("Writing fault data.")
-    #if output.writeFlag:
-    #  self.cppHandle.writeData(t+dt)
 
-    self._logger.eventEnd(logEvent)
-    return
-
-
   # PRIVATE METHODS ////////////////////////////////////////////////////
 
   def _configure(self):

Modified: short/3D/PyLith/trunk/pylith/faults/FaultCohesiveKin.py
===================================================================
--- short/3D/PyLith/trunk/pylith/faults/FaultCohesiveKin.py	2008-01-21 18:56:42 UTC (rev 9105)
+++ short/3D/PyLith/trunk/pylith/faults/FaultCohesiveKin.py	2008-01-22 03:58:49 UTC (rev 9106)
@@ -45,6 +45,7 @@
     ##
     ## \b Facilities
     ## @li \b eq_src Kinematic earthquake source information.
+    ## @li \b output Output manager associated with fault data.
 
     import pyre.inventory
 
@@ -53,7 +54,13 @@
                                     factory=EqKinSrc)
     eqsrc.meta['tip'] = "Kinematic earthquake source information."
 
+    from pylith.meshio.OutputFaultKin import OutputFaultKin
+    output = pyre.inventory.facility("output", family="output_manager",
+                                     factory=OutputFaultKin)
+    output.meta['tip'] = "Output manager associated with fault data."
 
+
+
   # PUBLIC METHODS /////////////////////////////////////////////////////
 
   def __init__(self, name="faultcohesivekin"):
@@ -63,6 +70,18 @@
     FaultCohesive.__init__(self, name)
     Integrator.__init__(self)
     self._loggingPrefix = "CoKi "
+
+    self.availableFields = \
+        {'vertex': \
+           {'info': ["strike_dir",
+                     "dip_dir",
+                     "normal_dir",
+                     "final_slip",
+                     "slip_time"],
+            'data': ["slip"]},
+         'cell': \
+           {'info': [],
+            'data': ["traction_change"]}}
     return
 
 
@@ -76,6 +95,7 @@
     assert(None != self.cppHandle)
     self.eqsrc.preinitialize()
     self.cppHandle.eqsrc = self.eqsrc.cppHandle
+    #self.cppHandle.output = self.output # TODO
     return
   
 
@@ -85,6 +105,8 @@
     """
     FaultCohesive.verifyConfiguration(self)
     Integrator.verifyConfiguration(self)
+    self.output.dataProvider = self
+    self.output.verifyConfiguration()
     return
 
 
@@ -99,10 +121,58 @@
     self._logger.eventBegin(logEvent)
     self.eqsrc.initialize()
     FaultCohesive.initialize(self)
+    self.output.initialize(self.quadrature.cppHandle)
+
     self._logger.eventEnd(logEvent)
     return
 
 
+  def poststep(self, t, dt, totalTime):
+    """
+    Hook for doing stuff after advancing time step.
+    """
+    logEvent = "%spoststep" % self._loggingPrefix
+    self._logger.eventBegin(logEvent)
+
+    self._info.log("Writing fault data.")
+    #self.cppHandle.writeData(t+dt)
+
+    self._logger.eventEnd(logEvent)
+    return
+
+
+  def getVertexField(self, name):
+    """
+    Get vertex field.
+    """
+    field = self.cppHandle.getVertexField(name) # TODO
+    fieldType = None
+    if name in ["strike_dir",
+                "dip_dir",
+                "normal_dir",
+                "final_slip",
+                "traction_change"]:
+      fieldType = "vector field"
+    elif name in ["slip_time"]:
+      fieldType = "scalar field"
+    else:
+      raise ValueError, "Vertex field '%s' not available for output." % name
+    return (field, fieldType)
+
+
+  def getCellField(self):
+    """
+    Get cell field.
+    """
+    field = self.cppHandle.getVertexField(name) # TODO
+    fieldType = None
+    if name in ["traction_change"]:
+      fieldType = "vector field"
+    else:
+      raise ValueError, "Cell field '%s' not available for output." % name
+    return (field, fieldType)
+
+
   # PRIVATE METHODS ////////////////////////////////////////////////////
 
   def _configure(self):

Modified: short/3D/PyLith/trunk/pylith/feassemble/Constraint.py
===================================================================
--- short/3D/PyLith/trunk/pylith/feassemble/Constraint.py	2008-01-21 18:56:42 UTC (rev 9105)
+++ short/3D/PyLith/trunk/pylith/feassemble/Constraint.py	2008-01-22 03:58:49 UTC (rev 9106)
@@ -28,6 +28,7 @@
      not "setConstraints" in attrs or \
      not "useSolnIncr" in attrs or \
      not "setField" in attrs or \
+     not "poststep" in attrs or \
      not "finalize" in attrs:
     result = False
   return result
@@ -127,6 +128,13 @@
     return
 
 
+  def poststep(self, t, dt, totalTime):
+    """
+    Hook for doing stuff after advancing time step.
+    """
+    return
+
+
   def finalize(self):
     """
     Cleanup after time stepping.
@@ -152,6 +160,7 @@
               "setSizes",
               "constraints",
               "setField",
+              "poststep",
               "finalize"]
     for event in events:
       logger.registerEvent("%s%s" % (self._loggingPrefix, event))

Modified: short/3D/PyLith/trunk/pylith/feassemble/Integrator.py
===================================================================
--- short/3D/PyLith/trunk/pylith/feassemble/Integrator.py	2008-01-21 18:56:42 UTC (rev 9105)
+++ short/3D/PyLith/trunk/pylith/feassemble/Integrator.py	2008-01-22 03:58:49 UTC (rev 9106)
@@ -30,6 +30,7 @@
      not "integrateJacobian" in attrs or \
      not "updateState" in attrs or \
      not "verifyConfiguration" in attrs or \
+     not "poststep" in attrs or \
      not "finalize" in attrs:
     result = False
   return result
@@ -166,6 +167,13 @@
     return
     
 
+  def poststep(self, t, dt, totalTime):
+    """
+    Hook for doing stuff after advancing time step.
+    """
+    return
+
+
   def finalize(self):
     """
     Cleanup after time stepping.
@@ -193,6 +201,7 @@
               "newJacobian",
               "jacobian",
               "state",
+              "poststep",
               "finalize"]
     for event in events:
       logger.registerEvent("%s%s" % (self._loggingPrefix, event))

Added: short/3D/PyLith/trunk/pylith/meshio/OutputFaultKin.py
===================================================================
--- short/3D/PyLith/trunk/pylith/meshio/OutputFaultKin.py	                        (rev 0)
+++ short/3D/PyLith/trunk/pylith/meshio/OutputFaultKin.py	2008-01-22 03:58:49 UTC (rev 9106)
@@ -0,0 +1,105 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+#                           Brad T. Aagaard
+#                        U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+## @file pyre/meshio/OutputFaultKin.py
+##
+## @brief Python object for managing output of finite-element
+## information for faults with kinematic ruptures.
+##
+## Factory: output_manager
+
+from OutputManager import OutputManager
+
+# OutputFaultKin class
+class OutputFaultKin(OutputManager):
+  """
+  Python object for managing output of finite-element information for
+  faults with kinematic ruptures.
+
+  Factory: output_manager
+  """
+
+  # INVENTORY //////////////////////////////////////////////////////////
+
+  class Inventory(OutputManager.Inventory):
+    """
+    Python object for managing OutputFaultKin facilities and properties.
+    """
+
+    ## @class Inventory
+    ## Python object for managing OutputFaultKin facilities and properties.
+    ##
+    ## \b Properties
+    ## @li \b vertex_info_fields Names of vertex info fields to output.
+    ## @li \b vertex_data_fields Names of vertex data fields to output.
+    ## @li \b cell_info_fields Names of cell info fields to output.
+    ## @li \b cell_data_fields Names of cell data fields to output.
+    ##
+    ## \b Facilities
+    ## @li None
+
+    import pyre.inventory
+
+    vertexInfoFields = pyre.inventory.list("vertex_info_fields",
+                                           default=["strike_dir",
+                                                    "dip_dir",
+                                                    "normal_dir",
+                                                    "final_slip",
+                                                    "slip_time"])
+    vertexInfoFields.meta['tip'] = "Names of vertex info fields to output."
+
+    vertexDataFields = pyre.inventory.list("vertex_data_fields", 
+                                           default=["slip"])
+    vertexDataFields.meta['tip'] = "Names of vertex data fields to output."
+
+    cellInfoFields = pyre.inventory.list("cell_info_fields", default=[])
+    cellInfoFields.meta['tip'] = "Names of cell info fields to output."
+
+    cellDataFields = pyre.inventory.list("cell_data_fields", 
+                                         default=["traction_change"])
+    cellDataFields.meta['tip'] = "Names of cell data fields to output."
+
+
+  # PUBLIC METHODS /////////////////////////////////////////////////////
+
+  def __init__(self, name="outputmanager"):
+    """
+    Constructor.
+    """
+    OutputManager.__init__(self, name)
+    return
+
+    
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _configure(self):
+    """
+    Set members based using inventory.
+    """
+    OutputManager._configure(self)
+    self.vertexInfoFields = self.inventory.vertexInfoFields
+    self.vertexDataFields = self.inventory.vertexDataFields
+    self.cellInfoFields = self.inventory.cellInfoFields
+    self.cellDataFields = self.inventory.cellDataFields
+    return
+
+
+# FACTORIES ////////////////////////////////////////////////////////////
+
+def output_manager():
+  """
+  Factory associated with OutputFaultKin.
+  """
+  return OutputFaultKin()
+
+
+# End of file 

Modified: short/3D/PyLith/trunk/pylith/meshio/OutputManager.py
===================================================================
--- short/3D/PyLith/trunk/pylith/meshio/OutputManager.py	2008-01-21 18:56:42 UTC (rev 9105)
+++ short/3D/PyLith/trunk/pylith/meshio/OutputManager.py	2008-01-22 03:58:49 UTC (rev 9106)
@@ -12,8 +12,8 @@
 
 ## @file pyre/meshio/OutputManager.py
 ##
-## @brief Python object for managing output of finite-element
-## information.
+## @brief Python abstract base class for managing output of
+## finite-element information.
 ##
 ## Factory: output_manager
 
@@ -22,7 +22,8 @@
 # OutputManager class
 class OutputManager(Component):
   """
-  Python object for managing output of finite-element information.
+  Python abstract base class for managing output of finite-element
+  information.
 
   Factory: output_manager
   """
@@ -38,10 +39,6 @@
     ## Python object for managing OutputManager facilities and properties.
     ##
     ## \b Properties
-    ## @li \b vertex_info_fields Names of vertex info fields to output.
-    ## @li \b vertex_data_fields Names of vertex data fields to output.
-    ## @li \b cell_info_fields Names of cell info fields to output.
-    ## @li \b cell_data_fields Names of cell data fields to output.
     ## @li \b output_freq Flag indicating whether to use 'time_step' or 'skip'
     ##   to set frequency of solution output.
     ## @li \b time_step Time step between solution output.
@@ -68,19 +65,6 @@
                               validator=pyre.inventory.greaterEqual(0))
     skip.meta['tip'] = "Number of time steps to skip between output."
 
-    vertexInfoFields = pyre.inventory.list("vertex_info_fields", default=[])
-    vertexInfoFields.meta['tip'] = "Names of vertex info fields to output."
-
-    vertexDataFields = pyre.inventory.list("vertex_data_fields", 
-                                           default=["displacements"])
-    vertexDataFields.meta['tip'] = "Names of vertex data fields to output."
-
-    cellInfoFields = pyre.inventory.list("cell_info_fields", default=[])
-    cellInfoFields.meta['tip'] = "Names of cell info fields to output."
-
-    cellDataFields = pyre.inventory.list("cell_data_fields", default=[])
-    cellDataFields.meta['tip'] = "Names of cell data fields to output."
-
     from DataWriterVTK import DataWriterVTK
     writer = pyre.inventory.facility("writer", factory=DataWriterVTK,
                                      family="data_writer")
@@ -117,6 +101,10 @@
     self._stepWrite = None
     self._tWrite = None
     self.dataProvider = None
+    self.vertexInfoFields = []
+    self.vertexDataFields = []
+    self.cellInfoFields = []
+    self.cellDataFields = []
     return
 
 
@@ -127,10 +115,7 @@
     self._setupLogging()
     if None == self.dataProvider:
       raise ValueError("Need to set 'dataProvider' in OutputManager.")
-    self.dataProvider.verifyFields(self.vertexInfoFields, "vertex", "info")
-    self.dataProvider.verifyFields(self.vertexDataFields, "vertex", "data")
-    self.dataProvider.verifyFields(self.cellInfoFields, "cell", "info")
-    self.dataProvider.verifyFields(self.cellDataFields, "cell", "data")
+    self._verifyFields(self.dataProvider.availableFields)
     return
 
 
@@ -266,10 +251,6 @@
     self.skip = self.inventory.skip
     self.coordsys = self.inventory.coordsys
     self.writer = self.inventory.writer
-    self.vertexInfoFields = self.inventory.vertexInfoFields
-    self.vertexDataFields = self.inventory.vertexDataFields
-    self.cellInfoFields = self.inventory.cellInfoFields
-    self.cellDataFields = self.inventory.cellDataFields
     self.vertexFilter = self.inventory.vertexFilter
     self.cellFilter = self.inventory.cellFilter
     return
@@ -308,6 +289,47 @@
     return write
 
 
+  def _verifyFields(self, available):
+    """
+    Verify fields for output are available.
+    """
+    requested = {'vertex': \
+                   {'info': self.vertexInfoFields,
+                    'data': self.vertexDataFields},
+                 'cell': \
+                   {'info': self.cellInfoFields,
+                    'data': self.cellDataFields}}
+    for fieldCategory in ["vertex", "cell"]:
+      if not fieldCategory in available.keys():
+        raise ValueError, \
+            "Key '%s' not found in available fields dictionary for " \
+            "object '%s'." % (fieldCategory, self.dataProvider.name)
+      for dataCategory in ["info", "data"]:
+        if not dataCategory in available[fieldCategory].keys():
+          raise ValueError, \
+              "Key '%s' not found in available fields dictionary for " \
+              "object '%s'." % (fieldCategory, self.dataProvider.name)
+
+        notavailable = []
+        for name in requested[fieldCategory][dataCategory]:
+          if not name in available[fieldCategory][dataCategory]:
+            notavailable.append(name)
+        if len(notavailable) > 0:
+          msg = \
+              "Requested fields not available for output.\n" \
+              "Field type: '%s'\n" \
+              "Data type: '%s'\n" % (fieldCategory, dataCategory)
+          msg += "Available fields: "
+          for name in available:
+            msg += " '%s'" % name
+            msg += "\n"
+          msg += "Fields not available: "
+          for name in notavailable:
+            msg += " '%s'" % name
+          raise ValueError(msg)
+    return
+
+
   def _setupLogging(self):
     """
     Setup event logging.

Added: short/3D/PyLith/trunk/pylith/meshio/OutputSoln.py
===================================================================
--- short/3D/PyLith/trunk/pylith/meshio/OutputSoln.py	                        (rev 0)
+++ short/3D/PyLith/trunk/pylith/meshio/OutputSoln.py	2008-01-22 03:58:49 UTC (rev 9106)
@@ -0,0 +1,99 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+#                           Brad T. Aagaard
+#                        U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+## @file pyre/meshio/OutputSoln.py
+##
+## @brief Python object for managing output of finite-element
+## solution information.
+##
+## Factory: output_manager
+
+from OutputManager import OutputManager
+
+# OutputSoln class
+class OutputSoln(OutputManager):
+  """
+  Python object for managing output of finite-element solution
+  information.
+
+  Factory: output_manager
+  """
+
+  # INVENTORY //////////////////////////////////////////////////////////
+
+  class Inventory(OutputManager.Inventory):
+    """
+    Python object for managing OutputSoln facilities and properties.
+    """
+
+    ## @class Inventory
+    ## Python object for managing OutputSoln facilities and properties.
+    ##
+    ## \b Properties
+    ## @li \b vertex_info_fields Names of vertex info fields to output.
+    ## @li \b vertex_data_fields Names of vertex data fields to output.
+    ## @li \b cell_info_fields Names of cell info fields to output.
+    ## @li \b cell_data_fields Names of cell data fields to output.
+    ##
+    ## \b Facilities
+    ## @li None
+
+    import pyre.inventory
+
+    vertexInfoFields = pyre.inventory.list("vertex_info_fields", default=[])
+    vertexInfoFields.meta['tip'] = "Names of vertex info fields to output."
+
+    vertexDataFields = pyre.inventory.list("vertex_data_fields", 
+                                           default=["displacements"])
+    vertexDataFields.meta['tip'] = "Names of vertex data fields to output."
+
+    cellInfoFields = pyre.inventory.list("cell_info_fields", default=[])
+    cellInfoFields.meta['tip'] = "Names of cell info fields to output."
+
+    cellDataFields = pyre.inventory.list("cell_data_fields", default=[])
+    cellDataFields.meta['tip'] = "Names of cell data fields to output."
+
+
+  # PUBLIC METHODS /////////////////////////////////////////////////////
+
+  def __init__(self, name="outputmanager"):
+    """
+    Constructor.
+    """
+    OutputManager.__init__(self, name)
+    return
+
+
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _configure(self):
+    """
+    Set members based using inventory.
+    """
+    OutputManager._configure(self)
+    self.vertexInfoFields = self.inventory.vertexInfoFields
+    self.vertexDataFields = self.inventory.vertexDataFields
+    self.cellInfoFields = self.inventory.cellInfoFields
+    self.cellDataFields = self.inventory.cellDataFields
+    return
+
+
+# FACTORIES ////////////////////////////////////////////////////////////
+
+def output_manager():
+  """
+  Factory associated with OutputSoln.
+  """
+  return OutputSoln()
+
+
+# End of file 

Modified: short/3D/PyLith/trunk/pylith/meshio/SingleOutput.py
===================================================================
--- short/3D/PyLith/trunk/pylith/meshio/SingleOutput.py	2008-01-21 18:56:42 UTC (rev 9105)
+++ short/3D/PyLith/trunk/pylith/meshio/SingleOutput.py	2008-01-22 03:58:49 UTC (rev 9106)
@@ -44,9 +44,9 @@
 
     import pyre.inventory
 
-    from OutputManager import OutputManager
+    from OutputSoln import OutputSoln
     output = pyre.inventory.facility("output", family="output_manager",
-                                     factory=OutputManager)
+                                     factory=OutputSoln)
     output.meta['tip'] = "Output manager."
 
 

Modified: short/3D/PyLith/trunk/pylith/meshio/__init__.py
===================================================================
--- short/3D/PyLith/trunk/pylith/meshio/__init__.py	2008-01-21 18:56:42 UTC (rev 9105)
+++ short/3D/PyLith/trunk/pylith/meshio/__init__.py	2008-01-22 03:58:49 UTC (rev 9106)
@@ -22,6 +22,8 @@
            'MeshIOCubit',
            'MeshIOLagrit',
            'OutputManager',
+           'OutputSoln',
+           'OutputFaultKin',
            'SingleOutput',
            'VertexFilter']
 

Modified: short/3D/PyLith/trunk/pylith/problems/Formulation.py
===================================================================
--- short/3D/PyLith/trunk/pylith/problems/Formulation.py	2008-01-21 18:56:42 UTC (rev 9105)
+++ short/3D/PyLith/trunk/pylith/problems/Formulation.py	2008-01-22 03:58:49 UTC (rev 9106)
@@ -74,6 +74,14 @@
     self.constraints = None
     self.fields = None
     self.solnField = None
+
+    self.availableFields = \
+        {'vertex': \
+           {'info': [],
+            'data': ["displacements"]},
+         'cell': \
+           {'info': [],
+            'data': []}}
     return
 
 
@@ -256,10 +264,10 @@
     field = self.fields.getSolution()
     for output in self.output.bin:
       output.writeData(t+dt)
-    #for integrator in integrators:
-    #  integrator.poststep(t, dt, totalTime)
-    #for constraint in constraints:
-    #  constraint.poststep(t, dt, totalTime)
+    for integrator in self.integrators:
+      integrator.poststep(t, dt, totalTime)
+    for constraint in self.constraints:
+      constraint.poststep(t, dt, totalTime)
 
     self._logger.eventEnd(logEvent)
     return
@@ -286,43 +294,6 @@
     return
   
 
-  def verifyFields(self, names, fieldCategory, dataCategory):
-    """
-    Verify vertex info fields for output are available.
-    """
-    if fieldCategory == "vertex":
-      if dataCategory == "info":
-        available=[]
-        notavailable=names
-      elif dataCategory == "data":
-        available = ["displacements"]
-        notavailable = []
-        for name in names:
-          if not name in available:
-            notavailable.append(name)
-    elif fieldCategory == "cell":
-      available=[]
-      notavailable=names
-    else:
-      raise ValueError, \
-          "Argument 'fieldCategory' must be 'vertex' or 'field'." \
-          "Current value: '%s'" % fieldCategory
-    if len(notavailable) > 0:
-      msg = \
-          "Requested fields not available for output.\n" \
-          "Field type: '%s'\n" \
-          "Data type: '%s'\n" % (fieldCategory, dataCategory)
-      msg += "Available fields: "
-      for name in available:
-        msg += " '%s'" % name
-      msg += "\n"
-      msg += "Fields not available: "
-      for name in notavailable:
-        msg += " '%s'" % name
-      raise ValueError(msg)
-    return
-
-
   def getDataMesh(self):
     """
     Get mesh associated with data fields.
@@ -345,6 +316,9 @@
 
 
   def getCellField(self):
+    """
+    Get cell field.
+    """
     field = None
     fieldType = None
     raise ValueError, "Cell field '%s' not available for output." % name



More information about the cig-commits mailing list