[MOAB-dev] r5949 - MOAB/trunk/src

tautges at mcs.anl.gov tautges at mcs.anl.gov
Tue Jan 22 13:01:10 CST 2013


Author: tautges
Date: 2013-01-22 13:01:10 -0600 (Tue, 22 Jan 2013)
New Revision: 5949

Modified:
   MOAB/trunk/src/MeshTopoUtil.cpp
Log:
Fix for bug #267, where MeshTopoUtil::star_entities wasn't working right.
For some reason, the adjacencies calls in that function and its callees were
passing false for create_if_missing, which was just plain wrong.


Modified: MOAB/trunk/src/MeshTopoUtil.cpp
===================================================================
--- MOAB/trunk/src/MeshTopoUtil.cpp	2013-01-22 18:37:01 UTC (rev 5948)
+++ MOAB/trunk/src/MeshTopoUtil.cpp	2013-01-22 19:01:10 UTC (rev 5949)
@@ -206,7 +206,7 @@
     
   int dim = mbImpl->dimension_from_handle(star_center);
   
-  ErrorCode result = mbImpl->get_adjacencies(from_ents, dim+1, false, to_ents);
+  ErrorCode result = mbImpl->get_adjacencies(from_ents, dim+1, true, to_ents);
   if (MB_SUCCESS != result) return result;
   
     // remove last_entity from result, and should only have 1 left, if any
@@ -224,9 +224,9 @@
 
   if (0 == last_dp1 && to_ents.size() > 1 && NULL != star_candidates_dp1 && 
       !star_candidates_dp1->empty()) {
-      // if we have a choice of to_ents and no previous dp1 and dp1 candidates, 
+      // if we have a choice of to_ents and no previous dp1 and there are dp1 candidates, 
       // the one we choose needs to be adjacent to one of the candidates
-    result = mbImpl->get_adjacencies(*star_candidates_dp1, dim+1, false,
+    result = mbImpl->get_adjacencies(*star_candidates_dp1, dim+1, true,
                                      from_ents, Interface::UNION);
     if (MB_SUCCESS != result) return result;
     to_ents = intersect( to_ents, from_ents);
@@ -243,7 +243,7 @@
   if (0 != star_candidates_dp1) to_ents = *star_candidates_dp1;
   else to_ents.clear();
   
-  result = mbImpl->get_adjacencies(&next_entity, 1, dim+2, false, to_ents);
+  result = mbImpl->get_adjacencies(&next_entity, 1, dim+2, true, to_ents);
   if (MB_SUCCESS != result) return result;
 
     // can't be last one



More information about the moab-dev mailing list