[cig-commits] r15192 - in short/3D/PyLith/trunk: . libsrc/bc libsrc/faults libsrc/feassemble modulesrc/bc modulesrc/faults pylith/perf
brad at geodynamics.org
brad at geodynamics.org
Wed Jun 10 22:41:27 PDT 2009
Author: brad
Date: 2009-06-10 22:41:22 -0700 (Wed, 10 Jun 2009)
New Revision: 15192
Modified:
short/3D/PyLith/trunk/TODO
short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.cc
short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.hh
short/3D/PyLith/trunk/libsrc/bc/BCIntegratorSubMesh.cc
short/3D/PyLith/trunk/libsrc/bc/BCIntegratorSubMesh.hh
short/3D/PyLith/trunk/libsrc/bc/BoundaryCondition.cc
short/3D/PyLith/trunk/libsrc/bc/BoundaryCondition.hh
short/3D/PyLith/trunk/libsrc/bc/BoundaryConditionPoints.cc
short/3D/PyLith/trunk/libsrc/bc/BoundaryConditionPoints.hh
short/3D/PyLith/trunk/libsrc/bc/DirichletBC.cc
short/3D/PyLith/trunk/libsrc/bc/DirichletBC.hh
short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.cc
short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.hh
short/3D/PyLith/trunk/libsrc/bc/Neumann.cc
short/3D/PyLith/trunk/libsrc/bc/Neumann.hh
short/3D/PyLith/trunk/libsrc/bc/PointForce.cc
short/3D/PyLith/trunk/libsrc/bc/PointForce.hh
short/3D/PyLith/trunk/libsrc/bc/TimeDependent.cc
short/3D/PyLith/trunk/libsrc/bc/TimeDependent.hh
short/3D/PyLith/trunk/libsrc/bc/TimeDependentPoints.cc
short/3D/PyLith/trunk/libsrc/bc/TimeDependentPoints.hh
short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.cc
short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.hh
short/3D/PyLith/trunk/libsrc/faults/ConstRateSlipFn.cc
short/3D/PyLith/trunk/libsrc/faults/ConstRateSlipFn.hh
short/3D/PyLith/trunk/libsrc/faults/EqKinSrc.cc
short/3D/PyLith/trunk/libsrc/faults/EqKinSrc.hh
short/3D/PyLith/trunk/libsrc/faults/Fault.cc
short/3D/PyLith/trunk/libsrc/faults/Fault.hh
short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc
short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.hh
short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveDyn.cc
short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveDyn.hh
short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc
short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.hh
short/3D/PyLith/trunk/libsrc/faults/LiuCosSlipFn.cc
short/3D/PyLith/trunk/libsrc/faults/LiuCosSlipFn.hh
short/3D/PyLith/trunk/libsrc/faults/SlipTimeFn.cc
short/3D/PyLith/trunk/libsrc/faults/SlipTimeFn.hh
short/3D/PyLith/trunk/libsrc/faults/StepSlipFn.cc
short/3D/PyLith/trunk/libsrc/faults/StepSlipFn.hh
short/3D/PyLith/trunk/libsrc/feassemble/Constraint.cc
short/3D/PyLith/trunk/libsrc/feassemble/Constraint.hh
short/3D/PyLith/trunk/libsrc/feassemble/Integrator.cc
short/3D/PyLith/trunk/libsrc/feassemble/Integrator.hh
short/3D/PyLith/trunk/modulesrc/bc/AbsorbingDampers.i
short/3D/PyLith/trunk/modulesrc/bc/BCIntegratorSubMesh.i
short/3D/PyLith/trunk/modulesrc/bc/BoundaryCondition.i
short/3D/PyLith/trunk/modulesrc/bc/BoundaryConditionPoints.i
short/3D/PyLith/trunk/modulesrc/bc/DirichletBC.i
short/3D/PyLith/trunk/modulesrc/bc/DirichletBoundary.i
short/3D/PyLith/trunk/modulesrc/bc/Neumann.i
short/3D/PyLith/trunk/modulesrc/bc/PointForce.i
short/3D/PyLith/trunk/modulesrc/bc/TimeDependent.i
short/3D/PyLith/trunk/modulesrc/bc/TimeDependentPoints.i
short/3D/PyLith/trunk/modulesrc/faults/BruneSlipFn.i
short/3D/PyLith/trunk/modulesrc/faults/ConstRateSlipFn.i
short/3D/PyLith/trunk/modulesrc/faults/EqKinSrc.i
short/3D/PyLith/trunk/modulesrc/faults/Fault.i
short/3D/PyLith/trunk/modulesrc/faults/FaultCohesive.i
short/3D/PyLith/trunk/modulesrc/faults/FaultCohesiveDyn.i
short/3D/PyLith/trunk/modulesrc/faults/FaultCohesiveKin.i
short/3D/PyLith/trunk/modulesrc/faults/LiuCosSlipFn.i
short/3D/PyLith/trunk/modulesrc/faults/SlipTimeFn.i
short/3D/PyLith/trunk/modulesrc/faults/StepSlipFn.i
short/3D/PyLith/trunk/pylith/perf/Field.py
short/3D/PyLith/trunk/pylith/perf/GlobalOrder.py
short/3D/PyLith/trunk/pylith/perf/Jacobian.py
short/3D/PyLith/trunk/pylith/perf/Material.py
short/3D/PyLith/trunk/pylith/perf/Memory.py
short/3D/PyLith/trunk/pylith/perf/Mesh.py
short/3D/PyLith/trunk/pylith/perf/VertexGroup.py
Log:
Worked on adding deallocation() methods to allow explicit deallocation from Python.
Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/TODO 2009-06-11 05:41:22 UTC (rev 15192)
@@ -48,8 +48,17 @@
Add _cleanup() to components to deallocate local data structures.
Add cleanup() to non-components to deallocate local data structures.
+ Need to call parent deallocate() but not objects deallocate.
+ bc C++, SWIG
+ faults C++, SWIG
+
2. Add missing unit tests
+ add test_factory() methods to Python unit tests
+
+ pytests
+ test_configure
+
libtests/topology/TestMesh::testNondimensionalize()
libtests/topology/Field add constraints to field in unit tests
@@ -62,11 +71,6 @@
pytests.meshio.TestOutputMatElastic
pytests.meshio.TestOutputNeumann
- add test_factory() methods to Python unit tests
-
- pytests
- test_configure
-
libtests/materials
Cleanup dbToStateVars for Maxwell models (use ids don't just copy)
Cleanup testUpdateStateVars for Maxwell models
@@ -87,27 +91,26 @@
propertyField()
stateVarField()
- Need unit tests
- MeshIO::normalizer()
- Material::normalizer()
- Constraint::normalizer()
- Integrator::normalizer()
- DataWriter::normalizer()
+ MeshIO::normalizer()
+ Material::normalizer()
+ Constraint::normalizer()
+ Integrator::normalizer()
+ DataWriter::normalizer()
- Mesh::coneSize()
- Mesh::numVertices()
- Mesh::numCells()
- TimeDependentPoints::parameterFields()
- Material::propertiesField()
- Material::stateVarsField()
+ Mesh::coneSize()
+ Mesh::numVertices()
+ Mesh::numCells()
+ TimeDependentPoints::parameterFields()
+ Material::propertiesField()
+ Material::stateVarsField()
- MeshOps::numMaterialCells()
+ MeshOps::numMaterialCells()
- PetscApplication.compilePerformanceLog()
- PetscComponent.compilePerformanceLog()
- Material.ncells
- MemoryLogger.logMesh()
- MemoryLogger.logMaterial()
+ PetscApplication.compilePerformanceLog()
+ PetscComponent.compilePerformanceLog()
+ Material.ncells
+ MemoryLogger.logMesh()
+ MemoryLogger.logMaterial()
3. Update manual for version 1.4 [Brad and Charles]
Modified: short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.cc 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.cc 2009-06-11 05:41:22 UTC (rev 15192)
@@ -49,10 +49,18 @@
// Destructor.
pylith::bc::AbsorbingDampers::~AbsorbingDampers(void)
{ // destructor
- _db = 0; // :TODO: Use shared pointer
+ deallocate();
} // destructor
// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+void
+pylith::bc::AbsorbingDampers::deallocate(void)
+{ // deallocate
+ _db = 0; // :TODO: Use shared pointer
+} // deallocate
+
+// ----------------------------------------------------------------------
// Initialize boundary condition. Determine orienation and compute traction
// vector at integration points.
void
Modified: short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.hh 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.hh 2009-06-11 05:41:22 UTC (rev 15192)
@@ -67,6 +67,10 @@
/// Destructor.
~AbsorbingDampers(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set database for boundary condition parameters.
*
* @param db Spatial database
Modified: short/3D/PyLith/trunk/libsrc/bc/BCIntegratorSubMesh.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/BCIntegratorSubMesh.cc 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/bc/BCIntegratorSubMesh.cc 2009-06-11 05:41:22 UTC (rev 15192)
@@ -31,21 +31,32 @@
// Destructor.
pylith::bc::BCIntegratorSubMesh::~BCIntegratorSubMesh(void)
{ // destructor
- delete _boundaryMesh; _boundaryMesh = 0;
- delete _parameters; _parameters = 0;
+ deallocate();
} // destructor
// ----------------------------------------------------------------------
+// Deallocate data structures.
+void
+pylith::bc::BCIntegratorSubMesh::deallocate(void)
+{ // deallocate
+ BoundaryCondition::deallocate();
+ feassemble::Integrator<feassemble::Quadrature<topology::SubMesh> >::deallocate();
+
+ delete _boundaryMesh; _boundaryMesh = 0;
+ delete _parameters; _parameters = 0;
+} // deallocate
+
+// ----------------------------------------------------------------------
// Get submesh associated with boundary condition.
void
pylith::bc::BCIntegratorSubMesh::createSubMesh(const topology::Mesh& mesh)
-{ // _createSubMesh
+{ // createSubMesh
delete _boundaryMesh; _boundaryMesh = 0;
delete _parameters; _parameters = 0;
_boundaryMesh = new topology::SubMesh(mesh, _label.c_str());
assert(0 != _boundaryMesh);
-} // _createSubMesh
+} // createSubMesh
// ----------------------------------------------------------------------
// Verify configuration is acceptable.
Modified: short/3D/PyLith/trunk/libsrc/bc/BCIntegratorSubMesh.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/BCIntegratorSubMesh.hh 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/bc/BCIntegratorSubMesh.hh 2009-06-11 05:41:22 UTC (rev 15192)
@@ -47,6 +47,10 @@
virtual
~BCIntegratorSubMesh(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Get parameter fields.
*
* @returns Parameter fields.
Modified: short/3D/PyLith/trunk/libsrc/bc/BoundaryCondition.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/BoundaryCondition.cc 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/bc/BoundaryCondition.cc 2009-06-11 05:41:22 UTC (rev 15192)
@@ -32,6 +32,13 @@
} // destructor
// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+void
+pylith::bc::BoundaryCondition::deallocate(void)
+{ // deallocate
+} // deallocate
+
+// ----------------------------------------------------------------------
// Verify configuration is acceptable.
void
pylith::bc::BoundaryCondition::verifyConfiguration(const topology::Mesh& mesh) const
Modified: short/3D/PyLith/trunk/libsrc/bc/BoundaryCondition.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/BoundaryCondition.hh 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/bc/BoundaryCondition.hh 2009-06-11 05:41:22 UTC (rev 15192)
@@ -46,6 +46,10 @@
virtual
~BoundaryCondition(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set label of boundary condition surface.
*
* @param value Label of surface (from mesh generator).
Modified: short/3D/PyLith/trunk/libsrc/bc/BoundaryConditionPoints.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/BoundaryConditionPoints.cc 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/bc/BoundaryConditionPoints.cc 2009-06-11 05:41:22 UTC (rev 15192)
@@ -34,10 +34,19 @@
// Destructor.
pylith::bc::BoundaryConditionPoints::~BoundaryConditionPoints(void)
{ // destructor
- delete _parameters; _parameters = 0;
+ deallocate();
} // destructor
// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+void
+pylith::bc::BoundaryConditionPoints::deallocate(void)
+{ // deallocate
+ BoundaryCondition::deallocate();
+ delete _parameters; _parameters = 0;
+} // deallocate
+
+// ----------------------------------------------------------------------
// Get parameter fields.
const pylith::topology::Fields<pylith::topology::Field<pylith::topology::Mesh> >*
pylith::bc::BoundaryConditionPoints::parameterFields(void) const
Modified: short/3D/PyLith/trunk/libsrc/bc/BoundaryConditionPoints.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/BoundaryConditionPoints.hh 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/bc/BoundaryConditionPoints.hh 2009-06-11 05:41:22 UTC (rev 15192)
@@ -41,6 +41,10 @@
virtual
~BoundaryConditionPoints(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Get parameter fields.
*
* @returns Parameter fields.
Modified: short/3D/PyLith/trunk/libsrc/bc/DirichletBC.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/DirichletBC.cc 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/bc/DirichletBC.cc 2009-06-11 05:41:22 UTC (rev 15192)
@@ -42,6 +42,15 @@
} // destructor
// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+void
+pylith::bc::DirichletBC::deallocate(void)
+{ // deallocate
+ TimeDependentPoints::deallocate();
+ feassemble::Constraint::deallocate();
+} // deallocate
+
+// ----------------------------------------------------------------------
// Initialize boundary condition.
void
pylith::bc::DirichletBC::initialize(const topology::Mesh& mesh,
Modified: short/3D/PyLith/trunk/libsrc/bc/DirichletBC.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/DirichletBC.hh 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/bc/DirichletBC.hh 2009-06-11 05:41:22 UTC (rev 15192)
@@ -40,6 +40,10 @@
/// Destructor.
~DirichletBC(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Initialize boundary condition.
*
* @param mesh PETSc mesh
Modified: short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.cc 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.cc 2009-06-11 05:41:22 UTC (rev 15192)
@@ -38,11 +38,21 @@
// Destructor.
pylith::bc::DirichletBoundary::~DirichletBoundary(void)
{ // destructor
- delete _boundaryMesh; _boundaryMesh = 0;
- delete _outputFields; _outputFields = 0;
+ deallocate();
} // destructor
// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+void
+pylith::bc::DirichletBoundary::deallocate(void)
+{ // deallocate
+ DirichletBC::deallocate();
+
+ delete _boundaryMesh; _boundaryMesh = 0;
+ delete _outputFields; _outputFields = 0;
+} // deallocate
+
+// ----------------------------------------------------------------------
// Initialize boundary condition.
void
pylith::bc::DirichletBoundary::initialize(const topology::Mesh& mesh,
Modified: short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.hh 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.hh 2009-06-11 05:41:22 UTC (rev 15192)
@@ -36,6 +36,10 @@
/// Destructor.
~DirichletBoundary(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Initialize boundary condition.
*
* @param mesh Finite-element mesh.
Modified: short/3D/PyLith/trunk/libsrc/bc/Neumann.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/Neumann.cc 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/bc/Neumann.cc 2009-06-11 05:41:22 UTC (rev 15192)
@@ -46,10 +46,18 @@
// Destructor.
pylith::bc::Neumann::~Neumann(void)
{ // destructor
- _db = 0; // :TODO: Use shared pointer
+ deallocate();
} // destructor
// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+void
+pylith::bc::Neumann::deallocate(void)
+{ // deallocate
+ _db = 0; // :TODO: Use shared pointer
+} // deallocate
+
+// ----------------------------------------------------------------------
// Initialize boundary condition. Determine orienation and compute traction
// vector at integration points.
void
Modified: short/3D/PyLith/trunk/libsrc/bc/Neumann.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/Neumann.hh 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/bc/Neumann.hh 2009-06-11 05:41:22 UTC (rev 15192)
@@ -35,7 +35,11 @@
/// Destructor.
~Neumann(void);
-
+
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set database for boundary condition parameters.
*
* @param db Spatial database
Modified: short/3D/PyLith/trunk/libsrc/bc/PointForce.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/PointForce.cc 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/bc/PointForce.cc 2009-06-11 05:41:22 UTC (rev 15192)
@@ -38,9 +38,19 @@
// Destructor.
pylith::bc::PointForce::~PointForce(void)
{ // destructor
+ deallocate();
} // destructor
// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+void
+pylith::bc::PointForce::deallocate(void)
+{ // deallocate
+ TimeDependentPoints::deallocate();
+ feassemble::Integrator<feassemble::Quadrature<topology::Mesh> >::deallocate();
+} // deallocate
+
+// ----------------------------------------------------------------------
// Initialize boundary condition.
void
pylith::bc::PointForce::initialize(const topology::Mesh& mesh,
Modified: short/3D/PyLith/trunk/libsrc/bc/PointForce.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/PointForce.hh 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/bc/PointForce.hh 2009-06-11 05:41:22 UTC (rev 15192)
@@ -39,6 +39,10 @@
/// Destructor.
~PointForce(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Initialize boundary condition.
*
* @param mesh PETSc mesh
Modified: short/3D/PyLith/trunk/libsrc/bc/TimeDependent.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/TimeDependent.cc 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/bc/TimeDependent.cc 2009-06-11 05:41:22 UTC (rev 15192)
@@ -35,12 +35,20 @@
// Destructor.
pylith::bc::TimeDependent::~TimeDependent(void)
{ // destructor
+ deallocate();
+} // destructor
+
+// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+void
+pylith::bc::TimeDependent::deallocate(void)
+{ // deallocate
_dbInitial = 0; // TODO: Use shared pointers
_dbRate = 0; // TODO: Use shared pointers
_dbChange = 0; // TODO: Use shared pointers
_dbTimeHistory = 0; // TODO: Use shared pointers
-} // destructor
-
+} // deallocate
+
// ----------------------------------------------------------------------
// Set indices of vertices with point forces.
void
Modified: short/3D/PyLith/trunk/libsrc/bc/TimeDependent.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/TimeDependent.hh 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/bc/TimeDependent.hh 2009-06-11 05:41:22 UTC (rev 15192)
@@ -40,6 +40,10 @@
/// Destructor.
~TimeDependent(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set indices of degrees of freedom associated with BC.
*
* Note: Forces at all points are applied to the same degrees of freedom.
Modified: short/3D/PyLith/trunk/libsrc/bc/TimeDependentPoints.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/TimeDependentPoints.cc 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/bc/TimeDependentPoints.cc 2009-06-11 05:41:22 UTC (rev 15192)
@@ -41,9 +41,19 @@
// Destructor.
pylith::bc::TimeDependentPoints::~TimeDependentPoints(void)
{ // destructor
+ deallocate();
} // destructor
// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+void
+pylith::bc::TimeDependentPoints::deallocate(void)
+{ // deallocate
+ BoundaryConditionPoints::deallocate();
+ TimeDependent::deallocate();
+} // deallocate
+
+// ----------------------------------------------------------------------
// Query databases for parameters.
void
pylith::bc::TimeDependentPoints::_queryDatabases(const topology::Mesh& mesh,
Modified: short/3D/PyLith/trunk/libsrc/bc/TimeDependentPoints.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/TimeDependentPoints.hh 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/bc/TimeDependentPoints.hh 2009-06-11 05:41:22 UTC (rev 15192)
@@ -40,6 +40,10 @@
/// Destructor.
~TimeDependentPoints(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
// PROTECTED METHODS //////////////////////////////////////////////////
protected :
Modified: short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.cc 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.cc 2009-06-11 05:41:22 UTC (rev 15192)
@@ -46,11 +46,21 @@
// Destructor.
pylith::faults::BruneSlipFn::~BruneSlipFn(void)
{ // destructor
+ deallocate();
+} // destructor
+
+// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+void
+pylith::faults::BruneSlipFn::deallocate(void)
+{ // deallocate
+ SlipTimeFn::deallocate();
+
_dbFinalSlip = 0; // :TODO: Use shared pointer.
_dbSlipTime = 0; // :TODO: Use shared pointer.
_dbRiseTime = 0; // :TODO: Use shared pointer.
-} // destructor
-
+} // deallocate
+
// ----------------------------------------------------------------------
// Initialize slip time function.
void
Modified: short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.hh 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.hh 2009-06-11 05:41:22 UTC (rev 15192)
@@ -45,6 +45,10 @@
/// Destructor.
~BruneSlipFn(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set spatial database for final slip.
*
* @param db Spatial database
Modified: short/3D/PyLith/trunk/libsrc/faults/ConstRateSlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/ConstRateSlipFn.cc 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/faults/ConstRateSlipFn.cc 2009-06-11 05:41:22 UTC (rev 15192)
@@ -44,11 +44,21 @@
// Destructor.
pylith::faults::ConstRateSlipFn::~ConstRateSlipFn(void)
{ // destructor
- _dbSlipRate = 0; // :TODO: Use shared pointer.
- _dbSlipTime = 0; // :TODO: Use shared pointer.
+ deallocate();
} // destructor
// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+void
+pylith::faults::ConstRateSlipFn::deallocate(void)
+{ // deallocate
+ SlipTimeFn::deallocate();
+
+ _dbSlipRate = 0; // :TODO: Use shared pointer.
+ _dbSlipTime = 0; // :TODO: Use shared pointer.
+} // deallocate
+
+// ----------------------------------------------------------------------
// Initialize slip time function.
void
pylith::faults::ConstRateSlipFn::initialize(
Modified: short/3D/PyLith/trunk/libsrc/faults/ConstRateSlipFn.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/ConstRateSlipFn.hh 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/faults/ConstRateSlipFn.hh 2009-06-11 05:41:22 UTC (rev 15192)
@@ -44,6 +44,10 @@
/// Destructor.
~ConstRateSlipFn(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set spatial database for slip rate.
*
* @param db Spatial database
Modified: short/3D/PyLith/trunk/libsrc/faults/EqKinSrc.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/EqKinSrc.cc 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/faults/EqKinSrc.cc 2009-06-11 05:41:22 UTC (rev 15192)
@@ -32,10 +32,18 @@
// Destructor.
pylith::faults::EqKinSrc::~EqKinSrc(void)
{ // destructor
- _slipfn = 0; // :TODO: Use shared pointer.
+ deallocate();
} // destructor
// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+void
+pylith::faults::EqKinSrc::deallocate(void)
+{ // deallocate
+ _slipfn = 0; // :TODO: Use shared pointer.
+} // deallocate
+
+// ----------------------------------------------------------------------
// Set origin time for earthquake source.
void
pylith::faults::EqKinSrc::originTime(const double value)
Modified: short/3D/PyLith/trunk/libsrc/faults/EqKinSrc.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/EqKinSrc.hh 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/faults/EqKinSrc.hh 2009-06-11 05:41:22 UTC (rev 15192)
@@ -43,6 +43,10 @@
/// Destructor.
~EqKinSrc(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set origin time for earthquake source.
*
* @param value Origin time for earthquake source.
Modified: short/3D/PyLith/trunk/libsrc/faults/Fault.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/Fault.cc 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/faults/Fault.cc 2009-06-11 05:41:22 UTC (rev 15192)
@@ -29,10 +29,18 @@
// Destructor.
pylith::faults::Fault::~Fault(void)
{ // destructor
- delete _faultMesh; _faultMesh = 0;
+ deallocate();
} // destructor
// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+void
+pylith::faults::Fault::deallocate(void)
+{ // deallocate
+ delete _faultMesh; _faultMesh = 0;
+} // deallocate
+
+// ----------------------------------------------------------------------
// Get mesh associated with fault fields.
const pylith::topology::SubMesh&
pylith::faults::Fault:: faultMesh(void) const
Modified: short/3D/PyLith/trunk/libsrc/faults/Fault.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/Fault.hh 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/faults/Fault.hh 2009-06-11 05:41:22 UTC (rev 15192)
@@ -49,6 +49,10 @@
virtual
~Fault(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set material identifier of fault.
*
* @param value Fault identifier
Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc 2009-06-11 05:41:22 UTC (rev 15192)
@@ -34,9 +34,18 @@
// Destructor.
pylith::faults::FaultCohesive::~FaultCohesive(void)
{ // destructor
+ deallocate();
} // destructor
// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+void
+pylith::faults::FaultCohesive::deallocate(void)
+{ // deallocate
+ Fault::deallocate();
+} // deallocate
+
+// ----------------------------------------------------------------------
// Set flag for using fault mesh or group of vertices to define
// fault surface.
void
Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.hh 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.hh 2009-06-11 05:41:22 UTC (rev 15192)
@@ -37,6 +37,10 @@
virtual
~FaultCohesive(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set flag for using fault mesh or group of vertices to define
* fault surface.
*
Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveDyn.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveDyn.cc 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveDyn.cc 2009-06-11 05:41:22 UTC (rev 15192)
@@ -31,9 +31,18 @@
// Destructor.
pylith::faults::FaultCohesiveDyn::~FaultCohesiveDyn(void)
{ // destructor
+ deallocate();
} // destructor
// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+void
+pylith::faults::FaultCohesiveDyn::deallocate(void)
+{ // deallocate
+ FaultCohesive::deallocate();
+} // deallocate
+
+// ----------------------------------------------------------------------
// Initialize fault. Determine orientation and setup boundary
void
pylith::faults::FaultCohesiveDyn::initialize(const topology::Mesh& mesh,
Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveDyn.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveDyn.hh 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveDyn.hh 2009-06-11 05:41:22 UTC (rev 15192)
@@ -46,6 +46,10 @@
virtual
~FaultCohesiveDyn(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Initialize fault. Determine orientation and setup boundary
* condition parameters.
*
Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc 2009-06-11 05:41:22 UTC (rev 15192)
@@ -57,11 +57,21 @@
// Destructor.
pylith::faults::FaultCohesiveKin::~FaultCohesiveKin(void)
{ // destructor
- delete _fields; _fields = 0;
- // :TODO: Use shared pointers for earthquake sources
+ deallocate();
} // destructor
// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+void
+pylith::faults::FaultCohesiveKin::deallocate(void)
+{ // deallocate
+ FaultCohesive::deallocate();
+
+ delete _fields; _fields = 0;
+ // :TODO: Use shared pointers for earthquake sources
+} // deallocate
+
+// ----------------------------------------------------------------------
// Set kinematic earthquake source.
void
pylith::faults::FaultCohesiveKin::eqsrcs(const char* const* names,
Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.hh 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.hh 2009-06-11 05:41:22 UTC (rev 15192)
@@ -63,6 +63,10 @@
virtual
~FaultCohesiveKin(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set kinematic earthquake sources.
*
* @param names Array of kinematic earthquake source names.
Modified: short/3D/PyLith/trunk/libsrc/faults/LiuCosSlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/LiuCosSlipFn.cc 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/faults/LiuCosSlipFn.cc 2009-06-11 05:41:22 UTC (rev 15192)
@@ -46,11 +46,21 @@
// Destructor.
pylith::faults::LiuCosSlipFn::~LiuCosSlipFn(void)
{ // destructor
+ deallocate();
+} // destructor
+
+// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+void
+pylith::faults::LiuCosSlipFn::deallocate(void)
+{ // deallocate
+ SlipTimeFn::deallocate();
+
_dbFinalSlip = 0; // :TODO: Use shared pointer.
_dbSlipTime = 0; // :TODO: Use shared pointer.
_dbRiseTime = 0; // :TODO: Use shared pointer.
-} // destructor
-
+} // deallocate
+
// ----------------------------------------------------------------------
// Initialize slip time function.
void
Modified: short/3D/PyLith/trunk/libsrc/faults/LiuCosSlipFn.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/LiuCosSlipFn.hh 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/faults/LiuCosSlipFn.hh 2009-06-11 05:41:22 UTC (rev 15192)
@@ -43,6 +43,10 @@
/// Destructor.
~LiuCosSlipFn(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set spatial database for final slip.
*
* @param db Spatial database
Modified: short/3D/PyLith/trunk/libsrc/faults/SlipTimeFn.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/SlipTimeFn.cc 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/faults/SlipTimeFn.cc 2009-06-11 05:41:22 UTC (rev 15192)
@@ -29,8 +29,16 @@
// Destructor.
pylith::faults::SlipTimeFn::~SlipTimeFn(void)
{ // destructor
- delete _parameters; _parameters = 0;
+ deallocate();
} // destructor
+// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+void
+pylith::faults::SlipTimeFn::deallocate(void)
+{ // deallocate
+ delete _parameters; _parameters = 0;
+} // deallocate
+
// End of file
Modified: short/3D/PyLith/trunk/libsrc/faults/SlipTimeFn.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/SlipTimeFn.hh 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/faults/SlipTimeFn.hh 2009-06-11 05:41:22 UTC (rev 15192)
@@ -43,6 +43,10 @@
virtual
~SlipTimeFn(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Initialize slip time function.
*
* @param faultMesh Finite-element mesh of fault.
Modified: short/3D/PyLith/trunk/libsrc/faults/StepSlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/StepSlipFn.cc 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/faults/StepSlipFn.cc 2009-06-11 05:41:22 UTC (rev 15192)
@@ -44,11 +44,21 @@
// Destructor.
pylith::faults::StepSlipFn::~StepSlipFn(void)
{ // destructor
- _dbFinalSlip = 0; // :TODO: Use shared pointer
- _dbSlipTime = 0; // :TODO: Use shared pointer
+ deallocate();
} // destructor
// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+void
+pylith::faults::StepSlipFn::deallocate(void)
+{ // deallocate
+ SlipTimeFn::deallocate();
+
+ _dbFinalSlip = 0; // :TODO: Use shared pointer
+ _dbSlipTime = 0; // :TODO: Use shared pointer
+} // deallocate
+
+// ----------------------------------------------------------------------
// Initialize slip time function.
void
pylith::faults::StepSlipFn::initialize(
Modified: short/3D/PyLith/trunk/libsrc/faults/StepSlipFn.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/StepSlipFn.hh 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/faults/StepSlipFn.hh 2009-06-11 05:41:22 UTC (rev 15192)
@@ -41,6 +41,10 @@
/// Destructor.
~StepSlipFn(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set spatial database for final slip.
*
* @param db Spatial database
Modified: short/3D/PyLith/trunk/libsrc/feassemble/Constraint.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Constraint.cc 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Constraint.cc 2009-06-11 05:41:22 UTC (rev 15192)
@@ -28,10 +28,18 @@
// Destructor.
pylith::feassemble::Constraint::~Constraint(void)
{ // destructor
- delete _normalizer; _normalizer = 0;
+ deallocate();
} // destructor
// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+void
+pylith::feassemble::Constraint::deallocate(void)
+{ // deallocate
+ delete _normalizer; _normalizer = 0;
+} // deallocate
+
+// ----------------------------------------------------------------------
// Set manager of scales used to nondimensionalize problem.
void
pylith::feassemble::Constraint::normalizer(const spatialdata::units::Nondimensional& dim)
Modified: short/3D/PyLith/trunk/libsrc/feassemble/Constraint.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Constraint.hh 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Constraint.hh 2009-06-11 05:41:22 UTC (rev 15192)
@@ -40,6 +40,10 @@
virtual
~Constraint(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set manager of scales used to nondimensionalize problem.
*
* @param dim Nondimensionalizer.
Modified: short/3D/PyLith/trunk/libsrc/feassemble/Integrator.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Integrator.cc 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Integrator.cc 2009-06-11 05:41:22 UTC (rev 15192)
@@ -40,11 +40,20 @@
template<typename quadrature_type>
pylith::feassemble::Integrator<quadrature_type>::~Integrator(void)
{ // destructor
+ deallocate();
+ _gravityField = 0; /// Memory managed elsewhere :TODO: use shared pointer
+} // destructor
+
+// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+template<typename quadrature_type>
+void
+pylith::feassemble::Integrator<quadrature_type>::deallocate(void)
+{ // deallocate
delete _quadrature; _quadrature = 0;
delete _normalizer; _normalizer = 0;
delete _logger; _logger = 0;
- _gravityField = 0; /// Memory managed elsewhere :TODO: use shared pointer
-} // destructor
+} // deallocate
// ----------------------------------------------------------------------
// Get quadrature for integrating finite-element quantities.
Modified: short/3D/PyLith/trunk/libsrc/feassemble/Integrator.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Integrator.hh 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Integrator.hh 2009-06-11 05:41:22 UTC (rev 15192)
@@ -51,6 +51,10 @@
virtual
~Integrator(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Get the quadrature for integrating finite-element
* quantities.
*
Modified: short/3D/PyLith/trunk/modulesrc/bc/AbsorbingDampers.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/bc/AbsorbingDampers.i 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/modulesrc/bc/AbsorbingDampers.i 2009-06-11 05:41:22 UTC (rev 15192)
@@ -30,6 +30,10 @@
/// Destructor.
~AbsorbingDampers(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set database for boundary condition parameters.
*
* @param db Spatial database
Modified: short/3D/PyLith/trunk/modulesrc/bc/BCIntegratorSubMesh.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/bc/BCIntegratorSubMesh.i 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/modulesrc/bc/BCIntegratorSubMesh.i 2009-06-11 05:41:22 UTC (rev 15192)
@@ -32,6 +32,10 @@
virtual
~BCIntegratorSubMesh(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Get parameter fields.
*
* @returns Parameter fields.
Modified: short/3D/PyLith/trunk/modulesrc/bc/BoundaryCondition.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/bc/BoundaryCondition.i 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/modulesrc/bc/BoundaryCondition.i 2009-06-11 05:41:22 UTC (rev 15192)
@@ -31,6 +31,10 @@
virtual
~BoundaryCondition(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set label of boundary condition surface.
*
* @param value Label of surface (from mesh generator).
Modified: short/3D/PyLith/trunk/modulesrc/bc/BoundaryConditionPoints.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/bc/BoundaryConditionPoints.i 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/modulesrc/bc/BoundaryConditionPoints.i 2009-06-11 05:41:22 UTC (rev 15192)
@@ -31,6 +31,10 @@
virtual
~BoundaryConditionPoints(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
}; // class BoundaryConditionPoints
} // bc
Modified: short/3D/PyLith/trunk/modulesrc/bc/DirichletBC.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/bc/DirichletBC.i 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/modulesrc/bc/DirichletBC.i 2009-06-11 05:41:22 UTC (rev 15192)
@@ -31,6 +31,10 @@
/// Destructor.
~DirichletBC(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Initialize boundary condition.
*
* @param mesh PETSc mesh
Modified: short/3D/PyLith/trunk/modulesrc/bc/DirichletBoundary.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/bc/DirichletBoundary.i 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/modulesrc/bc/DirichletBoundary.i 2009-06-11 05:41:22 UTC (rev 15192)
@@ -30,6 +30,10 @@
/// Destructor.
~DirichletBoundary(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Initialize boundary condition.
*
* @param mesh Finite-element mesh.
Modified: short/3D/PyLith/trunk/modulesrc/bc/Neumann.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/bc/Neumann.i 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/modulesrc/bc/Neumann.i 2009-06-11 05:41:22 UTC (rev 15192)
@@ -30,6 +30,10 @@
/// Destructor.
~Neumann(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set database for boundary condition parameters.
*
* @param db Spatial database
Modified: short/3D/PyLith/trunk/modulesrc/bc/PointForce.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/bc/PointForce.i 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/modulesrc/bc/PointForce.i 2009-06-11 05:41:22 UTC (rev 15192)
@@ -31,6 +31,10 @@
/// Destructor.
~PointForce(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Initialize boundary condition.
*
* @param mesh PETSc mesh
Modified: short/3D/PyLith/trunk/modulesrc/bc/TimeDependent.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/bc/TimeDependent.i 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/modulesrc/bc/TimeDependent.i 2009-06-11 05:41:22 UTC (rev 15192)
@@ -30,7 +30,10 @@
/// Destructor.
~TimeDependent(void);
-
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set indices of degrees of freedom associated with BC.
*
* Note: Forces at all points are applied to the same degrees of freedom.
Modified: short/3D/PyLith/trunk/modulesrc/bc/TimeDependentPoints.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/bc/TimeDependentPoints.i 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/modulesrc/bc/TimeDependentPoints.i 2009-06-11 05:41:22 UTC (rev 15192)
@@ -31,6 +31,10 @@
/// Destructor.
~TimeDependentPoints(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
// PROTECTED METHODS //////////////////////////////////////////////
protected :
Modified: short/3D/PyLith/trunk/modulesrc/faults/BruneSlipFn.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/faults/BruneSlipFn.i 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/modulesrc/faults/BruneSlipFn.i 2009-06-11 05:41:22 UTC (rev 15192)
@@ -30,6 +30,10 @@
/// Destructor.
~BruneSlipFn(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set spatial database for final slip.
*
* @param db Spatial database
Modified: short/3D/PyLith/trunk/modulesrc/faults/ConstRateSlipFn.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/faults/ConstRateSlipFn.i 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/modulesrc/faults/ConstRateSlipFn.i 2009-06-11 05:41:22 UTC (rev 15192)
@@ -30,6 +30,10 @@
/// Destructor.
~ConstRateSlipFn(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set spatial database for slip rate.
*
* @param db Spatial database
Modified: short/3D/PyLith/trunk/modulesrc/faults/EqKinSrc.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/faults/EqKinSrc.i 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/modulesrc/faults/EqKinSrc.i 2009-06-11 05:41:22 UTC (rev 15192)
@@ -30,6 +30,10 @@
/// Destructor.
~EqKinSrc(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set origin time for earthquake source.
*
* @param value Origin time for earthquake source.
Modified: short/3D/PyLith/trunk/modulesrc/faults/Fault.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/faults/Fault.i 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/modulesrc/faults/Fault.i 2009-06-11 05:41:22 UTC (rev 15192)
@@ -31,6 +31,10 @@
virtual
~Fault(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set material identifier of fault.
*
* @param value Fault identifier
Modified: short/3D/PyLith/trunk/modulesrc/faults/FaultCohesive.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/faults/FaultCohesive.i 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/modulesrc/faults/FaultCohesive.i 2009-06-11 05:41:22 UTC (rev 15192)
@@ -31,6 +31,10 @@
virtual
~FaultCohesive(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set flag for using fault mesh or group of vertices to define
* fault surface.
*
Modified: short/3D/PyLith/trunk/modulesrc/faults/FaultCohesiveDyn.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/faults/FaultCohesiveDyn.i 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/modulesrc/faults/FaultCohesiveDyn.i 2009-06-11 05:41:22 UTC (rev 15192)
@@ -32,6 +32,10 @@
virtual
~FaultCohesiveDyn(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Initialize fault. Determine orientation and setup boundary
* condition parameters.
*
Modified: short/3D/PyLith/trunk/modulesrc/faults/FaultCohesiveKin.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/faults/FaultCohesiveKin.i 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/modulesrc/faults/FaultCohesiveKin.i 2009-06-11 05:41:22 UTC (rev 15192)
@@ -32,6 +32,10 @@
virtual
~FaultCohesiveKin(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set kinematic earthquake sources.
*
* @param names Array of kinematic earthquake source names.
Modified: short/3D/PyLith/trunk/modulesrc/faults/LiuCosSlipFn.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/faults/LiuCosSlipFn.i 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/modulesrc/faults/LiuCosSlipFn.i 2009-06-11 05:41:22 UTC (rev 15192)
@@ -30,6 +30,10 @@
/// Destructor.
~LiuCosSlipFn(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set spatial database for final slip.
*
* @param db Spatial database
Modified: short/3D/PyLith/trunk/modulesrc/faults/SlipTimeFn.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/faults/SlipTimeFn.i 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/modulesrc/faults/SlipTimeFn.i 2009-06-11 05:41:22 UTC (rev 15192)
@@ -31,6 +31,10 @@
virtual
~SlipTimeFn(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Initialize slip time function.
*
* @param faultMesh Finite-element mesh of fault.
Modified: short/3D/PyLith/trunk/modulesrc/faults/StepSlipFn.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/faults/StepSlipFn.i 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/modulesrc/faults/StepSlipFn.i 2009-06-11 05:41:22 UTC (rev 15192)
@@ -30,6 +30,10 @@
/// Destructor.
~StepSlipFn(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set spatial database for final slip.
*
* @param db Spatial database
Modified: short/3D/PyLith/trunk/pylith/perf/Field.py
===================================================================
--- short/3D/PyLith/trunk/pylith/perf/Field.py 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/pylith/perf/Field.py 2009-06-11 05:41:22 UTC (rev 15192)
@@ -1,5 +1,19 @@
#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+# Brad T. Aagaard
+# U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+## @file pylith/perf/Field.py
+##
+## @brief Python memory model for field.
+
from Memory import Memory
class Field(Memory):
@@ -27,3 +41,6 @@
if __name__ == '__main__':
print 'Memory:',Material('rock', 35).tabulate()
+
+
+# End of file
Modified: short/3D/PyLith/trunk/pylith/perf/GlobalOrder.py
===================================================================
--- short/3D/PyLith/trunk/pylith/perf/GlobalOrder.py 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/pylith/perf/GlobalOrder.py 2009-06-11 05:41:22 UTC (rev 15192)
@@ -1,5 +1,19 @@
#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+# Brad T. Aagaard
+# U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+## @file pylith/perf/GlobalOrder.py
+##
+## @brief Python memory model for global order.
+
from Memory import Memory
class GlobalOrder(Memory):
@@ -23,3 +37,6 @@
memDict[self.label] = 0
memDict[self.label] += self.chartSize*(3 * self.sizeInt + self.sizeMapEntry) + self.chartSize*(self.sizeSetEntry+self.sizeInt)
return
+
+
+# End of file
Modified: short/3D/PyLith/trunk/pylith/perf/Jacobian.py
===================================================================
--- short/3D/PyLith/trunk/pylith/perf/Jacobian.py 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/pylith/perf/Jacobian.py 2009-06-11 05:41:22 UTC (rev 15192)
@@ -1,5 +1,19 @@
#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+# Brad T. Aagaard
+# U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+## @file pylith/perf/Jacobian.py
+##
+## @brief Python memory model for Jacobian sparse matrix.
+
from Memory import Memory
class Jacobian(Memory):
@@ -22,3 +36,6 @@
memDict[self.label] = 0
memDict[self.label] += 0
return
+
+
+# End of file
Modified: short/3D/PyLith/trunk/pylith/perf/Material.py
===================================================================
--- short/3D/PyLith/trunk/pylith/perf/Material.py 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/pylith/perf/Material.py 2009-06-11 05:41:22 UTC (rev 15192)
@@ -1,5 +1,19 @@
#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+# Brad T. Aagaard
+# U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+## @file pylith/perf/Material.py
+##
+## @brief Python memory model for material.
+
from Memory import Memory
class Material(Memory):
@@ -25,3 +39,6 @@
if __name__ == '__main__':
print 'Memory:',Material('rock', 35).tabulate()
+
+
+# End of file
Modified: short/3D/PyLith/trunk/pylith/perf/Memory.py
===================================================================
--- short/3D/PyLith/trunk/pylith/perf/Memory.py 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/pylith/perf/Memory.py 2009-06-11 05:41:22 UTC (rev 15192)
@@ -1,3 +1,19 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+# Brad T. Aagaard
+# U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+## @file pylith/perf/Memory.py
+##
+## @brief Python object for calculating memory usage.
+
class Memory(object):
sizeInt = 4
sizeDouble = 8
@@ -18,3 +34,5 @@
else:
raise RuntimeError('Could not determine the size of a pointer')
+
+# End of file
Modified: short/3D/PyLith/trunk/pylith/perf/Mesh.py
===================================================================
--- short/3D/PyLith/trunk/pylith/perf/Mesh.py 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/pylith/perf/Mesh.py 2009-06-11 05:41:22 UTC (rev 15192)
@@ -1,5 +1,19 @@
#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+# Brad T. Aagaard
+# U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+## @file pylith/perf/Mesh.py
+##
+## @brief Python memory model for Mesh.
+
from Memory import Memory
class Mesh(Memory):
Modified: short/3D/PyLith/trunk/pylith/perf/VertexGroup.py
===================================================================
--- short/3D/PyLith/trunk/pylith/perf/VertexGroup.py 2009-06-11 00:40:55 UTC (rev 15191)
+++ short/3D/PyLith/trunk/pylith/perf/VertexGroup.py 2009-06-11 05:41:22 UTC (rev 15192)
@@ -1,5 +1,19 @@
#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+# Brad T. Aagaard
+# U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+## @file pylith/perf/VertexGroup.py
+##
+## @brief Python memory model for vertex groups.
+
from Memory import Memory
class VertexGroup(Memory):
@@ -27,3 +41,7 @@
if __name__ == '__main__':
print 'Memory:',VertexGroup('rock', 35).tabulate()
+
+
+# End of file
+
More information about the CIG-COMMITS
mailing list