[MOAB-dev] r5895 - in MOAB/trunk: src src/io src/moab test/parallel

iulian at mcs.anl.gov iulian at mcs.anl.gov
Tue Dec 4 15:14:02 CST 2012


Author: iulian
Date: 2012-12-04 15:14:02 -0600 (Tue, 04 Dec 2012)
New Revision: 5895

Modified:
   MOAB/trunk/src/Util.cpp
   MOAB/trunk/src/io/ReadNC.cpp
   MOAB/trunk/src/io/ReadNC.hpp
   MOAB/trunk/src/moab/Util.hpp
   MOAB/trunk/test/parallel/Makefile.am
   MOAB/trunk/test/parallel/ucdtrvpart.cpp
Log:
fix the ucdtrvpart test
resolve_shared_ents works now for ucd reader;
added utility to get the gather set and entities
the file_id_tag and global id tag are now different tags
global id tag will be used by gather to identify the entities to gather to
file_id_tag will continue to be used for resolving shared entities


Modified: MOAB/trunk/src/Util.cpp
===================================================================
--- MOAB/trunk/src/Util.cpp	2012-12-01 00:05:56 UTC (rev 5894)
+++ MOAB/trunk/src/Util.cpp	2012-12-04 21:14:02 UTC (rev 5895)
@@ -177,5 +177,33 @@
 
 }
 */
+ErrorCode Util::gather_set(Interface * MB, EntityHandle & gather_set){
+  Tag gathersettag;
+  ErrorCode rval = MB->tag_get_handle("GATHER_SET", 1, MB_TYPE_INTEGER, gathersettag,
+       MB_TAG_SPARSE);
+  if (rval!=MB_SUCCESS)
+    return rval;
 
+  int gatherval = 1;
+  void *vals[] = {&gatherval};
+  Range gathersets;
+  rval = MB->get_entities_by_type_and_tag( 0, MBENTITYSET, &gathersettag,
+                                             vals, 1, gathersets );
+  if (rval!=MB_SUCCESS)
+    return rval;
+  if (gathersets.empty())
+    return MB_ENTITY_NOT_FOUND;
+  gather_set = gathersets[0];
+
+  return MB_SUCCESS;
+}
+
+ErrorCode Util::gather_set_entities(Interface * MB, EntityHandle & gather_set, Range & ents)
+{
+  ErrorCode rval = Util::gather_set(MB, gather_set);
+  if (rval!=MB_SUCCESS)
+    return rval;
+  rval = MB->get_entities_by_handle(gather_set, ents);
+  return rval;
+}
 } // namespace moab

Modified: MOAB/trunk/src/io/ReadNC.cpp
===================================================================
--- MOAB/trunk/src/io/ReadNC.cpp	2012-12-01 00:05:56 UTC (rev 5894)
+++ MOAB/trunk/src/io/ReadNC.cpp	2012-12-04 21:14:02 UTC (rev 5895)
@@ -35,7 +35,7 @@
 
 ReadNC::ReadNC(Interface* impl) :
   mbImpl(impl), CPU_WORD_SIZE(-1), IO_WORD_SIZE(-1), fileId(-1), tMin(-1), tMax(-1), iDim(-1), jDim(-1), tDim(-1), iCDim(-1),
-  jCDim(-1), numUnLim(-1), mCurrentMeshHandle(0), startVertex(0), startElem(0), mGlobalIdTag(0), max_line_length(-1),
+  jCDim(-1), numUnLim(-1), mCurrentMeshHandle(0), startVertex(0), startElem(0), mGlobalIdTag(0), mpFileIdTag(NULL), max_line_length(-1),
   max_str_length(-1), vertexOffset(0), dbgOut(stderr), isParallel(false), partMethod(-1), camType(NOT_CAM), isCf(false),
   spectralOrder(-1), npMesh(false), 


More information about the moab-dev mailing list