[cig-commits] r12789 - short/3D/PyLith/trunk/libsrc/faults
knepley at geodynamics.org
knepley at geodynamics.org
Wed Sep 3 07:03:31 PDT 2008
Author: knepley
Date: 2008-09-03 07:03:30 -0700 (Wed, 03 Sep 2008)
New Revision: 12789
Modified:
short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc
Log:
Fixed problem with 4 nodes on a fault (I think)
Modified: short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc 2008-09-03 13:06:56 UTC (rev 12788)
+++ short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc 2008-09-03 14:03:30 UTC (rev 12789)
@@ -552,6 +552,7 @@
PointSet replaceVertices;
ALE::ISieveVisitor::PointRetriever<sieve_type> sV2(std::max(1, ifaultSieve->getMaxSupportSize()));
ALE::ISieveVisitor::NConeRetriever<sieve_type> cV2(*ifaultSieve, (size_t) pow(std::max(1, ifaultSieve->getMaxConeSize()), ifault->depth()));
+ std::set<Mesh::point_type> faceSet;
for(Mesh::label_sequence::iterator f_iter = faces->begin(); f_iter != faces->end(); ++f_iter, ++newPoint) {
const Mesh::point_type face = *f_iter;
@@ -562,8 +563,6 @@
Mesh::point_type otherCell;
if (debug) std::cout << " Checking orientation against cell " << cell << std::endl;
- selection::getOrientedFace(mesh, cell, &vertexRenumber, numCorners, indices, &origVertices, &faceVertices);
-
ALE::ISieveTraversal<sieve_type>::orientedClosure(*ifaultSieve, face, cV2);
const int coneSize = cV2.getSize();
const Mesh::point_type *faceCone = cV2.getPoints();
@@ -572,6 +571,11 @@
//const Mesh::point_type *faceCone = cV2.getSize() ? cV2.getPoints() : &face;
bool found = true;
+ for(int i = 0; i < coneSize; ++i) faceSet.insert(faceCone[i]);
+ selection::getOrientedFace(mesh, cell, &faceSet, numCorners, indices, &origVertices, &faceVertices);
+ faceSet.clear();
+ ///selection::getOrientedFace(mesh, cell, &vertexRenumber, numCorners, indices, &origVertices, &faceVertices);
+
if (numFaultCorners == 0) {
found = false;
} else if (numFaultCorners == 2) {
@@ -608,6 +612,13 @@
}
}
}
+ if (!found) {
+ std::cout << "Considering fault face " << face << std::endl;
+ std::cout << " bordered by cells " << cell << " and " << otherCell << std::endl;
+ for(int c = 0; c < coneSize; ++c) {
+ std::cout << " Checking " << faceCone[c] << " against " << faceVertices[c] << std::endl;
+ }
+ }
assert(found);
}
noReplaceCells.insert(otherCell);
More information about the cig-commits
mailing list