[MOAB-dev] r2648 - in MOAB/trunk: . tools/dagmc

janehu at mcs.anl.gov janehu at mcs.anl.gov
Thu Feb 19 13:36:01 CST 2009


Author: janehu
Date: 2009-02-19 13:36:00 -0600 (Thu, 19 Feb 2009)
New Revision: 2648

Modified:
   MOAB/trunk/ReadNCDF.cpp
   MOAB/trunk/tools/dagmc/main.cc
Log:
Removed unnecessary codes.

Modified: MOAB/trunk/ReadNCDF.cpp
===================================================================
--- MOAB/trunk/ReadNCDF.cpp	2009-02-18 21:00:01 UTC (rev 2647)
+++ MOAB/trunk/ReadNCDF.cpp	2009-02-19 19:36:00 UTC (rev 2648)
@@ -2113,10 +2113,7 @@
   {
     int id = ptr[i];
     void * data[1] = {&id};
-    double coords[3] = {0, 0, 0};
-    //check for coords.
-    if(!entities.empty())
-      mdbImpl->get_coords(entities, coords);
+    double coords[3] = {0., 0., 0.};
 
     entities.clear();
     mdbImpl->get_entities_by_type_and_tag(entity_h, MBVERTEX, globalId, data, 1, entities);
@@ -2134,9 +2131,6 @@
     if(numberDimensions_loading == 3 )
       coords[2] = orig_coords[2][i] + deformed_arrays[2][i];
 
-    else
-      coords[2] = 0.0;
-
     mdbImpl->set_coords(entities, coords);
   }
   return MB_SUCCESS;

Modified: MOAB/trunk/tools/dagmc/main.cc
===================================================================
--- MOAB/trunk/tools/dagmc/main.cc	2009-02-18 21:00:01 UTC (rev 2647)
+++ MOAB/trunk/tools/dagmc/main.cc	2009-02-19 19:36:00 UTC (rev 2648)
@@ -4,6 +4,9 @@
 #include "MBCore.hpp"
 #include "cgm2moab.hpp"
 #include "cubfile.h"
+#include "Tqdcfr.hpp"
+#include "FileOptions.hpp"
+#include "ReadNCDF.hpp"
 
 #define GF_CUBIT_FILE_TYPE    "CUBIT"
 #define GF_STEP_FILE_TYPE     "STEP"
@@ -158,6 +161,18 @@
       exit(2);
     }
     
+    MBCore *my_impl = new MBCore();
+    Tqdcfr *my_tqd = new Tqdcfr(my_impl);
+    ReadNCDF my_ex_reader(my_impl);
+    MBEntityHandle file_set;
+    FileOptions opts(NULL);
+
+    MBErrorCode result = my_tqd->load_file(input_name, file_set, opts, 0, 0);
+
+    //opts = "tdata=coord, 100, sum, temp.exo";
+    opts = "tdata=coord, 100, set, temp.exo";
+    result =  my_ex_reader.load_file("pin_only05m_idmps-out.e", file_set, opts, 0 , 0);
+
     int rval = cub_file_type( cub_file, tmp_file, CUB_FILE_ACIS );
     fclose( cub_file );
     fclose( tmp_file );



More information about the moab-dev mailing list