[MOAB-dev] r4934 - in MOAB/trunk: src test/parallel

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Thu Jun 2 16:45:47 CDT 2011


Author: kraftche
Date: 2011-06-02 16:45:47 -0500 (Thu, 02 Jun 2011)
New Revision: 4934

Modified:
   MOAB/trunk/src/Core.cpp
   MOAB/trunk/test/parallel/parallel_hdf5_test.cc
Log:
fix a few spots in test that used old syntax for setting global/mesh tag value

Modified: MOAB/trunk/src/Core.cpp
===================================================================
--- MOAB/trunk/src/Core.cpp	2011-06-02 21:45:26 UTC (rev 4933)
+++ MOAB/trunk/src/Core.cpp	2011-06-02 21:45:47 UTC (rev 4934)
@@ -115,13 +115,18 @@
 // check and allowing applications to safely request tag data for no
 // entities.
 
+static void warn_null_array_mesh_tag()
+{
+  std::cerr << "WARNING: Accepting empty array to indicate mesh tag" << std::endl; \
+}
+
 #ifdef ALLOW_NULL_FOR_MESH_TAG
 # define CHECK_MESH_NULL \
   EntityHandle root = 0; \
   if (NULL == entity_handles && 0 == num_entities) { \
     entity_handles = &root; \
     num_entities = 1; \
-    std::cerr << "WARNING: Accepting empty array to indicate mesh tag" << std::endl; \
+    warn_null_array_mesh_tag(); \
   } 
 #elif defined(DISALLOW_EMPTY_HANDLE_LIST_FOR_TAGS)
 # define CHECK_MESH_NULL \

Modified: MOAB/trunk/test/parallel/parallel_hdf5_test.cc
===================================================================
--- MOAB/trunk/test/parallel/parallel_hdf5_test.cc	2011-06-02 21:45:26 UTC (rev 4933)
+++ MOAB/trunk/test/parallel/parallel_hdf5_test.cc	2011-06-02 21:45:47 UTC (rev 4934)
@@ -750,7 +750,8 @@
                               MB_TAG_DENSE|MB_TAG_EXCL, global_default_value );
     CHECK_ERR(rval);
     if (global_mesh_value) {
-      rval = mb.tag_set_data( global_tag, 0, 0, global_mesh_value );
+      EntityHandle root = 0;
+      rval = mb.tag_set_data( global_tag, &root, 1, global_mesh_value );
       CHECK_ERR(rval);
     }
   }
@@ -1062,7 +1063,8 @@
   rval = mb.tag_get_default_value( tag, &mesh_def_val );
   CHECK_ERR(rval);
   CHECK_EQUAL( def_val, mesh_def_val );
-  rval = mb.tag_get_data( tag, 0, 0, &mesh_gbl_val );
+  EntityHandle root = 0;
+  rval = mb.tag_get_data( tag, &root, 1, &mesh_gbl_val );
   CHECK_ERR(rval);
   CHECK_EQUAL( global_val, mesh_gbl_val );
 }




More information about the moab-dev mailing list