[cig-commits] r14498 - in short/3D/PyLith/branches/pylith-swig: libsrc/problems modulesrc/problems
brad at geodynamics.org
brad at geodynamics.org
Fri Mar 27 14:46:07 PDT 2009
Author: brad
Date: 2009-03-27 14:46:07 -0700 (Fri, 27 Mar 2009)
New Revision: 14498
Modified:
short/3D/PyLith/branches/pylith-swig/libsrc/problems/SolverLinear.cc
short/3D/PyLith/branches/pylith-swig/libsrc/problems/SolverLinear.hh
short/3D/PyLith/branches/pylith-swig/modulesrc/problems/SolverLinear.i
Log:
Added deallocate().
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/problems/SolverLinear.cc
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/problems/SolverLinear.cc 2009-03-27 21:00:59 UTC (rev 14497)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/problems/SolverLinear.cc 2009-03-27 21:46:07 UTC (rev 14498)
@@ -32,12 +32,21 @@
// Destructor
pylith::problems::SolverLinear::~SolverLinear(void)
{ // destructor
+ deallocate();
+} // destructor
+
+// ----------------------------------------------------------------------
+// Deallocate data structures.
+void
+pylith::problems::SolverLinear::deallocate(void)
+{ // deallocate
if (0 != _ksp) {
PetscErrorCode err = KSPDestroy(_ksp); _ksp = 0;
CHECK_PETSC_ERROR(err);
+ std::cout << "DESTROYED KSP." << std::endl;
} // if
-} // destructor
-
+} // deallocate
+
// ----------------------------------------------------------------------
// Set initial guess zero flag.
void
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/problems/SolverLinear.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/problems/SolverLinear.hh 2009-03-27 21:00:59 UTC (rev 14497)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/problems/SolverLinear.hh 2009-03-27 21:46:07 UTC (rev 14498)
@@ -41,6 +41,9 @@
/// Destructor
~SolverLinear(void);
+ /// Deallocate data structures.
+ void deallocate(void);
+
/** Set initial guess zero flag.
*
* @param value True means use zero as initial guess, false means
Modified: short/3D/PyLith/branches/pylith-swig/modulesrc/problems/SolverLinear.i
===================================================================
--- short/3D/PyLith/branches/pylith-swig/modulesrc/problems/SolverLinear.i 2009-03-27 21:00:59 UTC (rev 14497)
+++ short/3D/PyLith/branches/pylith-swig/modulesrc/problems/SolverLinear.i 2009-03-27 21:46:07 UTC (rev 14498)
@@ -31,6 +31,9 @@
/// Destructor
~SolverLinear(void);
+ /// Deallocate data structures.
+ void deallocate(void);
+
/** Set initial guess zero flag.
*
* @param value True means use zero as initial guess, false means
More information about the CIG-COMMITS
mailing list