[MOAB-dev] r4071 - in MOAB/trunk: src/io tools/dagmc

bmsmith6 at wisc.edu bmsmith6 at wisc.edu
Mon Aug 2 11:25:12 CDT 2010


Author: bmsmith
Date: 2010-08-02 11:25:12 -0500 (Mon, 02 Aug 2010)
New Revision: 4071

Modified:
   MOAB/trunk/src/io/ReadNCDF.cpp
   MOAB/trunk/tools/dagmc/cub2h5m.cc
Log:
-Summarize dead elements when reading an exodus file after updating node
coordinates.
-Enable cub2h5m to create new DAG-MCNP material groups with density 
altered so that mass is conserved through the deformation.



Modified: MOAB/trunk/src/io/ReadNCDF.cpp
===================================================================
--- MOAB/trunk/src/io/ReadNCDF.cpp	2010-07-27 21:53:46 UTC (rev 4070)
+++ MOAB/trunk/src/io/ReadNCDF.cpp	2010-08-02 16:25:12 UTC (rev 4071)
@@ -2053,6 +2053,8 @@
   // For each block
   int first_elem_id_in_block = 0;
   int block_count = 1; // NetCDF variables start with 1
+  int total_elems = 0;
+  int total_dead_elems = 0;
   for(std::vector<ReadBlockData>::iterator i=blocksLoading.begin();
       i!=blocksLoading.end(); ++i) {
 
@@ -2219,11 +2221,14 @@
     // Print some statistics
     temp_ss.str("");
     temp_ss << i->blockId;
+    total_dead_elems += dead_elem_counter;
+    total_elems      += i->numElements;
     std::cout << "  Block " << temp_ss.str() << " has " << dead_elem_counter << "/"
               << i->numElements << " dead elements." << std::endl;
     if(0 != missing_elem_counter) {
       std::cout << "    " << missing_elem_counter 
-                << " dead elements in this block were not found in the cub_file_set. " << std::endl;
+                << " dead elements in this block were not found in the cub_file_set. "
+                << std::endl;
     }
  
     // advance the pointers into element ids and block_count. memory cleanup.
@@ -2233,6 +2238,9 @@
 
   }
 
+  std::cout << " Total: " << total_dead_elems << "/" << total_elems 
+            << " dead elements." << std::endl;
+
   return MB_SUCCESS;
 }
  

Modified: MOAB/trunk/tools/dagmc/cub2h5m.cc
===================================================================
--- MOAB/trunk/tools/dagmc/cub2h5m.cc	2010-07-27 21:53:46 UTC (rev 4070)
+++ MOAB/trunk/tools/dagmc/cub2h5m.cc	2010-08-02 16:25:12 UTC (rev 4071)
@@ -10,6 +10,7 @@
 #include "DagMC.hpp"
 #include <limits>
 #include <cstdlib>
+#include <sstream>
 #include <time.h>
 


More information about the moab-dev mailing list