[cig-commits] r13379 - short/3D/PyLith/trunk/libsrc/bc

brad at geodynamics.org brad at geodynamics.org
Sun Nov 23 17:45:55 PST 2008


Author: brad
Date: 2008-11-23 17:45:55 -0800 (Sun, 23 Nov 2008)
New Revision: 13379

Modified:
   short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.cc
Log:
Fixed use of global ordering.

Modified: short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.cc	2008-11-24 01:23:54 UTC (rev 13378)
+++ short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.cc	2008-11-24 01:45:55 UTC (rev 13379)
@@ -362,9 +362,14 @@
   // Allocate vector for cell values (if necessary)
   _initCellMatrix();
 
-  const ALE::Obj<Mesh::order_type>& globalOrder = mesh->getFactory()->getGlobalOrder(mesh, "default", dispT);
+  const ALE::Obj<real_section_type>& solution = fields->getSolution();
+  assert(!solution.isNull());  
+  const ALE::Obj<Mesh::order_type>& globalOrder = 
+    mesh->getFactory()->getGlobalOrder(mesh, "default", solution);
   assert(!globalOrder.isNull());
-  visitor_type iV(*dispT, *globalOrder, (int) pow(_boundaryMesh->getSieve()->getMaxConeSize(), _boundaryMesh->depth()));
+  visitor_type iV(*solution, *globalOrder,
+		  (int) pow(mesh->getSieve()->getMaxConeSize(),
+			    mesh->depth())*spaceDim);
 
   for (Mesh::label_sequence::iterator c_iter=cells->begin();
        c_iter != cellsEnd;
@@ -404,7 +409,8 @@
     PetscLogFlops(numQuadPts*(3+numBasis*(1+numBasis*(1+2*spaceDim))));
     
     // Assemble cell contribution into PETSc Matrix
-    err = updateOperator(*jacobian, *_boundaryMesh->getSieve(), iV, *c_iter, _cellMatrix, ADD_VALUES);
+    err = updateOperator(*jacobian, *_boundaryMesh->getSieve(), 
+			 iV, *c_iter, _cellMatrix, ADD_VALUES);
     if (err)
       throw std::runtime_error("Update to PETSc Mat failed.");
     iV.clear();



More information about the CIG-COMMITS mailing list