[cig-commits] r8646 - in short/3D/PyLith/trunk: . libsrc
libsrc/meshio pylith/meshio
brad at geodynamics.org
brad at geodynamics.org
Thu Dec 13 20:55:37 PST 2007
Author: brad
Date: 2007-12-13 20:55:36 -0800 (Thu, 13 Dec 2007)
New Revision: 8646
Modified:
short/3D/PyLith/trunk/TODO
short/3D/PyLith/trunk/libsrc/Makefile.am
short/3D/PyLith/trunk/libsrc/meshio/Makefile.am
short/3D/PyLith/trunk/pylith/meshio/OutputManager.py
Log:
Added C++ OutputManager.
Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO 2007-12-14 00:07:09 UTC (rev 8645)
+++ short/3D/PyLith/trunk/TODO 2007-12-14 04:55:36 UTC (rev 8646)
@@ -6,28 +6,23 @@
1. Finish Neumann BC [CHARLES]
- 2. EventLogging [BRAD]
- Check constraints/integrators.
- Fault::adjustTopology()
- High level events
- MeshGenerator
- Problem
+ 2. Reimplement SolutionIO [BRAD & MATT]
+ a. C++ OutputManager
+ b. VertexFilter, CellFilter
+ b. Bindings for OutputManager, DataWriter, DataWriterVTK
+ c. SolutionOutput, SolutionSubsetOutput, DirichletOutput
+ d. DataWriter/DataWriterVTK
+ (1) Replace use of PetscViewer with extraction to arrays so that
+ DataWriters can be generalized.
+ e. FaultOutput
+ Need fault mesh associated with fields over fault [MATT?]
+ f. CellFilterAvg
+ Average data over quadrature points
+ g. VertexFilterCells
+ Zero out data for vertices not in normal cells
+ g. NeumannOutput
+ h. DataWriterHDF5
- 3. Reimplement SolutionIO [BRAD & MATT]
- a. Reimplement SolutionIOVTK
- b. Implement SolutionIOHDF5
-
- General Ideas
-
- Need to be able to append fields.
-
- It should be possible to use PETSc viewers, but we will want to
- setup the viewers in implementation classes and then call the
- view in the parent class?
-
- Want open(), writeTopology(), appendVertexField(),
- appendCellField(), close() paradigm.
-
Use Cases
Want to write topology + vertex and/or cell fields
@@ -88,15 +83,19 @@
Solution field (time history)
- 4. Optimization of restrict()/update() [BRAD]
- a. Fault
- b. Absorbing BC
- c. Neumann BC
+ 3. Optimization [BRAD]
+ a. ElasticMaterial [try single section for all parameters]
+ b. Fault?
+ c. Absorbing BC?
+ d. Neumann BC?
- 5. Velocity Dirichlet BC [BRAD]
+ 4. Velocity Dirichlet BC [BRAD]
- 6. Generalized Maxwell viscoelastic model [CHARLES]
+ Should we replace Dirichlet BC with BC that has u(t) = u0 + u1*t?
+ Default u0 and u1 would be 0.
+ 5. Generalized Maxwell viscoelastic model [CHARLES]
+
General
1. Need to add explanation of output and output parameters to
@@ -111,6 +110,8 @@
Add check for overlapping of material ids for bulk and cohesive
cells.
+ 5. Install cases
+
Release 1.2
1. Dynamic fault interface conditions.
@@ -260,7 +261,7 @@
add the appropriate setFiberDimension() call. FIAT has this information,
we just are not using it right now.
-3. Global refinement of mesh.
+3. Uniform refinement of mesh.
Inputs:
* PETSc Mesh (original)
@@ -286,7 +287,7 @@
Not used a. Remove extra time in uninterpolated restrict(). May need special method for P1.
- Done c. getStateVars() is way to expensive. It looks like _getParameters() allocates an int_array. Try just using _numParamValues.
+ Done c. getStateVars() is way too expensive. It looks like _getParameters() allocates an int_array. Try just using _numParamValues.
Not used d. Same as a) for update
@@ -294,8 +295,6 @@
Done a. Share memory in precomputation sections
-10. Move events to Python (make wrappers for events)
-
11. For Schur complement directly for mass matrix and Lagrange multiplier problem
======================================================================
Modified: short/3D/PyLith/trunk/libsrc/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/libsrc/Makefile.am 2007-12-14 00:07:09 UTC (rev 8645)
+++ short/3D/PyLith/trunk/libsrc/Makefile.am 2007-12-14 04:55:36 UTC (rev 8646)
@@ -70,12 +70,14 @@
materials/MaxwellIsotropic3D.cc \
meshio/BinaryIO.cc \
meshio/DataWriter.cc \
+ meshio/DataWriterVTK.cc \
meshio/GMVFile.cc \
meshio/GMVFileAscii.cc \
meshio/GMVFileBinary.cc \
meshio/MeshIO.cc \
meshio/MeshIOAscii.cc \
meshio/MeshIOLagrit.cc \
+ meshio/OutputManager.cc \
meshio/PsetFile.cc \
meshio/PsetFileAscii.cc \
meshio/PsetFileBinary.cc \
Modified: short/3D/PyLith/trunk/libsrc/meshio/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/Makefile.am 2007-12-14 00:07:09 UTC (rev 8645)
+++ short/3D/PyLith/trunk/libsrc/meshio/Makefile.am 2007-12-14 04:55:36 UTC (rev 8646)
@@ -15,12 +15,14 @@
subpkginclude_HEADERS = \
DataWriter.hh \
+ DataWriterVTK.hh \
MeshIO.hh \
MeshIO.icc \
MeshIOAscii.hh \
MeshIOAscii.icc \
MeshIOLagrit.hh \
MeshIOLagrit.icc \
+ OutputManager.hh \
SolutionIO.hh \
SolutionIOVTK.hh \
SolutionIOVTK.icc
Modified: short/3D/PyLith/trunk/pylith/meshio/OutputManager.py
===================================================================
--- short/3D/PyLith/trunk/pylith/meshio/OutputManager.py 2007-12-14 00:07:09 UTC (rev 8645)
+++ short/3D/PyLith/trunk/pylith/meshio/OutputManager.py 2007-12-14 04:55:36 UTC (rev 8646)
@@ -64,12 +64,12 @@
writer.meta['tip'] = "Writer for data."
vertexFilter = pyre.inventory.facility("vertex_filter",
- factory=DataVertexFilter,
+ factory=VertexFilter,
family="output_vertex_filter")
vertexFilter.meta['tip'] = "Filter for vertex data."
cellFilter = pyre.inventory.facility("cell_filter",
- factory=DataCellFilter,
+ factory=CellFilter,
family="output_cell_filter")
cellFilter.meta['tip'] = "Filter for cell data."
@@ -95,7 +95,18 @@
return
+ def initialize(self, quadrature):
+ """
+ Initialize output manager.
+ """
+ self.cellFilter.initialize(quadrature)
+ return
+
+
def open(self, mesh):
+ """
+ Prepare for writing data.
+ """
self._setupLogging()
logEvent = "%sopen" % self._loggingPrefix
self._logger.eventBegin(logEvent)
@@ -113,6 +124,9 @@
def close(self):
+ """
+ Perform post-write cleanup.
+ """
logEvent = "%sclose" % self._loggingPrefix
self._logger.eventBegin(logEvent)
@@ -124,6 +138,11 @@
def writeFields(self, t, istep, fields=None):
+ """
+ Write vertex and cell fields.
+
+ @param fields FieldsManager containing fields (if not in mesh).
+ """
logEvent = "%swriteVertex" % self._loggingPrefix
self._logger.eventBegin(logEvent)
@@ -174,8 +193,8 @@
self.cppHandle = bindings.OutputManager()
self.cppHandle.vertexFields = self.vertexFields
self.cppHandle.cellFields = self.cellFields
- self.cppHandle.vertexFilter = self.vertexFilter
- self.cppHandle.cellFilter = self.cellFilter
+ self.cppHandle.vertexFilter = self.vertexFilter.cppHandle
+ self.cppHandle.cellFilter = self.cellFilter.cppHandle
return
More information about the cig-commits
mailing list