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

iulian at mcs.anl.gov iulian at mcs.anl.gov
Thu Jun 2 21:05:32 CDT 2011


Author: iulian
Date: 2011-06-02 21:05:31 -0500 (Thu, 02 Jun 2011)
New Revision: 4938

Modified:
   MOAB/trunk/src/FBEngine.cpp
Log:
fix more bugs;
internal edge split had a problem, triangles adjacent to the edge were not
split correctly 
advancing intersections also needs all edges to be created; change the 
create_flag to true.

the only scenario that is not supported is the one where 2 or more piercing
/ splitting points belong to the same initial triangle.



Modified: MOAB/trunk/src/FBEngine.cpp
===================================================================
--- MOAB/trunk/src/FBEngine.cpp	2011-06-03 01:26:24 UTC (rev 4937)
+++ MOAB/trunk/src/FBEngine.cpp	2011-06-03 02:05:31 UTC (rev 4938)
@@ -2024,7 +2024,9 @@
             {
               //find the edge between vertices
               std::vector<EntityHandle> edges1;
-              rval = _mbImpl->get_adjacencies(nn2, 2, 1, false, edges1,
+              // change the create flag to true, because that edge must exist in current triangle
+              // if we want to advance; nn2 are 2 nodes in current triangle!!
+              rval = _mbImpl->get_adjacencies(nn2, 2, 1, true, edges1,
                   Interface::INTERSECT);
               MBERRORR(rval, "Failed to get edges");
               if (edges1.size() != 1)
@@ -2081,7 +2083,9 @@
               {
                 //find the edge between vertices
                 std::vector<EntityHandle> edges1;
-                rval = _mbImpl->get_adjacencies(nn2, 2, 1, false, edges1,
+                // change the create flag to true, because that edge must exist in current triangle
+                     // if we want to advance; nn2 are 2 nodes in current triangle!!
+                rval = _mbImpl->get_adjacencies(nn2, 2, 1, true, edges1,
                     Interface::INTERSECT);
                 MBERRORR(rval, "Failed to get edges");
                 if (edges1.size() != 1)
@@ -2664,7 +2668,8 @@
     // node i is opposite to edge i
     int num2 = (num1+1)%3;
     int num3 = (num2+1)%3;
-    EntityHandle t1[]={conn3[num1], conn3[num2], newVertex};
+    // the edge from num1 to num2 is split into 2 edges
+    EntityHandle t1[]={conn3[num2], conn3[num3], newVertex};
     EntityHandle t2[]={conn3[num1], newVertex, conn3[num3]};
     EntityHandle newTriangle, newTriangle2;
     rval = _mbImpl->create_element(MBTRI, t1, 3, newTriangle);

















More information about the moab-dev mailing list