[MOAB-dev] r4227 - in MOAB/trunk: MeshFiles/unittest/io src/io

tautges at mcs.anl.gov tautges at mcs.anl.gov
Tue Oct 19 20:07:27 CDT 2010


Author: tautges
Date: 2010-10-19 20:07:26 -0500 (Tue, 19 Oct 2010)
New Revision: 4227

Modified:
   MOAB/trunk/MeshFiles/unittest/io/cubtest.jou
   MOAB/trunk/MeshFiles/unittest/io/cubtest12.cub
   MOAB/trunk/src/io/Tqdcfr.cpp
   MOAB/trunk/src/io/Tqdcfr.hpp
Log:
Adding support for block, nodeset, and sideset names.  These now show up
as the normal "NAME" tags in MOAB.  Adding a sideset and nodeset (w/ names)
to the test file.

Passes make check.



Modified: MOAB/trunk/MeshFiles/unittest/io/cubtest.jou
===================================================================
--- MOAB/trunk/MeshFiles/unittest/io/cubtest.jou	2010-10-19 21:59:58 UTC (rev 4226)
+++ MOAB/trunk/MeshFiles/unittest/io/cubtest.jou	2010-10-20 01:07:26 UTC (rev 4227)
@@ -183,4 +183,13 @@
 block 715 vol 15
 mesh vol 15
 #
+# now some nodeset and sideset names
+nodeset 100 surface 1
+nodeset 100 name 'ns100'
+sideset 200 surface 2
+sideset 200 name 'ss200'
+#
+# now a group name
+group 'newgrp' add volume all
+#
 save as 'cubtest12.cub' overwrite

Modified: MOAB/trunk/MeshFiles/unittest/io/cubtest12.cub
===================================================================
(Binary files differ)

Modified: MOAB/trunk/src/io/Tqdcfr.cpp
===================================================================
--- MOAB/trunk/src/io/Tqdcfr.cpp	2010-10-19 21:59:58 UTC (rev 4226)
+++ MOAB/trunk/src/io/Tqdcfr.cpp	2010-10-20 01:07:26 UTC (rev 4227)
@@ -186,6 +186,16 @@
   mdbImpl->tag_get_handle(DIRICHLET_SET_TAG_NAME, nsTag);
   mdbImpl->tag_get_handle(NEUMANN_SET_TAG_NAME, ssTag);
 
+  if (0 == entityNameTag) {
+    ErrorCode result = mdbImpl->tag_get_handle(NAME_TAG_NAME, entityNameTag);
+    if (MB_SUCCESS != result || 0 == entityNameTag) {
+      char name_tag_data[NAME_TAG_SIZE];
+      memset( name_tag_data, 0, NAME_TAG_SIZE );
+      result = mdbImpl->tag_create(NAME_TAG_NAME, NAME_TAG_SIZE, MB_TAG_SPARSE, 
+                                   entityNameTag, &name_tag_data);
+    }
+  }
+
   cubMOABVertexMap = NULL;
 }
 
@@ -341,7 +351,7 @@
        blindex < mesh_model->feModelHeader.blockArray.numEntities;
        blindex++) {
     BlockHeader *block_header = &mesh_model->feBlockH[blindex];
-    result = read_block(data_version, mesh_model, block_header); 
+    result = read_block(blindex, data_version, mesh_model, block_header); 
     if (MB_SUCCESS != result)


More information about the moab-dev mailing list