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

sjackson at cae.wisc.edu sjackson at cae.wisc.edu
Fri Jun 17 15:29:33 CDT 2011


Author: sjackson
Date: 2011-06-17 15:29:32 -0500 (Fri, 17 Jun 2011)
New Revision: 5023

Modified:
   MOAB/trunk/tools/dagmc/DagMC.cpp
   MOAB/trunk/tools/dagmc/DagMC.hpp
Log:
Make DagMC consistently use double[3] as its coordinate format
for all public functions.

Add const qualifiers where appropriate

Clarify more documentation

Modified: MOAB/trunk/tools/dagmc/DagMC.cpp
===================================================================
--- MOAB/trunk/tools/dagmc/DagMC.cpp	2011-06-17 19:11:24 UTC (rev 5022)
+++ MOAB/trunk/tools/dagmc/DagMC.cpp	2011-06-17 20:29:32 UTC (rev 5023)
@@ -908,7 +908,7 @@
 
 
 // detemine distance to nearest surface
-ErrorCode DagMC::closest_to_location( EntityHandle volume, double* coords, double& result)
+ErrorCode DagMC::closest_to_location( EntityHandle volume, const double coords[3], double& result)
 {
     // Get OBB Tree for volume
   assert(volume - setOffset < rootSets.size());
@@ -1099,16 +1099,11 @@
   return MB_SUCCESS;
 }
 
-ErrorCode DagMC::get_angle(EntityHandle surf, 
-                              double xxx, double yyy, double zzz, double *ang)
+ErrorCode DagMC::get_angle(EntityHandle surf, const double in_pt[3], double angle[3] )
 {
   EntityHandle root = rootSets[surf - setOffset];
   
-  const double in_pt[] = { xxx, yyy, zzz };
-  //std::vector<EntityHandle> &facets = triList;
-  std::vector<EntityHandle> facets; // = triList;
-  //facets.clear();
-  //ErrorCode rval = obbTree.closest_to_location( in_pt, root, add_dist_tol(), facets );
+  std::vector<EntityHandle> facets;
   ErrorCode rval = obbTree.closest_to_location( in_pt, root, numericalPrecision, facets );
   assert(MB_SUCCESS == rval);
   if (MB_SUCCESS != rval) return rval;
@@ -1130,7 +1125,7 @@
   }
   
   normal.normalize();
-  normal.get( ang );
+  normal.get( angle );
 
   return MB_SUCCESS;
 }

Modified: MOAB/trunk/tools/dagmc/DagMC.hpp
===================================================================
--- MOAB/trunk/tools/dagmc/DagMC.hpp	2011-06-17 19:11:24 UTC (rev 5022)
+++ MOAB/trunk/tools/dagmc/DagMC.hpp	2011-06-17 20:29:32 UTC (rev 5023)
@@ -173,7 +173,7 @@
    * optional ray direction (u,v,w).
    * @param volume The volume to test
    * @param xyz The location to test for volume containment
-   * @param result 0 if xyz it outside volume, 1 if inside, and -1 if on boundary.


More information about the moab-dev mailing list