[MOAB-dev] r4557 - MOAB/trunk/test

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Wed Mar 9 10:20:23 CST 2011


Author: kraftche
Date: 2011-03-09 10:20:23 -0600 (Wed, 09 Mar 2011)
New Revision: 4557

Modified:
   MOAB/trunk/test/MBTest.cpp
Log:
add utility method that checks that no element has an invalid vertex handle in its connectivity and call that function from mb_entity_converstion_test

Modified: MOAB/trunk/test/MBTest.cpp
===================================================================
--- MOAB/trunk/test/MBTest.cpp	2011-03-09 16:19:35 UTC (rev 4556)
+++ MOAB/trunk/test/MBTest.cpp	2011-03-09 16:20:23 UTC (rev 4557)
@@ -96,6 +96,9 @@
 /* Create a regular 2x2x2 hex mesh */
 ErrorCode create_some_mesh( Interface* iface );
 
+ErrorCode check_valid_connectivity( Interface* iface );
+
+
   /*!
     @test 
     Vertex Coordinates
@@ -3343,6 +3346,8 @@
   OffsetHexCenterNodes function_object(MB,0.07, 0.15, 0);
 
   MB->convert_entities(meshset, false, false, true, &function_object);
+  if (MB_SUCCESS != check_valid_connectivity( MB ))
+    return MB_FAILURE;
 
   file_name = "hex_mid_volume_nodes.g";
   error = MB->write_mesh(file_name.c_str());
@@ -3376,6 +3381,8 @@
   MB->create_meshset(MESHSET_SET, meshset);
   MB->add_entities(meshset, entities);
   MB->convert_entities(meshset, true, true, true);
+  if (MB_SUCCESS != check_valid_connectivity( MB ))
+    return MB_FAILURE;
 
   file_name = "hex_mid_edge_face_vol_nodes.g";
   error = MB->write_mesh(file_name.c_str());
@@ -3412,6 +3419,8 @@
   MB->create_meshset(MESHSET_SET, meshset);
   MB->add_entities(meshset, entities);
   MB->convert_entities(meshset, true, false, false);
+  if (MB_SUCCESS != check_valid_connectivity( MB ))
+    return MB_FAILURE;
 
   file_name = "hex_mid_edge_nodes.g";
   error = MB->write_mesh(file_name.c_str());
@@ -3420,6 +3429,8 @@
   
     // convert them back to hex8's
   MB->convert_entities(meshset, false, false, false);
+  if (MB_SUCCESS != check_valid_connectivity( MB ))
+    return MB_FAILURE;
 
   entities.clear();
   MB->get_entities_by_type(0, MBVERTEX, entities);
@@ -3453,6 +3464,8 @@


More information about the moab-dev mailing list