[cig-commits] r21662 - short/3D/PyLith/branches/v1.8-stable/libsrc/pylith/faults
brad at geodynamics.org
brad at geodynamics.org
Wed Mar 27 14:28:20 PDT 2013
Author: brad
Date: 2013-03-27 14:28:20 -0700 (Wed, 27 Mar 2013)
New Revision: 21662
Modified:
short/3D/PyLith/branches/v1.8-stable/libsrc/pylith/faults/FaultCohesiveImpulses.cc
Log:
Fixed bug in setting up impulses in parallel. Only apply impulses if vertex is local to process.
Modified: short/3D/PyLith/branches/v1.8-stable/libsrc/pylith/faults/FaultCohesiveImpulses.cc
===================================================================
--- short/3D/PyLith/branches/v1.8-stable/libsrc/pylith/faults/FaultCohesiveImpulses.cc 2013-03-27 20:04:28 UTC (rev 21661)
+++ short/3D/PyLith/branches/v1.8-stable/libsrc/pylith/faults/FaultCohesiveImpulses.cc 2013-03-27 21:28:20 UTC (rev 21662)
@@ -318,13 +318,9 @@
const ALE::Obj<SieveSubMesh>& faultSieveMesh = _faultMesh->sieveMesh();
assert(!faultSieveMesh.isNull());
-#if 0 // GET GLOBAL ORDER
- assert(!sieveMesh.isNull());
- const ALE::Obj<SieveMesh::order_type>& globalOrder =
- sieveMesh->getFactory()->getGlobalOrder(sieveMesh, "default",
- residualSection);
- assert(!globalOrder.isNull());
-#endif
+ assert(!faultSieveMesh.isNull());
+ const ALE::Obj<SieveMesh::numbering_type>& globalNumbering = faultSieveMesh->getFactory()->getNumbering(faultSieveMesh, 0);
+ assert(!globalNumbering.isNull());
scalar_array coordsVertex(spaceDim);
const ALE::Obj<RealSection>& coordsSection = faultSieveMesh->getRealSection("coordinates");
@@ -342,11 +338,10 @@
const int v_lagrange = _cohesiveVertices[iVertex].lagrange;
const int v_fault = _cohesiveVertices[iVertex].fault;
-#if 0 // USE GLOBAL ORDER
// Only create impulses on local vertices
- if (!globalOrder->isLocal(v_lagrange))
+ if (!globalNumbering->isLocal(v_fault)) {
continue;
-#endif
+ } // if
coordsSection->restrictPoint(v_fault, &coordsVertex[0], coordsVertex.size());
_normalizer->dimensionalize(&coordsVertex[0], coordsVertex.size(), lengthScale);
@@ -382,6 +377,9 @@
//amplitude.view("IMPULSE AMPLITUDE"); // DEBUGGING
+ // Deallocate factory.
+ faultSieveMesh->getFactory()->clear();
+
_setupImpulseOrder(pointOrder);
} // _setupImpulses
More information about the CIG-COMMITS
mailing list