[cig-commits] r22107 - in short/3D/PyLith/trunk: . libsrc/pylith/bc libsrc/pylith/faults libsrc/pylith/meshio unittests/libtests/feassemble
knepley at geodynamics.org
knepley at geodynamics.org
Sat May 18 12:46:29 PDT 2013
Author: knepley
Date: 2013-05-18 12:46:28 -0700 (Sat, 18 May 2013)
New Revision: 22107
Modified:
short/3D/PyLith/trunk/TODO
short/3D/PyLith/trunk/libsrc/pylith/bc/BCIntegratorSubMesh.cc
short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveTract.cc
short/3D/PyLith/trunk/libsrc/pylith/meshio/DataWriterHDF5.cc
short/3D/PyLith/trunk/libsrc/pylith/meshio/DataWriterHDF5Ext.cc
short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIO.cc
short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityExplicit.cc
short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityExplicitLgDeform.cc
short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityExplicitTet4.cc
short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityExplicitTri3.cc
short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityImplicit.cc
short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityImplicitLgDeform.cc
Log:
Labels spots where vertex order is important, removed old declarations and ConeSize() calls
Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO 2013-05-18 01:13:56 UTC (rev 22106)
+++ short/3D/PyLith/trunk/TODO 2013-05-18 19:46:28 UTC (rev 22107)
@@ -95,6 +95,12 @@
+ Need ribbon around fault in order to develop algorithm
+* Vertex ordering
+
+ + Quadrature::computeGeometry()
+ + Quadrature::minCellWidth()
+ + Optimized Tri3 and Tet4 Explicit integrators depend on the basis order
+
----------------------------------------
MISCELLANEOUS
----------------------------------------
Modified: short/3D/PyLith/trunk/libsrc/pylith/bc/BCIntegratorSubMesh.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/bc/BCIntegratorSubMesh.cc 2013-05-18 01:13:56 UTC (rev 22106)
+++ short/3D/PyLith/trunk/libsrc/pylith/bc/BCIntegratorSubMesh.cc 2013-05-18 19:46:28 UTC (rev 22107)
@@ -119,11 +119,16 @@
const PetscInt cEnd = cellsStratum.end();
// Make sure surface cells are compatible with quadrature.
- PetscInt depth = 0;
- PetscErrorCode err = DMPlexGetDepth(dmSubMesh, &depth);PYLITH_CHECK_ERROR(err);
+ PetscInt vStart, vEnd;
+ PetscErrorCode err = DMPlexGetDepthStratum(dmSubMesh, 0, &vStart, &vEnd);PYLITH_CHECK_ERROR(err);
for (PetscInt c = cStart; c < cEnd; ++c) {
- PetscInt cellNumCorners = 0;
- err = DMPlexGetConeSize(dmSubMesh, c, &cellNumCorners);PYLITH_CHECK_ERROR(err);
+ PetscInt cellNumCorners = 0, closureSize, *closure = NULL;
+
+ err = DMPlexGetTransitiveClosure(dmSubMesh, c, 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;
+ }
+ err = DMPlexRestoreTransitiveClosure(dmSubMesh, c, PETSC_TRUE, &closureSize, &closure);PYLITH_CHECK_ERROR(err);
if (numCorners != cellNumCorners) {
std::ostringstream msg;
msg << "Quadrature is incompatible with cell for boundary condition '"
Modified: short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveTract.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveTract.cc 2013-05-18 01:13:56 UTC (rev 22106)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveTract.cc 2013-05-18 19:46:28 UTC (rev 22107)
@@ -141,6 +141,7 @@
PetscInt coneSize = 0;
for (PetscInt i=0; i < ncells; ++i) {
err = DMPlexGetConeSize(dmMesh, cells[i], &coneSize);PYLITH_CHECK_ERROR(err);
+ // TODO: Why isn't this 3? Should be changed to Closure()
if (2*numCorners != coneSize) {
std::ostringstream msg;
msg << "Number of vertices in reference cell (" << numCorners
Modified: short/3D/PyLith/trunk/libsrc/pylith/meshio/DataWriterHDF5.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/DataWriterHDF5.cc 2013-05-18 01:13:56 UTC (rev 22106)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/DataWriterHDF5.cc 2013-05-18 19:46:28 UTC (rev 22107)
@@ -192,6 +192,7 @@
if (value != labelId) continue;
} // if
+ // TODO: VERTEX ORDER
err = DMPlexGetTransitiveClosure(dmMesh, cell, PETSC_TRUE, &closureSize, &closure);PYLITH_CHECK_ERROR(err);
for(p = 0; p < closureSize*2; p += 2) {
if ((closure[p] >= vStart) && (closure[p] < vEnd)) {
Modified: short/3D/PyLith/trunk/libsrc/pylith/meshio/DataWriterHDF5Ext.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/DataWriterHDF5Ext.cc 2013-05-18 01:13:56 UTC (rev 22106)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/DataWriterHDF5Ext.cc 2013-05-18 19:46:28 UTC (rev 22107)
@@ -238,6 +238,7 @@
err = DMPlexGetLabelValue(dmMesh, label, cell, &value);PYLITH_CHECK_ERROR(err);
if (value != labelId) continue;
} // if
+ // TODO: VERTEX ORDER
err = DMPlexGetTransitiveClosure(dmMesh, cell, PETSC_TRUE, &closureSize, &closure);PYLITH_CHECK_ERROR(err);
for(p = 0; p < closureSize*2; p += 2) {
if ((closure[p] >= vStart) && (closure[p] < vEnd)) {
Modified: short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIO.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIO.cc 2013-05-18 01:13:56 UTC (rev 22106)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIO.cc 2013-05-18 19:46:28 UTC (rev 22107)
@@ -182,14 +182,19 @@
err = DMPlexGetVertexNumbering(dmMesh, &globalVertexNumbers);PYLITH_CHECK_ERROR(err);
err = ISGetIndices(globalVertexNumbers, &gvertex);PYLITH_CHECK_ERROR(err);
for (PetscInt c = cStart, index = 0; c < cEnd; ++c) {
- err = DMPlexGetConeSize(dmMesh, c, &coneSize);PYLITH_CHECK_ERROR(err);
- assert(coneSize == *numCorners);
+ PetscInt nC = 0, closureSize, *closure = NULL;
- err = DMPlexGetCone(dmMesh, c, &cone);PYLITH_CHECK_ERROR(err);
- for(PetscInt p = 0; p < coneSize; ++p) {
- const PetscInt gv = gvertex[cone[p]-vStart];
- (*cells)[index++] = gv < 0 ? -(gv+1) : gv;
+ // TODO: VERTEX ORDER
+ err = DMPlexGetTransitiveClosure(dmMesh, c, PETSC_TRUE, &closureSize, &closure);PYLITH_CHECK_ERROR(err);
+ for (PetscInt cl = 0; cl < closureSize*2; cl += 2) {
+ if ((closure[cl] >= vStart) && (closure[cl] < vEnd)) {
+ const PetscInt gv = gvertex[closure[cl]-vStart];
+ (*cells)[index++] = gv < 0 ? -(gv+1) : gv;
+ ++nC;
+ }
} // for
+ err = DMPlexRestoreTransitiveClosure(dmMesh, c, PETSC_TRUE, &closureSize, &closure);PYLITH_CHECK_ERROR(err);
+ assert(nC == *numCorners);
} // for
PYLITH_METHOD_END;
Modified: short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityExplicit.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityExplicit.cc 2013-05-18 01:13:56 UTC (rev 22106)
+++ short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityExplicit.cc 2013-05-18 19:46:28 UTC (rev 22107)
@@ -348,11 +348,6 @@
PYLITH_METHOD_END;
} // testStableTimeStep
-
-// ----------------------------------------------------------------------
-extern PetscErrorCode DMPlexBuildFromCellList_Private(PetscDM dm, PetscInt numCells, PetscInt numVertices, PetscInt numCorners, const int cells[]);
-extern PetscErrorCode DMPlexBuildCoordinates_Private(PetscDM dm, PetscInt spaceDim, PetscInt numCells, PetscInt numVertices, const double vertexCoords[]);
-
// Initialize elasticity integrator.
void
pylith::feassemble::TestElasticityExplicit::_initialize(topology::Mesh* mesh,
Modified: short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityExplicitLgDeform.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityExplicitLgDeform.cc 2013-05-18 01:13:56 UTC (rev 22106)
+++ short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityExplicitLgDeform.cc 2013-05-18 19:46:28 UTC (rev 22107)
@@ -241,11 +241,6 @@
PYLITH_METHOD_END;
} // testUpdateStateVars
-
-// ----------------------------------------------------------------------
-extern PetscErrorCode DMPlexBuildFromCellList_Private(DM dm, PetscInt numCells, PetscInt numVertices, PetscInt numCorners, const int cells[]);
-extern PetscErrorCode DMPlexBuildCoordinates_Private(DM dm, PetscInt spaceDim, PetscInt numCells, PetscInt numVertices, const double vertexCoords[]);
-
// Initialize elasticity integrator.
void
pylith::feassemble::TestElasticityExplicitLgDeform::_initialize(topology::Mesh* mesh,
Modified: short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityExplicitTet4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityExplicitTet4.cc 2013-05-18 01:13:56 UTC (rev 22106)
+++ short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityExplicitTet4.cc 2013-05-18 19:46:28 UTC (rev 22107)
@@ -335,11 +335,6 @@
PYLITH_METHOD_END;
} // testStableTimeStep
-
-// ----------------------------------------------------------------------
-extern PetscErrorCode DMPlexBuildFromCellList_Private(DM dm, PetscInt numCells, PetscInt numVertices, PetscInt numCorners, const int cells[]);
-extern PetscErrorCode DMPlexBuildCoordinates_Private(DM dm, PetscInt spaceDim, PetscInt numCells, PetscInt numVertices, const double vertexCoords[]);
-
// Initialize elasticity integrator.
void
pylith::feassemble::TestElasticityExplicitTet4::_initialize(topology::Mesh* mesh,
Modified: short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityExplicitTri3.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityExplicitTri3.cc 2013-05-18 01:13:56 UTC (rev 22106)
+++ short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityExplicitTri3.cc 2013-05-18 19:46:28 UTC (rev 22107)
@@ -335,10 +335,6 @@
PYLITH_METHOD_END;
} // testStableTimeStep
-// ----------------------------------------------------------------------
-extern PetscErrorCode DMPlexBuildFromCellList_Private(DM dm, PetscInt numCells, PetscInt numVertices, PetscInt numCorners, const int cells[]);
-extern PetscErrorCode DMPlexBuildCoordinates_Private(DM dm, PetscInt spaceDim, PetscInt numCells, PetscInt numVertices, const double vertexCoords[]);
-
// Initialize elasticity integrator.
void
pylith::feassemble::TestElasticityExplicitTri3::_initialize(topology::Mesh* mesh,
Modified: short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityImplicit.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityImplicit.cc 2013-05-18 01:13:56 UTC (rev 22106)
+++ short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityImplicit.cc 2013-05-18 19:46:28 UTC (rev 22107)
@@ -321,10 +321,6 @@
PYLITH_METHOD_END;
} // testStableTimeStep
-// ----------------------------------------------------------------------
-extern PetscErrorCode DMPlexBuildFromCellList_Private(DM dm, PetscInt numCells, PetscInt numVertices, PetscInt numCorners, const int cells[]);
-extern PetscErrorCode DMPlexBuildCoordinates_Private(DM dm, PetscInt spaceDim, PetscInt numCells, PetscInt numVertices, const double vertexCoords[]);
-
// Initialize elasticity integrator.
void
pylith::feassemble::TestElasticityImplicit::_initialize(topology::Mesh* mesh,
Modified: short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityImplicitLgDeform.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityImplicitLgDeform.cc 2013-05-18 01:13:56 UTC (rev 22106)
+++ short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityImplicitLgDeform.cc 2013-05-18 19:46:28 UTC (rev 22107)
@@ -243,10 +243,6 @@
PYLITH_METHOD_END;
} // testUpdateStateVars
-// ----------------------------------------------------------------------
-extern PetscErrorCode DMPlexBuildFromCellList_Private(DM dm, PetscInt numCells, PetscInt numVertices, PetscInt numCorners, const int cells[]);
-extern PetscErrorCode DMPlexBuildCoordinates_Private(DM dm, PetscInt spaceDim, PetscInt numCells, PetscInt numVertices, const double vertexCoords[]);
-
// Initialize elasticity integrator.
void
pylith::feassemble::TestElasticityImplicitLgDeform::_initialize(topology::Mesh* mesh,
More information about the CIG-COMMITS
mailing list