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

sjackson at cae.wisc.edu sjackson at cae.wisc.edu
Fri Aug 12 12:38:15 CDT 2011


Author: sjackson
Date: 2011-08-12 12:38:14 -0500 (Fri, 12 Aug 2011)
New Revision: 5100

Modified:
   MOAB/trunk/tools/dagmc/DagMC.cpp
   MOAB/trunk/tools/dagmc/DagMC.hpp
   MOAB/trunk/tools/dagmc/ray_fire_test.cc
   MOAB/trunk/tools/dagmc/test_geom.cc
Log:
Updates and simplifications for DagMC interface

* Remove DagMC::read_settings and DagMC::write_settings, which have been
  deprecated and unused for a while.
* Remove DagMC::get_settings, which is redundant with respect to
  other getter functions in the interface (use_CAD, overlap_thickness, and
  faceting_tolerance).
* Remove DagMC::set_settings, replacing it with individual set_* calls
  (the new public calls are set_overlap_thickness, set_numerical_precision,
  and set_use_CAD)
* Remove DagMC::parse_settings, which was only used to initialize default
  values from within DagMC constructor.  Now initialize those values
  directly in constructor.
* Remove DagMC's source cell member and associated functions.  This is
  a value unique to dag-mcnp5 and need not be stored in the library.
* Remove DagMC's distance limit member.  It is replaced with an optional
  parameter to ray_fire.
* Clarify the behavior of ray_fire when no surface intersections are detected.
* Update tests to coincide with these interface changes.

Modified: MOAB/trunk/tools/dagmc/DagMC.cpp
===================================================================
--- MOAB/trunk/tools/dagmc/DagMC.cpp	2011-08-12 17:37:00 UTC (rev 5099)
+++ MOAB/trunk/tools/dagmc/DagMC.cpp	2011-08-12 17:38:14 UTC (rev 5100)
@@ -121,16 +121,11 @@
     n_pt_in_vol_calls(0), n_ray_fire_calls(0)
 {
     // This is the correct place to uniquely define default values for the dagmc settings
-  options[0] = Option( "source_cell",        "source cell ID, or zero if unknown", "0" );
-  options[1] = Option( "overlap_thickness",  "nonnegative real value", "0" );
-  options[2] = Option( "use_distance_limit", "one to enable distance limit optimization, zero otherwise", "0" );
-  options[3] = Option( "use_cad",            "one to ray-trace to cad, zero for just facets", "0" );
-  options[4] = Option( "faceting_tolerance", "graphics faceting tolerance", "0.001" );
-  options[5] = Option( "numerical_precision","positive real value", "0.001" );
-
-    // call parse settings to initialize default values for settings from options
-  parse_settings();
-
+  overlapThickness = 0; // must be nonnegative 
+  defaultFacetingTolerance = .001;
+  numericalPrecision = .001; 
+  useCAD = false;  
+  
   memset( specReflectName, 0, NAME_TAG_SIZE );
   strcpy( specReflectName, "spec_reflect" );
   memset( whiteReflectName, 0, NAME_TAG_SIZE );
@@ -138,9 +133,6 @@
   memset( implComplName, 0, NAME_TAG_SIZE );
   strcpy( implComplName , "impl_complement" );
 
-  distanceLimit = std::numeric_limits<double>::max();
-
- 
 }
 
 
@@ -160,6 +152,7 @@
   InitCGMA::initialize_cgma();
 #endif
 
+  facetingTolerance = defaultFacetingTolerance;
     // override default value of facetingTolerance with passed value
   if (facet_tolerance > 0 )
     facetingTolerance = facet_tolerance;
@@ -573,7 +566,7 @@
 ErrorCode DagMC::ray_fire(const EntityHandle vol, 
                           const double point[3], const double dir[3],
                           EntityHandle& next_surf, double& next_surf_dist,
-                          RayHistory* history, 
+                          RayHistory* history, double user_dist_limit,
                           OrientedBoxTreeTool::TrvStats* stats ) { 


More information about the moab-dev mailing list