[cig-commits] r16707 - short/3D/PyLith/trunk/libsrc/problems
brad at geodynamics.org
brad at geodynamics.org
Fri May 14 17:35:47 PDT 2010
Author: brad
Date: 2010-05-14 17:35:47 -0700 (Fri, 14 May 2010)
New Revision: 16707
Modified:
short/3D/PyLith/trunk/libsrc/problems/SolverLinear.cc
Log:
Added define to turn on/off new fault preconditioner.
Modified: short/3D/PyLith/trunk/libsrc/problems/SolverLinear.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/problems/SolverLinear.cc 2010-05-15 00:25:08 UTC (rev 16706)
+++ short/3D/PyLith/trunk/libsrc/problems/SolverLinear.cc 2010-05-15 00:35:47 UTC (rev 16707)
@@ -24,6 +24,7 @@
#include "pylith/utils/petscerror.h" // USES CHECK_PETSC_ERROR
#define FIELD_SPLIT
+#define NEW_FAULT_PRECONDITIONER
#if defined(FIELD_SPLIT)
#include <petscmesh_solvers.hh> // USES constructFieldSplit()
@@ -91,6 +92,7 @@
err = PCSetFromOptions(pc); CHECK_PETSC_ERROR(err);
#if defined(FIELD_SPLIT)
constructFieldSplit(residual.section(), sieveMesh->getFactory()->getGlobalOrder(sieveMesh, "default", residual.section()), residual.vector(), pc);
+#if defined(NEW_FAULT_PRECONDITIONER)
if (residual.section()->getNumSpaces() > sieveMesh->getDimension()) {
KSP *ksps;
Mat A, M;
@@ -110,8 +112,9 @@
err = KSPSetOperators(ksps[num-1], A, M, flag); CHECK_PETSC_ERROR(err);
// Create a mapping to indices for that space (might be in FS)
err = PetscFree(ksps); CHECK_PETSC_ERROR(err);
- }
+ } // if
#endif
+#endif
}
} // initialize
More information about the CIG-COMMITS
mailing list