[MOAB-dev] r4052 - MOAB/trunk/src/io

jain at mcs.anl.gov jain at mcs.anl.gov
Tue Jul 13 13:24:22 CDT 2010


Author: jain
Date: 2010-07-13 13:24:22 -0500 (Tue, 13 Jul 2010)
New Revision: 4052

Modified:
   MOAB/trunk/src/io/WriteCCMIO.cpp
Log:
o Assigning material name, same as material label for differentiating regions.
o Changed Max. MapId to be total number of elements instead of that individual material max element number
o Handling one hex case


Modified: MOAB/trunk/src/io/WriteCCMIO.cpp
===================================================================
--- MOAB/trunk/src/io/WriteCCMIO.cpp	2010-07-12 23:27:29 UTC (rev 4051)
+++ MOAB/trunk/src/io/WriteCCMIO.cpp	2010-07-13 18:24:22 UTC (rev 4052)
@@ -481,7 +481,11 @@
       strcpy(dum_name,temp_str.c_str());
       CCMIONewIndexedEntity(&error, problemID, kCCMIOCellType, matset_data[i].matsetId, 
                             dum_name, &id);
-      CHKCCMERR(error, "Failure creating celltype node.");
+      CHKCCMERR(error, "Failure creating celltype node."); 
+  
+      CCMIOWriteOptstr(&error, id, "MaterialType", dum_name);
+      CHKCCMERR(error, "Error assigning material name.");
+    
       os.str("");
     }
     rval = write_int_option("MaterialId", matset_data[i].setHandle, mMaterialIdTag, id);
@@ -869,11 +873,11 @@
   CCMIOID cellMapID, cells;
   CCMIOError error = kCCMIONoErr;
   
-    // don't usually have anywhere near 31 nodes per element
+  // don't usually have anywhere near 31 nodes per element
   connect.reserve(31);
   Range::const_iterator rit;
 
-    // create the topology node, and the cell and cell map nodes
+  // create the topology node, and the cell and cell map nodes
   CCMIONewEntity(&error, rootID, kCCMIOTopology, "Topology", &topologyID);
   CHKCCMERR(error, "Trouble creating topology node.");
 
@@ -883,10 +887,11 @@
   CCMIONewEntity(&error, topologyID, kCCMIOCells, "Cells", &cells);
   CHKCCMERR(error, "Trouble creating Cell node under Topology node.");
 
-    //================================================
-    // loop over material sets, doing each one at a time
-    //================================================
+  //================================================
+  // loop over material sets, doing each one at a time
+  //================================================
   Range all_elems;
+  int internal_faces_flag = 0;
   unsigned int i, num_elems = 0;
   int max_id = 1;
   std::vector<int> egids;
@@ -899,9 +904,9 @@
 
     unsigned int this_num = matset_data[m].elems.size();
 
-      //================================================


More information about the moab-dev mailing list