[cig-commits] r14341 - in short/3D/PyLith/branches/pylith-swig: pylith/feassemble unittests/pytests/feassemble
brad at geodynamics.org
brad at geodynamics.org
Mon Mar 16 12:00:56 PDT 2009
Author: brad
Date: 2009-03-16 12:00:56 -0700 (Mon, 16 Mar 2009)
New Revision: 14341
Modified:
short/3D/PyLith/branches/pylith-swig/pylith/feassemble/Integrator.py
short/3D/PyLith/branches/pylith-swig/pylith/feassemble/IntegratorElasticity.py
short/3D/PyLith/branches/pylith-swig/unittests/pytests/feassemble/TestElasticityImplicit.py
Log:
Fixed setting up Python elasticity integrator tests.
Modified: short/3D/PyLith/branches/pylith-swig/pylith/feassemble/Integrator.py
===================================================================
--- short/3D/PyLith/branches/pylith-swig/pylith/feassemble/Integrator.py 2009-03-16 19:00:26 UTC (rev 14340)
+++ short/3D/PyLith/branches/pylith-swig/pylith/feassemble/Integrator.py 2009-03-16 19:00:56 UTC (rev 14341)
@@ -70,6 +70,13 @@
return
+ def verifyConfiguration(self):
+ """
+ Verify compatibility of configuration.
+ """
+ return
+
+
def initialize(self, totalTime, numTimeSteps, normalizer):
"""
Do initialization.
@@ -92,7 +99,7 @@
logEvent = "%spoststep" % self._loggingPrefix
self._logger.eventBegin(logEvent)
- self.updateState(t, fields)
+ self.updateStateVars(t, fields)
self._logger.eventEnd(logEvent)
return
@@ -120,6 +127,7 @@
logger.initialize()
events = ["preinit",
+ "verify",
"init",
"poststep",
"finalize"]
Modified: short/3D/PyLith/branches/pylith-swig/pylith/feassemble/IntegratorElasticity.py
===================================================================
--- short/3D/PyLith/branches/pylith-swig/pylith/feassemble/IntegratorElasticity.py 2009-03-16 19:00:26 UTC (rev 14340)
+++ short/3D/PyLith/branches/pylith-swig/pylith/feassemble/IntegratorElasticity.py 2009-03-16 19:00:56 UTC (rev 14341)
@@ -50,13 +50,13 @@
self.mesh = mesh
self.output = material.output
self.availableFields = material.availableFields
- self.matQuadrature = material.quadrature
- self.matLabel = material.matLabel
+ self.materialObj = material
Integrator.preinitialize(self, mesh)
material.preinitialize(mesh)
#self.output.preinitialize(self)
+ # Set integrator's quadrature using quadrature from material
self.quadrature(material.quadrature)
self.material(material)
return
@@ -84,13 +84,13 @@
self._logger.eventBegin(logEvent)
self._info.log("Initializing integrator for material '%s'." % \
- self.matLabel)
+ self.materialObj.label)
print "DDD"
Integrator.initialize(self, totalTime, numTimeSteps, normalizer)
print "EEE"
- #self.output.initialize(normalizer, self.matQuadrature)
+ #self.output.initialize(normalizer, self.materialObj.quadrature)
#self.output.writeInfo()
#self.output.open(totalTime, numTimeSteps)
@@ -118,7 +118,7 @@
"""
Get mesh associated with data fields.
"""
- return self.material.getDataMesh()
+ return self.materialObj.getDataMesh()
def getCellField(self, name, fields=None):
Modified: short/3D/PyLith/branches/pylith-swig/unittests/pytests/feassemble/TestElasticityImplicit.py
===================================================================
--- short/3D/PyLith/branches/pylith-swig/unittests/pytests/feassemble/TestElasticityImplicit.py 2009-03-16 19:00:26 UTC (rev 14340)
+++ short/3D/PyLith/branches/pylith-swig/unittests/pytests/feassemble/TestElasticityImplicit.py 2009-03-16 19:00:56 UTC (rev 14341)
@@ -272,7 +272,8 @@
fields = SolutionFields(mesh)
fields.add("residual")
fields.add("disp(t), bc(t+dt)")
- fields.solutionName("disp(t), bc(t+dt)")
+ fields.add("dispIncr(t->t+dt)")
+ fields.solutionName("dispIncr(t->t+dt)")
residual = fields.get("residual")
residual.newSection(residual.VERTICES_FIELD, mesh.coordsys().spaceDim())
More information about the CIG-COMMITS
mailing list