[cig-commits] r12914 - in short/3D/PyLith/trunk/libsrc: faults feassemble
knepley at geodynamics.org
knepley at geodynamics.org
Thu Sep 18 14:22:18 PDT 2008
Author: knepley
Date: 2008-09-18 14:22:18 -0700 (Thu, 18 Sep 2008)
New Revision: 12914
Modified:
short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc
short/3D/PyLith/trunk/libsrc/feassemble/ElasticityImplicit.cc
Log:
Fixed allocation bug with empty meshes having negative depth
Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc 2008-09-17 19:37:13 UTC (rev 12913)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc 2008-09-18 21:22:18 UTC (rev 12914)
@@ -618,7 +618,7 @@
const int faultDepth = _faultMesh->depth(); // depth of fault cells
typedef ALE::SieveAlg<Mesh> SieveAlg;
- ALE::ISieveVisitor::NConeRetriever<sieve_type> ncV(*sieve, (size_t) pow(sieve->getMaxConeSize(), _faultMesh->depth()));
+ ALE::ISieveVisitor::NConeRetriever<sieve_type> ncV(*sieve, (size_t) pow(sieve->getMaxConeSize(), std::max(0, _faultMesh->depth())));
for (Mesh::label_sequence::iterator c_iter=cells->begin();
c_iter != cellsEnd;
@@ -754,7 +754,7 @@
const int faultDepth = _faultMesh->depth(); // depth of fault cells
typedef ALE::SieveAlg<Mesh> SieveAlg;
- ALE::ISieveVisitor::NConeRetriever<sieve_type> ncV(*sieve, (size_t) pow(sieve->getMaxConeSize(), _faultMesh->depth()));
+ ALE::ISieveVisitor::NConeRetriever<sieve_type> ncV(*sieve, (size_t) pow(sieve->getMaxConeSize(), std::max(0, _faultMesh->depth())));
for (Mesh::label_sequence::iterator c_iter=cells->begin();
c_iter != cellsEnd;
Modified: short/3D/PyLith/trunk/libsrc/feassemble/ElasticityImplicit.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/ElasticityImplicit.cc 2008-09-17 19:37:13 UTC (rev 12913)
+++ short/3D/PyLith/trunk/libsrc/feassemble/ElasticityImplicit.cc 2008-09-18 21:22:18 UTC (rev 12914)
@@ -371,6 +371,7 @@
const ALE::Obj<Mesh::order_type>& globalOrder = mesh->getFactory()->getGlobalOrder(mesh, "default", dispTBctpdt);
assert(!globalOrder.isNull());
+ // We would need to request unique points here if we had an interpolated mesh
visitor_type iV(*dispTBctpdt, *globalOrder, (int) pow(mesh->getSieve()->getMaxConeSize(), mesh->depth())*spaceDim);
// Loop over cells
More information about the cig-commits
mailing list