[cig-commits] r15195 - in short/3D/PyLith/trunk: . libsrc/meshio modulesrc/meshio
brad at geodynamics.org
brad at geodynamics.org
Thu Jun 11 10:34:10 PDT 2009
Author: brad
Date: 2009-06-11 10:34:07 -0700 (Thu, 11 Jun 2009)
New Revision: 15195
Modified:
short/3D/PyLith/trunk/TODO
short/3D/PyLith/trunk/libsrc/meshio/CellFilter.cc
short/3D/PyLith/trunk/libsrc/meshio/CellFilter.hh
short/3D/PyLith/trunk/libsrc/meshio/CellFilterAvg.cc
short/3D/PyLith/trunk/libsrc/meshio/CellFilterAvg.hh
short/3D/PyLith/trunk/libsrc/meshio/DataWriter.cc
short/3D/PyLith/trunk/libsrc/meshio/DataWriter.hh
short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.cc
short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.hh
short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc
short/3D/PyLith/trunk/libsrc/meshio/MeshIO.hh
short/3D/PyLith/trunk/libsrc/meshio/MeshIOAscii.cc
short/3D/PyLith/trunk/libsrc/meshio/MeshIOAscii.hh
short/3D/PyLith/trunk/libsrc/meshio/MeshIOCubit.cc
short/3D/PyLith/trunk/libsrc/meshio/MeshIOCubit.hh
short/3D/PyLith/trunk/libsrc/meshio/MeshIOLagrit.cc
short/3D/PyLith/trunk/libsrc/meshio/MeshIOLagrit.hh
short/3D/PyLith/trunk/libsrc/meshio/OutputManager.cc
short/3D/PyLith/trunk/libsrc/meshio/OutputManager.hh
short/3D/PyLith/trunk/libsrc/meshio/OutputSolnSubset.cc
short/3D/PyLith/trunk/libsrc/meshio/OutputSolnSubset.hh
short/3D/PyLith/trunk/libsrc/meshio/VertexFilter.cc
short/3D/PyLith/trunk/libsrc/meshio/VertexFilter.hh
short/3D/PyLith/trunk/libsrc/meshio/VertexFilterVecNorm.cc
short/3D/PyLith/trunk/libsrc/meshio/VertexFilterVecNorm.hh
short/3D/PyLith/trunk/modulesrc/meshio/CellFilter.i
short/3D/PyLith/trunk/modulesrc/meshio/CellFilterAvg.i
short/3D/PyLith/trunk/modulesrc/meshio/DataWriter.i
short/3D/PyLith/trunk/modulesrc/meshio/DataWriterVTK.i
short/3D/PyLith/trunk/modulesrc/meshio/MeshIOAscii.i
short/3D/PyLith/trunk/modulesrc/meshio/MeshIOCubit.i
short/3D/PyLith/trunk/modulesrc/meshio/MeshIOLagrit.i
short/3D/PyLith/trunk/modulesrc/meshio/MeshIOObj.i
short/3D/PyLith/trunk/modulesrc/meshio/OutputManager.i
short/3D/PyLith/trunk/modulesrc/meshio/OutputSolnSubset.i
short/3D/PyLith/trunk/modulesrc/meshio/VertexFilter.i
short/3D/PyLith/trunk/modulesrc/meshio/VertexFilterVecNorm.i
Log:
More work on adding deallocate() methods to allow explicit deallocation from Python.
Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/TODO 2009-06-11 17:34:07 UTC (rev 15195)
@@ -53,6 +53,7 @@
faults C++, SWIG
feassemble C++, SWIG
materials C++, SWIG
+ meshio C++, SWIG
2. Add missing unit tests
Modified: short/3D/PyLith/trunk/libsrc/meshio/CellFilter.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/CellFilter.cc 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/libsrc/meshio/CellFilter.cc 2009-06-11 17:34:07 UTC (rev 15195)
@@ -27,7 +27,7 @@
template<typename mesh_type, typename field_type>
pylith::meshio::CellFilter<mesh_type, field_type>::~CellFilter(void)
{ // destructor
- delete _quadrature; _quadrature = 0;
+ deallocate();
} // destructor
// ----------------------------------------------------------------------
@@ -41,6 +41,15 @@
} // copy constructor
// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+template<typename mesh_type, typename field_type>
+void
+pylith::meshio::CellFilter<mesh_type, field_type>::deallocate(void)
+{ // deallocate
+ delete _quadrature; _quadrature = 0;
+} // deallocate
+
+// ----------------------------------------------------------------------
// Set quadrature associated with cells.
template<typename mesh_type, typename field_type>
void
Modified: short/3D/PyLith/trunk/libsrc/meshio/CellFilter.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/CellFilter.hh 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/libsrc/meshio/CellFilter.hh 2009-06-11 17:34:07 UTC (rev 15195)
@@ -47,6 +47,7 @@
CellFilter(void);
/// Destructor
+ virtual
~CellFilter(void);
/** Create copy of filter.
@@ -56,6 +57,10 @@
virtual
CellFilter* clone(void) const = 0;
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set quadrature associated with cells.
*
* @param q Quadrature for cells.
Modified: short/3D/PyLith/trunk/libsrc/meshio/CellFilterAvg.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/CellFilterAvg.cc 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/libsrc/meshio/CellFilterAvg.cc 2009-06-11 17:34:07 UTC (rev 15195)
@@ -29,10 +29,21 @@
template<typename mesh_type, typename field_type>
pylith::meshio::CellFilterAvg<mesh_type, field_type>::~CellFilterAvg(void)
{ // destructor
- delete _fieldAvg; _fieldAvg = 0;
+ deallocate();
} // destructor
// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+template<typename mesh_type, typename field_type>
+void
+pylith::meshio::CellFilterAvg<mesh_type, field_type>::deallocate(void)
+{ // deallocate
+ CellFilter<mesh_type, field_type>::deallocate();
+
+ delete _fieldAvg; _fieldAvg = 0;
+} // deallocate
+
+// ----------------------------------------------------------------------
// Copy constructor.
template<typename mesh_type, typename field_type>
pylith::meshio::CellFilterAvg<mesh_type, field_type>::CellFilterAvg(
Modified: short/3D/PyLith/trunk/libsrc/meshio/CellFilterAvg.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/CellFilterAvg.hh 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/libsrc/meshio/CellFilterAvg.hh 2009-06-11 17:34:07 UTC (rev 15195)
@@ -43,6 +43,9 @@
*/
CellFilter<mesh_type,field_type>* clone(void) const;
+ /// Deallocate PETSc and local data structures.
+ void deallocate(void);
+
/** Filter field over cells.
*
* @param fieldIn Field to filter.
Modified: short/3D/PyLith/trunk/libsrc/meshio/DataWriter.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/DataWriter.cc 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/libsrc/meshio/DataWriter.cc 2009-06-11 17:34:07 UTC (rev 15195)
@@ -25,9 +25,18 @@
template<typename mesh_type, typename field_type>
pylith::meshio::DataWriter<mesh_type, field_type>::~DataWriter(void)
{ // destructor
+ deallocate();
} // destructor
// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+template<typename mesh_type, typename field_type>
+void
+pylith::meshio::DataWriter<mesh_type, field_type>::deallocate(void)
+{ // deallocate
+} // deallocate
+
+// ----------------------------------------------------------------------
// Prepare for writing files.
template<typename mesh_type, typename field_type>
void
Modified: short/3D/PyLith/trunk/libsrc/meshio/DataWriter.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/DataWriter.hh 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/libsrc/meshio/DataWriter.hh 2009-06-11 17:34:07 UTC (rev 15195)
@@ -46,6 +46,10 @@
virtual
DataWriter* clone(void) const = 0;
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Prepare for writing files.
*
* @param mesh Finite-element mesh.
Modified: short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.cc 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.cc 2009-06-11 17:34:07 UTC (rev 15195)
@@ -36,11 +36,20 @@
template<typename mesh_type, typename field_type>
pylith::meshio::DataWriterVTK<mesh_type,field_type>::~DataWriterVTK(void)
{ // destructor
+ deallocate();
+} // destructor
+
+// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+template<typename mesh_type, typename field_type>
+void
+pylith::meshio::DataWriterVTK<mesh_type, field_type>::deallocate(void)
+{ // deallocate
if (0 != _viewer)
PetscViewerDestroy(_viewer);
_viewer = 0;
-} // destructor
-
+} // deallocate
+
// ----------------------------------------------------------------------
// Copy constructor.
template<typename mesh_type, typename field_type>
Modified: short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.hh 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.hh 2009-06-11 17:34:07 UTC (rev 15195)
@@ -46,6 +46,9 @@
*/
DataWriter<mesh_type, field_type>* clone(void) const;
+ /// Deallocate PETSc and local data structures.
+ void deallocate(void);
+
/** Set filename for VTK file.
*
* @param filename Name of VTK file.
Modified: short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc 2009-06-11 17:34:07 UTC (rev 15195)
@@ -44,9 +44,17 @@
// Destructor
pylith::meshio::MeshIO::~MeshIO(void)
{ // destructor
+ deallocate();
} // destructor
// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+void
+pylith::meshio::MeshIO::deallocate(void)
+{ // deallocate
+} // deallocate
+
+// ----------------------------------------------------------------------
// Get spatial dimension of mesh.
int
pylith::meshio::MeshIO::getMeshDim(void) const
Modified: short/3D/PyLith/trunk/libsrc/meshio/MeshIO.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/MeshIO.hh 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/libsrc/meshio/MeshIO.hh 2009-06-11 17:34:07 UTC (rev 15195)
@@ -50,6 +50,10 @@
virtual
~MeshIO(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set debug flag for mesh.
*
* @param flag True to print debugging information.
Modified: short/3D/PyLith/trunk/libsrc/meshio/MeshIOAscii.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/MeshIOAscii.cc 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/libsrc/meshio/MeshIOAscii.cc 2009-06-11 17:34:07 UTC (rev 15195)
@@ -47,9 +47,18 @@
// Destructor
pylith::meshio::MeshIOAscii::~MeshIOAscii(void)
{ // destructor
+ deallocate();
} // destructor
// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+void
+pylith::meshio::MeshIOAscii::deallocate(void)
+{ // deallocate
+ MeshIO::deallocate();
+} // deallocate
+
+// ----------------------------------------------------------------------
// Read mesh.
void
pylith::meshio::MeshIOAscii::_read(void)
Modified: short/3D/PyLith/trunk/libsrc/meshio/MeshIOAscii.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/MeshIOAscii.hh 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/libsrc/meshio/MeshIOAscii.hh 2009-06-11 17:34:07 UTC (rev 15195)
@@ -41,6 +41,9 @@
/// Destructor
~MeshIOAscii(void);
+ /// Deallocate PETSc and local data structures.
+ void deallocate(void);
+
/** Set filename for ASCII file.
*
* @param filename Name of file
Modified: short/3D/PyLith/trunk/libsrc/meshio/MeshIOCubit.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/MeshIOCubit.cc 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/libsrc/meshio/MeshIOCubit.cc 2009-06-11 17:34:07 UTC (rev 15195)
@@ -39,9 +39,18 @@
// Destructor
pylith::meshio::MeshIOCubit::~MeshIOCubit(void)
{ // destructor
+ deallocate();
} // destructor
// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+void
+pylith::meshio::MeshIOCubit::deallocate(void)
+{ // deallocate
+ MeshIO::deallocate();
+} // deallocate
+
+// ----------------------------------------------------------------------
// Unpickle mesh
void
pylith::meshio::MeshIOCubit::_read(void)
Modified: short/3D/PyLith/trunk/libsrc/meshio/MeshIOCubit.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/MeshIOCubit.hh 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/libsrc/meshio/MeshIOCubit.hh 2009-06-11 17:34:07 UTC (rev 15195)
@@ -41,6 +41,9 @@
/// Destructor
~MeshIOCubit(void);
+ /// Deallocate PETSc and local data structures.
+ void deallocate(void);
+
/** Set filename for Cubit file.
*
* @param filename Name of file
Modified: short/3D/PyLith/trunk/libsrc/meshio/MeshIOLagrit.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/MeshIOLagrit.cc 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/libsrc/meshio/MeshIOLagrit.cc 2009-06-11 17:34:07 UTC (rev 15195)
@@ -41,9 +41,18 @@
// Destructor
pylith::meshio::MeshIOLagrit::~MeshIOLagrit(void)
{ // destructor
+ deallocate();
} // destructor
// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+void
+pylith::meshio::MeshIOLagrit::deallocate(void)
+{ // deallocate
+ MeshIO::deallocate();
+} // deallocate
+
+// ----------------------------------------------------------------------
// Unpickle mesh
void
pylith::meshio::MeshIOLagrit::_read(void)
Modified: short/3D/PyLith/trunk/libsrc/meshio/MeshIOLagrit.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/MeshIOLagrit.hh 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/libsrc/meshio/MeshIOLagrit.hh 2009-06-11 17:34:07 UTC (rev 15195)
@@ -38,6 +38,9 @@
/// Destructor
~MeshIOLagrit(void);
+ /// Deallocate PETSc and local data structures.
+ void deallocate(void);
+
/** Set filename for mesh GMV file.
*
* @param filename Name of file
Modified: short/3D/PyLith/trunk/libsrc/meshio/OutputManager.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/OutputManager.cc 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/libsrc/meshio/OutputManager.cc 2009-06-11 17:34:07 UTC (rev 15195)
@@ -37,13 +37,22 @@
template<typename mesh_type, typename field_type>
pylith::meshio::OutputManager<mesh_type, field_type>::~OutputManager(void)
{ // destructor
+ deallocate();
+} // destructor
+
+// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+template<typename mesh_type, typename field_type>
+void
+pylith::meshio::OutputManager<mesh_type, field_type>::deallocate(void)
+{ // deallocate
_writer = 0; // :TODO: Use shared pointer
_vertexFilter = 0; // :TODO: Use shared pointer
_cellFilter = 0; // :TODO: Use shared pointer
delete _coordsys; _coordsys = 0;
delete _fields; _fields = 0;
-} // destructor
-
+} // deallocate
+
// ----------------------------------------------------------------------
// Set coordinate system in output. The vertex fields in the output
template<typename mesh_type, typename field_type>
Modified: short/3D/PyLith/trunk/libsrc/meshio/OutputManager.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/OutputManager.hh 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/libsrc/meshio/OutputManager.hh 2009-06-11 17:34:07 UTC (rev 15195)
@@ -41,6 +41,10 @@
virtual
~OutputManager(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set coordinate system in output. The vertex fields in the output
* are not affected by any change in coordinates.
*
Modified: short/3D/PyLith/trunk/libsrc/meshio/OutputSolnSubset.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/OutputSolnSubset.cc 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/libsrc/meshio/OutputSolnSubset.cc 2009-06-11 17:34:07 UTC (rev 15195)
@@ -28,10 +28,20 @@
// Destructor
pylith::meshio::OutputSolnSubset::~OutputSolnSubset(void)
{ // destructor
- delete _submesh; _submesh = 0;
+ deallocate();
} // destructor
// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+void
+pylith::meshio::OutputSolnSubset::deallocate(void)
+{ // deallocate
+ OutputManager<topology::SubMesh, topology::Field<topology::Mesh> >::deallocate();
+
+ delete _submesh; _submesh = 0;
+} // deallocate
+
+// ----------------------------------------------------------------------
// Set label identifier for subdomain.
void
pylith::meshio::OutputSolnSubset::label(const char* value)
Modified: short/3D/PyLith/trunk/libsrc/meshio/OutputSolnSubset.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/OutputSolnSubset.hh 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/libsrc/meshio/OutputSolnSubset.hh 2009-06-11 17:34:07 UTC (rev 15195)
@@ -45,6 +45,9 @@
/// Destructor
~OutputSolnSubset(void);
+ /// Deallocate PETSc and local data structures.
+ void deallocate(void);
+
/** Set label identifier for subdomain.
*
* @param value Label of subdomain.
Modified: short/3D/PyLith/trunk/libsrc/meshio/VertexFilter.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/VertexFilter.cc 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/libsrc/meshio/VertexFilter.cc 2009-06-11 17:34:07 UTC (rev 15195)
@@ -24,9 +24,18 @@
template<typename field_type>
pylith::meshio::VertexFilter<field_type>::~VertexFilter(void)
{ // destructor
+ deallocate();
} // destructor
// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+template<typename field_type>
+void
+pylith::meshio::VertexFilter<field_type>::deallocate(void)
+{ // deallocate
+} // deallocate
+
+// ----------------------------------------------------------------------
// Copy constructor.
template<typename field_type>
pylith::meshio::VertexFilter<field_type>::VertexFilter(const VertexFilter& f)
Modified: short/3D/PyLith/trunk/libsrc/meshio/VertexFilter.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/VertexFilter.hh 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/libsrc/meshio/VertexFilter.hh 2009-06-11 17:34:07 UTC (rev 15195)
@@ -37,8 +37,13 @@
VertexFilter(void);
/// Destructor
+ virtual
~VertexFilter(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Create copy of filter.
*
* @returns Copy of filter.
Modified: short/3D/PyLith/trunk/libsrc/meshio/VertexFilterVecNorm.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/VertexFilterVecNorm.cc 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/libsrc/meshio/VertexFilterVecNorm.cc 2009-06-11 17:34:07 UTC (rev 15195)
@@ -27,10 +27,21 @@
template<typename field_type>
pylith::meshio::VertexFilterVecNorm<field_type>::~VertexFilterVecNorm(void)
{ // destructor
- delete _fieldVecNorm; _fieldVecNorm = 0;
+ deallocate();
} // destructor
// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+template<typename field_type>
+void
+pylith::meshio::VertexFilterVecNorm<field_type>::deallocate(void)
+{ // deallocate
+ VertexFilter<field_type>::deallocate();
+
+ delete _fieldVecNorm; _fieldVecNorm = 0;
+} // deallocate
+
+// ----------------------------------------------------------------------
// Copy constructor.
template<typename field_type>
pylith::meshio::VertexFilterVecNorm<field_type>::VertexFilterVecNorm(const VertexFilterVecNorm& f) :
Modified: short/3D/PyLith/trunk/libsrc/meshio/VertexFilterVecNorm.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/VertexFilterVecNorm.hh 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/libsrc/meshio/VertexFilterVecNorm.hh 2009-06-11 17:34:07 UTC (rev 15195)
@@ -43,6 +43,9 @@
*/
VertexFilter<field_type>* clone(void) const;
+ /// Deallocate PETSc and local data structures.
+ void deallocate(void);
+
/** Filter vertex field.
*
* @param fieldIn Field to filter.
Modified: short/3D/PyLith/trunk/modulesrc/meshio/CellFilter.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/meshio/CellFilter.i 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/modulesrc/meshio/CellFilter.i 2009-06-11 17:34:07 UTC (rev 15195)
@@ -30,6 +30,7 @@
CellFilter(void);
/// Destructor
+ virtual
~CellFilter(void);
/** Create copy of filter.
@@ -39,6 +40,10 @@
virtual
CellFilter* clone(void) const = 0;
+ /// Deallocate PETSc and local data structures.
+ cirtual
+ void deallocate(void);
+
/** Set quadrature associated with cells.
*
* @param q Quadrature for cells.
Modified: short/3D/PyLith/trunk/modulesrc/meshio/CellFilterAvg.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/meshio/CellFilterAvg.i 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/modulesrc/meshio/CellFilterAvg.i 2009-06-11 17:34:07 UTC (rev 15195)
@@ -39,6 +39,9 @@
*/
CellFilter<mesh_type, field_type>* clone(void) const;
+ /// Deallocate PETSc and local data structures.
+ void deallocate(void);
+
/** Filter field over cells.
*
* @param fieldIn Field to filter.
Modified: short/3D/PyLith/trunk/modulesrc/meshio/DataWriter.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/meshio/DataWriter.i 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/modulesrc/meshio/DataWriter.i 2009-06-11 17:34:07 UTC (rev 15195)
@@ -40,6 +40,10 @@
virtual
DataWriter* clone(void) const = 0;
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Prepare for writing files.
*
* @param mesh Finite-element mesh.
Modified: short/3D/PyLith/trunk/modulesrc/meshio/DataWriterVTK.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/meshio/DataWriterVTK.i 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/modulesrc/meshio/DataWriterVTK.i 2009-06-11 17:34:07 UTC (rev 15195)
@@ -39,6 +39,9 @@
*/
DataWriter<mesh_type, field_type>* clone(void) const;
+ /// Deallocate PETSc and local data structures.
+ void deallocate(void);
+
/** Set filename for VTK file.
*
* @param filename Name of VTK file.
Modified: short/3D/PyLith/trunk/modulesrc/meshio/MeshIOAscii.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/meshio/MeshIOAscii.i 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/modulesrc/meshio/MeshIOAscii.i 2009-06-11 17:34:07 UTC (rev 15195)
@@ -31,6 +31,9 @@
/// Destructor
~MeshIOAscii(void);
+ /// Deallocate PETSc and local data structures.
+ void deallocate(void);
+
/** Set filename for ASCII file.
*
* @param filename Name of file
Modified: short/3D/PyLith/trunk/modulesrc/meshio/MeshIOCubit.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/meshio/MeshIOCubit.i 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/modulesrc/meshio/MeshIOCubit.i 2009-06-11 17:34:07 UTC (rev 15195)
@@ -31,6 +31,9 @@
/// Destructor
~MeshIOCubit(void);
+ /// Deallocate PETSc and local data structures.
+ void deallocate(void);
+
/** Set filename for Cubit file.
*
* @param filename Name of file
Modified: short/3D/PyLith/trunk/modulesrc/meshio/MeshIOLagrit.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/meshio/MeshIOLagrit.i 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/modulesrc/meshio/MeshIOLagrit.i 2009-06-11 17:34:07 UTC (rev 15195)
@@ -30,6 +30,9 @@
/// Destructor
~MeshIOLagrit(void);
+ /// Deallocate PETSc and local data structures.
+ void deallocate(void);
+
/** Set filename for mesh GMV file.
*
* @param filename Name of file
Modified: short/3D/PyLith/trunk/modulesrc/meshio/MeshIOObj.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/meshio/MeshIOObj.i 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/modulesrc/meshio/MeshIOObj.i 2009-06-11 17:34:07 UTC (rev 15195)
@@ -45,6 +45,10 @@
virtual
~MeshIO(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set debug flag for mesh.
*
* @param flag True to print debugging information.
Modified: short/3D/PyLith/trunk/modulesrc/meshio/OutputManager.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/meshio/OutputManager.i 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/modulesrc/meshio/OutputManager.i 2009-06-11 17:34:07 UTC (rev 15195)
@@ -33,6 +33,10 @@
virtual
~OutputManager(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Set coordinate system in output. The vertex fields in the output
* are not affected by any change in coordinates.
*
Modified: short/3D/PyLith/trunk/modulesrc/meshio/OutputSolnSubset.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/meshio/OutputSolnSubset.i 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/modulesrc/meshio/OutputSolnSubset.i 2009-06-11 17:34:07 UTC (rev 15195)
@@ -33,6 +33,9 @@
/// Destructor
~OutputSolnSubset(void);
+ /// Deallocate PETSc and local data structures.
+ void deallocate(void);
+
/** Set label identifier for subdomain.
*
* @param value Label of subdomain.
Modified: short/3D/PyLith/trunk/modulesrc/meshio/VertexFilter.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/meshio/VertexFilter.i 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/modulesrc/meshio/VertexFilter.i 2009-06-11 17:34:07 UTC (rev 15195)
@@ -30,8 +30,13 @@
VertexFilter(void);
/// Destructor
+ virtual
~VertexFilter(void);
+ /// Deallocate PETSc and local data structures.
+ virtual
+ void deallocate(void);
+
/** Create copy of filter.
*
* @returns Copy of filter.
Modified: short/3D/PyLith/trunk/modulesrc/meshio/VertexFilterVecNorm.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/meshio/VertexFilterVecNorm.i 2009-06-11 17:04:34 UTC (rev 15194)
+++ short/3D/PyLith/trunk/modulesrc/meshio/VertexFilterVecNorm.i 2009-06-11 17:34:07 UTC (rev 15195)
@@ -38,6 +38,9 @@
*/
VertexFilter<field_type>* clone(void) const;
+ /// Deallocate PETSc and local data structures.
+ void deallocate(void);
+
/** Filter vertex field.
*
* @param fieldIn Field to filter.
More information about the CIG-COMMITS
mailing list