[cig-commits] r16944 - short/3D/PyLith/trunk/libsrc/problems

knepley at geodynamics.org knepley at geodynamics.org
Tue Jun 8 16:34:40 PDT 2010


Author: knepley
Date: 2010-06-08 16:34:40 -0700 (Tue, 08 Jun 2010)
New Revision: 16944

Modified:
   short/3D/PyLith/trunk/libsrc/problems/Solver.cc
Log:
Fixed size of fault system in parallel


Modified: short/3D/PyLith/trunk/libsrc/problems/Solver.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/problems/Solver.cc	2010-06-08 23:16:32 UTC (rev 16943)
+++ short/3D/PyLith/trunk/libsrc/problems/Solver.cc	2010-06-08 23:34:40 UTC (rev 16944)
@@ -102,19 +102,17 @@
   if (solutionSection->getNumSpaces() > spaceDim &&
       formulation->useCustomConstraintPC()) {
     // Get total number of DOF associated with constraints field split
-    const ALE::Obj<RealSection>& constraintSection = 
-      solutionSection->getFibration(spaceDim);
-    assert(!constraintSection.isNull());
+    const ALE::Obj<SieveMesh::order_type>& lagrangeGlobalOrder =
+      sieveMesh->getFactory()->getGlobalOrder(sieveMesh, "faultDefault",
+                                              solutionSection, spaceDim);
+    assert(!lagrangeGlobalOrder.isNull());
 
-    // :TODO: Is this assembled across processors?
-    const int ndof = constraintSection->size(); 
-    
     if (0 != *precondMatrix) {
       err = MatDestroy(*precondMatrix); *precondMatrix = 0;
       CHECK_PETSC_ERROR(err);
     } // if
-    PetscInt nrows = ndof;
-    PetscInt ncols = ndof;
+    PetscInt nrows = lagrangeGlobalOrder->getLocalSize();
+    PetscInt ncols = nrows;
 
     err = MatCreate(sieveMesh->comm(), precondMatrix); CHECK_PETSC_ERROR(err);
     err = MatSetSizes(*precondMatrix, nrows, ncols, 



More information about the CIG-COMMITS mailing list