[cig-commits] [commit] knepley/upgrade-petsc-interface: Integrator: Material-Id label has more than cells in it after refinement (5812103)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Mon Nov 11 17:29:43 PST 2013
Repository : ssh://geoshell/pylith
On branch : knepley/upgrade-petsc-interface
Link : https://github.com/geodynamics/pylith/compare/258af47c24cade65c2145ea25750776577205221...5812103f21b9a2b45a604669578c3dff9c627c78
>---------------------------------------------------------------
commit 5812103f21b9a2b45a604669578c3dff9c627c78
Author: Matthew G. Knepley <knepley at gmail.com>
Date: Mon Nov 11 19:32:12 2013 -0600
Integrator: Material-Id label has more than cells in it after refinement
>---------------------------------------------------------------
5812103f21b9a2b45a604669578c3dff9c627c78
libsrc/pylith/feassemble/IntegratorElasticity.cc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libsrc/pylith/feassemble/IntegratorElasticity.cc b/libsrc/pylith/feassemble/IntegratorElasticity.cc
index 9f90018..3478fb8 100644
--- a/libsrc/pylith/feassemble/IntegratorElasticity.cc
+++ b/libsrc/pylith/feassemble/IntegratorElasticity.cc
@@ -266,14 +266,16 @@ pylith::feassemble::IntegratorElasticity::verifyConfiguration(const topology::Me
const PetscInt numCells = materialIS.size();
const int numCorners = _quadrature->refGeometry().numCorners();
- PetscInt vStart, vEnd;
+ PetscInt cStart, cEnd, vStart, vEnd;
PetscErrorCode err;
+ err = DMPlexGetHeightStratum(dmMesh, 0, &cStart, &cEnd);PYLITH_CHECK_ERROR(err);
err = DMPlexGetDepthStratum(dmMesh, 0, &vStart, &vEnd);PYLITH_CHECK_ERROR(err);
for(PetscInt c = 0; c < numCells; ++c) {
const PetscInt cell = cells[c];
PetscInt cellNumCorners = 0, closureSize, *closure = NULL;
+ if ((cell < cStart) || (cell >= cEnd)) continue;
err = DMPlexGetTransitiveClosure(dmMesh, cell, PETSC_TRUE, &closureSize, &closure);PYLITH_CHECK_ERROR(err);
for (PetscInt cl = 0; cl < closureSize*2; cl += 2) {
if ((closure[cl] >= vStart) && (closure[cl] < vEnd)) ++cellNumCorners;
More information about the CIG-COMMITS
mailing list