[cig-commits] r9240 - in short/3D/PyLith/trunk/pylith: feassemble materials meshio
brad at geodynamics.org
brad at geodynamics.org
Tue Feb 5 13:21:53 PST 2008
Author: brad
Date: 2008-02-05 13:21:52 -0800 (Tue, 05 Feb 2008)
New Revision: 9240
Modified:
short/3D/PyLith/trunk/pylith/feassemble/IntegratorElasticity.py
short/3D/PyLith/trunk/pylith/materials/ElasticMaterial.py
short/3D/PyLith/trunk/pylith/materials/ElasticPlaneStrain.py
short/3D/PyLith/trunk/pylith/materials/Material.py
short/3D/PyLith/trunk/pylith/meshio/OutputMatElastic.py
Log:
Worked on output of material information.
Modified: short/3D/PyLith/trunk/pylith/feassemble/IntegratorElasticity.py
===================================================================
--- short/3D/PyLith/trunk/pylith/feassemble/IntegratorElasticity.py 2008-02-05 21:21:36 UTC (rev 9239)
+++ short/3D/PyLith/trunk/pylith/feassemble/IntegratorElasticity.py 2008-02-05 21:21:52 UTC (rev 9240)
@@ -55,8 +55,8 @@
self.material = material
self.cppHandle.material = self.material.cppHandle
return
-
+
def initialize(self, totalTime, numTimeSteps):
"""
Initialize material properties.
@@ -73,4 +73,17 @@
return
+ def poststep(self, t, dt, totalTime):
+ """
+ Hook for doing stuff after advancing time step.
+ """
+ logEvent = "%spoststep" % self._loggingPrefix
+ self._logger.eventBegin(logEvent)
+
+ self.material.poststep(t, dt, totalTime)
+
+ self._logger.eventEnd(logEvent)
+ return
+
+
# End of file
Modified: short/3D/PyLith/trunk/pylith/materials/ElasticMaterial.py
===================================================================
--- short/3D/PyLith/trunk/pylith/materials/ElasticMaterial.py 2008-02-05 21:21:36 UTC (rev 9239)
+++ short/3D/PyLith/trunk/pylith/materials/ElasticMaterial.py 2008-02-05 21:21:52 UTC (rev 9240)
@@ -85,6 +85,7 @@
Setup members using inventory.
"""
Material._configure(self)
+ self.output = self.inventory.output
return
Modified: short/3D/PyLith/trunk/pylith/materials/ElasticPlaneStrain.py
===================================================================
--- short/3D/PyLith/trunk/pylith/materials/ElasticPlaneStrain.py 2008-02-05 21:21:36 UTC (rev 9239)
+++ short/3D/PyLith/trunk/pylith/materials/ElasticPlaneStrain.py 2008-02-05 21:21:52 UTC (rev 9240)
@@ -40,7 +40,7 @@
{'info': [],
'data': []},
'cell': \
- {'info': ["vp", "density"],
+ {'info': ["Lame mu", "Lame lambda", "density"],
'data': []}}
return
Modified: short/3D/PyLith/trunk/pylith/materials/Material.py
===================================================================
--- short/3D/PyLith/trunk/pylith/materials/Material.py 2008-02-05 21:21:36 UTC (rev 9239)
+++ short/3D/PyLith/trunk/pylith/materials/Material.py 2008-02-05 21:21:52 UTC (rev 9240)
@@ -154,7 +154,7 @@
"""
Get mesh associated with data fields.
"""
- return (self.mesh, "material-id", self.label)
+ return (self.mesh, "material-id", self.id)
def getVertexField(self, name):
Modified: short/3D/PyLith/trunk/pylith/meshio/OutputMatElastic.py
===================================================================
--- short/3D/PyLith/trunk/pylith/meshio/OutputMatElastic.py 2008-02-05 21:21:36 UTC (rev 9239)
+++ short/3D/PyLith/trunk/pylith/meshio/OutputMatElastic.py 2008-02-05 21:21:52 UTC (rev 9240)
@@ -39,8 +39,6 @@
## Python object for managing OutputMatElastic 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.
##
@@ -49,15 +47,10 @@
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=[])
- vertexDataFields.meta['tip'] = "Names of vertex data fields to output."
-
- cellInfoFields = pyre.inventory.list("cell_info_fields", default=[])
+ cellInfoFields = pyre.inventory.list("cell_info_fields",
+ default=["Lame mu",
+ "Lame lambda",
+ "density"])
cellInfoFields.meta['tip'] = "Names of cell info fields to output."
cellDataFields = pyre.inventory.list("cell_data_fields",
@@ -82,8 +75,8 @@
Set members based using inventory.
"""
OutputManager._configure(self)
- self.vertexInfoFields = self.inventory.vertexInfoFields
- self.vertexDataFields = self.inventory.vertexDataFields
+ self.vertexInfoFields = []
+ self.vertexDataFields = []
self.cellInfoFields = self.inventory.cellInfoFields
self.cellDataFields = self.inventory.cellDataFields
return
More information about the cig-commits
mailing list