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

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Fri Dec 7 16:33:51 CST 2007


Author: kraftche
Date: 2007-12-07 16:33:51 -0600 (Fri, 07 Dec 2007)
New Revision: 1453

Modified:
   MOAB/trunk/tools/dagmc/DagMC.cpp
   MOAB/trunk/tools/dagmc/DagMC.hpp
Log:
Portability fix from Byron: VC.Net 2002 things 'huge' is a keyword

Modified: MOAB/trunk/tools/dagmc/DagMC.cpp
===================================================================
--- MOAB/trunk/tools/dagmc/DagMC.cpp	2007-12-07 21:34:19 UTC (rev 1452)
+++ MOAB/trunk/tools/dagmc/DagMC.cpp	2007-12-07 22:33:51 UTC (rev 1453)
@@ -80,7 +80,7 @@
                              const int num_pts,
                              const double uuu, const double vvv, const double www,
                              const double xxx, const double yyy, const double zzz,
-                             const double huge,
+                             const double huge_val,
                              double &dist_traveled, MBEntityHandle &next_surf_hit) 
 {
   if (debug) {
@@ -105,7 +105,7 @@
   const double dir[] = {uuu, vvv, www};
   distances.clear();
   surfaces.clear();
-  double len = use_dist_limit() ? distance_limit() : huge;
+  double len = use_dist_limit() ? distance_limit() : huge_val;
 
   rval = obbTree.ray_intersect_sets( distances,
                                      surfaces, 
@@ -124,7 +124,7 @@
               << "need an ACIS-based install of CGM." << std::endl;
     return MB_NOT_IMPLEMENTED;
 #else    
-    rval = CAD_ray_intersect(point, dir, huge,
+    rval = CAD_ray_intersect(point, dir, huge_val,
                              distances, surfaces, len);
     if (MB_SUCCESS != rval) return rval;
 #endif
@@ -134,9 +134,9 @@
     // Find smallest intersection
   if (distances.empty()) {
     next_surf_hit = 0;
-    dist_traveled = (use_dist_limit() ? len*10.0 : huge);
+    dist_traveled = (use_dist_limit() ? len*10.0 : huge_val);
     if (debug) {
-      std::cout << "next surf hit = " << 0 << ", dist = (huge)" << std::endl;
+      std::cout << "next surf hit = " << 0 << ", dist = (huge_val)" << std::endl;
     }
     return MB_SUCCESS;
   }
@@ -151,9 +151,9 @@
       // Find smallest intersection
     if (distances.empty()) {
       next_surf_hit = 0;
-      dist_traveled = (use_dist_limit() ? distance_limit()*10.0 : huge);
+      dist_traveled = (use_dist_limit() ? distance_limit()*10.0 : huge_val);
       if (debug) {
-        std::cout << "next surf hit = " << 0 << ", dist = (huge)" << std::endl;
+        std::cout << "next surf hit = " << 0 << ", dist = (huge_val)" << std::endl;
       }
       return MB_SUCCESS;
     }
@@ -1380,7 +1380,7 @@
 
 MBErrorCode DagMC::CAD_ray_intersect(const double *point, 
                                       const double *dir, 
-                                      const double huge,
+                                      const double huge_val,
                                       std::vector<double> &distances,
                                       std::vector<MBEntityHandle> &surfaces, 
                                       double &len) 
@@ -1406,7 +1406,7 @@
       ray_params.reset();
       *dit = ray_params.get();
     }
-    else *dit = huge;
+    else *dit = huge_val;
   }
   
     // now bubble sort list

Modified: MOAB/trunk/tools/dagmc/DagMC.hpp
===================================================================
--- MOAB/trunk/tools/dagmc/DagMC.hpp	2007-12-07 21:34:19 UTC (rev 1452)
+++ MOAB/trunk/tools/dagmc/DagMC.hpp	2007-12-07 22:33:51 UTC (rev 1453)
@@ -34,7 +34,7 @@
                        const int num_pts,
                        const double uuu, const double vvv, const double www,
                        const double xxx, const double yyy, const double zzz,
-                       const double huge,
+                       const double huge_val,
                        double &dist_traveled, MBEntityHandle &next_surf_hit);
 
     // Test if point is inside or outside of a volume using unit sphere area method
@@ -153,7 +153,7 @@
 
   MBErrorCode CAD_ray_intersect(const double *point, 
                                 const double *dir, 
-                                const double huge,
+                                const double huge_val,
                                 std::vector<double> &distances,
                                 std::vector<MBEntityHandle> &surfaces, 
                                 double &len);




More information about the moab-dev mailing list