[cig-commits] r16751 - in short/3D/PyLith/trunk: libsrc/faults libsrc/meshio pylith/feassemble
knepley at geodynamics.org
knepley at geodynamics.org
Wed May 19 15:55:08 PDT 2010
Author: knepley
Date: 2010-05-19 15:55:08 -0700 (Wed, 19 May 2010)
New Revision: 16751
Modified:
short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveLagrange.cc
short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.cc
short/3D/PyLith/trunk/pylith/feassemble/FIATSimplex.py
Log:
Added some code for the fault PC and a better error message
Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveLagrange.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveLagrange.cc 2010-05-19 22:47:45 UTC (rev 16750)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveLagrange.cc 2010-05-19 22:55:08 UTC (rev 16751)
@@ -626,6 +626,11 @@
const PetscMat jacobianMatrix = jacobian->matrix();
assert(0 != jacobianMatrix);
+ const ALE::Obj<SieveMesh::order_type>& faultGlobalOrder =
+ sieveMesh->getFactory()->getGlobalOrder(sieveMesh, "faultDefault",
+ solutionSection, numKSP-1);
+ assert(!faultGlobalOrder.isNull());
+
_logger->eventEnd(setupEvent);
#if !defined(DETAILED_EVENT_LOGGING)
_logger->eventBegin(computeEvent);
@@ -686,13 +691,9 @@
_logger->eventBegin(updateEvent);
#endif
- // Set global index associated with Lagrange constraint vertex.
- const int indexLglobal = globalOrder->getIndex(v_lagrange);
+ // Set global preconditioner index associated with Lagrange constraint vertex.
+ const int indexLprecond = faultGlobalOrder->getIndex(v_lagrange);
-#if 0
- // Translate global index into index in preconditioner.
- const int indexLprecond = 0; // MATT- FIX THIS.
-
// Set diagonal entries in preconditioned matrix.
for (int iDim=0; iDim < spaceDim; ++iDim)
MatSetValue(precondMatrix,
@@ -700,7 +701,6 @@
indexLprecond + iDim,
precondVertexL[iDim],
INSERT_VALUES);
-#endif
#if defined(DETAILED_EVENT_LOGGING)
PetscLogFlops(spaceDim*spaceDim*4);
Modified: short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.cc 2010-05-19 22:47:45 UTC (rev 16750)
+++ short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.cc 2010-05-19 22:55:08 UTC (rev 16751)
@@ -133,8 +133,7 @@
} else {
const std::string labelName =
(sieveMesh->hasLabel("censored depth")) ? "censored depth" : "depth";
- err = VTKViewer::writeElements(sieveMesh, label, labelId, labelName,
- 0, _viewer);
+ err = VTKViewer::writeElements(sieveMesh, label, labelId, labelName, 0, _viewer);
CHECK_PETSC_ERROR(err);
} // if
//std::cout << "Wrote elements for " << filename << std::endl;
Modified: short/3D/PyLith/trunk/pylith/feassemble/FIATSimplex.py
===================================================================
--- short/3D/PyLith/trunk/pylith/feassemble/FIATSimplex.py 2010-05-19 22:47:45 UTC (rev 16750)
+++ short/3D/PyLith/trunk/pylith/feassemble/FIATSimplex.py 2010-05-19 22:55:08 UTC (rev 16751)
@@ -185,8 +185,8 @@
elif 3 == spaceDim:
self.geometry = CellGeometry.GeometryPoint3D()
if None == self.geometry:
- raise ValueError("Could not set shape of cell for '%s' in spatial " \
- "dimension '%s'." % (self.name, spaceDim))
+ raise ValueError("Could not set shape '%s' of cell for '%s' in spatial " \
+ "dimension '%s'." % (name, self.name, spaceDim))
return
More information about the CIG-COMMITS
mailing list