[MOAB-dev] r3010 - MOAB/trunk/tools/dagmc

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Tue Jul 14 17:08:53 CDT 2009


Author: kraftche
Date: 2009-07-14 17:08:53 -0500 (Tue, 14 Jul 2009)
New Revision: 3010

Modified:
   MOAB/trunk/tools/dagmc/pt_vol_test.cc
   MOAB/trunk/tools/dagmc/ray_fire_test.cc
   MOAB/trunk/tools/dagmc/test_geom.cc
Log:
update tests for change to DagMC interface

Modified: MOAB/trunk/tools/dagmc/pt_vol_test.cc
===================================================================
--- MOAB/trunk/tools/dagmc/pt_vol_test.cc	2009-07-14 22:02:12 UTC (rev 3009)
+++ MOAB/trunk/tools/dagmc/pt_vol_test.cc	2009-07-14 22:08:53 UTC (rev 3010)
@@ -64,8 +64,13 @@
 
   
   DagMC& dagmc = *DagMC::instance();
-  rval = dagmc.load_file_and_init( filename, strlen(filename), 0, 0 );
+  rval = dagmc.load_file( filename, 0 );
   if (MB_SUCCESS != rval) {
+    std::cerr << "Failed to load file." << std::endl;
+    return 2;
+  }
+  rval = dagmc.init_OBBTree( );
+  if (MB_SUCCESS != rval) {
     std::cerr << "Failed to initialize DagMC." << std::endl;
     return 2;
   }

Modified: MOAB/trunk/tools/dagmc/ray_fire_test.cc
===================================================================
--- MOAB/trunk/tools/dagmc/ray_fire_test.cc	2009-07-14 22:02:12 UTC (rev 3009)
+++ MOAB/trunk/tools/dagmc/ray_fire_test.cc	2009-07-14 22:08:53 UTC (rev 3010)
@@ -87,12 +87,18 @@
   if (i < argc) direction_az = atof(argv[i++]) * PI / 180.0;
   
   DagMC& dagmc = *DagMC::instance();
-  rval = dagmc.load_file_and_init( filename, strlen(filename), 0, 0, facet_tol);
+  rval = dagmc.load_file( filename, facet_tol );
   if (MB_SUCCESS != rval) {
+    std::cerr << "Failed to load file." << std::endl;
+    return 2;
+  }
+  rval = dagmc.init_OBBTree( );
+  if (MB_SUCCESS != rval) {
     std::cerr << "Failed to initialize DagMC." << std::endl;
     return 2;
   }
 
+
   MBEntityHandle vol = dagmc.entity_by_index(3, vol_idx);
   if (0 == vol) {
     std::cerr << "Problem getting first volume." << std::endl;

Modified: MOAB/trunk/tools/dagmc/test_geom.cc
===================================================================
--- MOAB/trunk/tools/dagmc/test_geom.cc	2009-07-14 22:02:12 UTC (rev 3009)
+++ MOAB/trunk/tools/dagmc/test_geom.cc	2009-07-14 22:08:53 UTC (rev 3010)
@@ -173,9 +173,14 @@
   }
   
   DagMC& dagmc = *DagMC::instance();
-  rval = dagmc.load_file_and_init( filename, strlen(filename), 0, 0 );
+  rval = dagmc.load_file( filename, 0 );
   remove( filename );
   if (MB_SUCCESS != rval) {
+    std::cerr << "Failed to load file." << std::endl;
+    return 2;
+  }
+  rval = dagmc.init_OBBTree();
+  if (MB_SUCCESS != rval) {
     std::cerr << "Failed to initialize DagMC." << std::endl;
     return 2;
   }



More information about the moab-dev mailing list