[cig-commits] r19482 - short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/topology
brad at geodynamics.org
brad at geodynamics.org
Thu Jan 26 10:24:53 PST 2012
Author: brad
Date: 2012-01-26 10:24:53 -0800 (Thu, 26 Jan 2012)
New Revision: 19482
Modified:
short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/topology/MeshRefiner.cc
short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/topology/RefineEdges2.cc
short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/topology/RefineFace4Edges2.cc
short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/topology/RefineVol8Face4Edges2.cc
Log:
Removed obsolete overlap debugging stuff from Refine*.cc. Add overlap debugging output to MeshRefiner (wait until after overlap assemble. Added some simple consistency checks of the new overlaps following refinement (could be replaced by appropriate tests).
Modified: short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/topology/MeshRefiner.cc
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/topology/MeshRefiner.cc 2012-01-26 15:45:03 UTC (rev 19481)
+++ short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/topology/MeshRefiner.cc 2012-01-26 18:24:53 UTC (rev 19482)
@@ -795,6 +795,47 @@
// We have to do flexible assembly since we add the new vertices separately
newSendOverlap->assemble();
newRecvOverlap->assemble();
+
+
+ // Verify size of new send/recv overlaps are at least as big as the
+ // original ones.
+ if (newSendOverlap->getNumRanks() != sendOverlap->getNumRanks() ||
+ newRecvOverlap->getNumRanks() != recvOverlap->getNumRanks() ||
+ newSendOverlap->getNumRanks() != newRecvOverlap->getNumRanks()) {
+
+ std::cerr << "DEBUGGING INFO"
+ << ", newSendOverlap: " << newSendOverlap->getNumRanks()
+ << ", sendOverlap: " << sendOverlap->getNumRanks()
+ << ", newRecvOverlap: " << newRecvOverlap->getNumRanks()
+ << ", recvOverlap: " << recvOverlap->getNumRanks()
+ << std::endl;
+ throw std::logic_error("Error in constructing new overlaps during mesh "
+ "refinement.\nMismatch in number of ranks.");
+ } // if
+
+ const int numRanks = newSendOverlap->getNumRanks();
+ for (int isend=0; isend < numRanks; ++isend) {
+ const int rank = newSendOverlap->getRank(isend);
+ const int irecv = newRecvOverlap->getRankIndex(rank);
+ if (rank != sendOverlap->getRank(isend) ||
+ rank != recvOverlap->getRank(irecv)) {
+ throw std::logic_error("Error in constructing new overlaps during mesh "
+ "refinement.\nMismatch in ranks.");
+ } // if
+
+ if (newSendOverlap->getNumPointsByRank(rank) < sendOverlap->getNumPointsByRank(rank) ||
+ newRecvOverlap->getNumPointsByRank(rank) < sendOverlap->getNumPointsByRank(rank)) {
+ throw std::logic_error("Error in constructing new overlaps during mesh "
+ "refinement.\nInvalid size for new overlaps.");
+ } // if
+ } // for
+
+#if 1 // DEBUGGING
+ sendOverlap->view("OLD SEND OVERLAP");
+ recvOverlap->view("OLD RECV OVERLAP");
+ newSendOverlap->view("NEW SEND OVERLAP");
+ newRecvOverlap->view("NEW RECV OVERLAP");
+#endif
} // _calcNewOverlap
Modified: short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/topology/RefineEdges2.cc
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/topology/RefineEdges2.cc 2012-01-26 15:45:03 UTC (rev 19481)
+++ short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/topology/RefineEdges2.cc 2012-01-26 18:24:53 UTC (rev 19482)
@@ -300,13 +300,6 @@
} // if
} // for
} // for
-
-#if 0
- oldSendOverlap->view("OLD SEND OVERLAP");
- oldRecvOverlap->view("OLD RECV OVERLAP");
- newSendOverlap->view("NEW SEND OVERLAP");
- newRecvOverlap->view("NEW RECV OVERLAP");
-#endif
} // overlapAddNewVertces
Modified: short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/topology/RefineFace4Edges2.cc
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/topology/RefineFace4Edges2.cc 2012-01-26 15:45:03 UTC (rev 19481)
+++ short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/topology/RefineFace4Edges2.cc 2012-01-26 18:24:53 UTC (rev 19482)
@@ -345,13 +345,6 @@
}
} // for
} // for
-
-#if 0
- oldSendOverlap->view("OLD SEND OVERLAP");
- oldRecvOverlap->view("OLD RECV OVERLAP");
- newSendOverlap->view("NEW SEND OVERLAP");
- newRecvOverlap->view("NEW RECV OVERLAP");
-#endif
} // overlapAddNewVertces
Modified: short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/topology/RefineVol8Face4Edges2.cc
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/topology/RefineVol8Face4Edges2.cc 2012-01-26 15:45:03 UTC (rev 19481)
+++ short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/topology/RefineVol8Face4Edges2.cc 2012-01-26 18:24:53 UTC (rev 19482)
@@ -588,8 +588,7 @@
} // if
} // for
assert(localPoint >= orderNewMesh.verticesNormal().min() && localPoint < orderNewMesh.verticesNormal().max());
-#if 0
- // Debugging for fault edge problem
+#if 0 // Debugging for fault edge problem
assert(remotePoint >= 0);
#endif
if (remotePoint >= 0) {
@@ -598,13 +597,6 @@
}
} // for
} // for
-
-#if 0 // debuggin
- oldSendOverlap->view("OLD SEND OVERLAP");
- oldRecvOverlap->view("OLD RECV OVERLAP");
- newSendOverlap->view("NEW SEND OVERLAP");
- newRecvOverlap->view("NEW RECV OVERLAP");
-#endif
} // overlapAddNewVertces
More information about the CIG-COMMITS
mailing list