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

wilsonp at engr.wisc.edu wilsonp at engr.wisc.edu
Tue May 25 16:54:21 CDT 2010


Author: wilsonp
Date: 2010-05-25 16:54:21 -0500 (Tue, 25 May 2010)
New Revision: 3959

Modified:
   MOAB/trunk/tools/dagmc/pt_vol_test.cc
Log:
Add the ability to optionally specify a direction to the point in volume test.



Modified: MOAB/trunk/tools/dagmc/pt_vol_test.cc
===================================================================
--- MOAB/trunk/tools/dagmc/pt_vol_test.cc	2010-05-25 19:58:15 UTC (rev 3958)
+++ MOAB/trunk/tools/dagmc/pt_vol_test.cc	2010-05-25 21:54:21 UTC (rev 3959)
@@ -13,15 +13,14 @@
 
 using namespace moab;
 
-ErrorCode test_pt_volume(DagMC &dagmc, int volID, double xxx, double yyy, double zzz, int &inside)
+ErrorCode test_pt_volume(DagMC &dagmc, int volID, double xxx, double yyy, double zzz, int &inside,
+			 double uuu, double vvv, double www)
 {
   ErrorCode rval;
 
   EntityHandle vol = dagmc.entity_by_id(3,volID);
 
-  double u, v, w;
-  u=v=w=0;
-  rval = dagmc.point_in_volume( vol, xxx, yyy, zzz, inside, u, v, w);
+  rval = dagmc.point_in_volume( vol, xxx, yyy, zzz, inside, uuu, vvv, www);
   CHKERR;
   
   return MB_SUCCESS;
@@ -45,9 +44,9 @@
 {
   ErrorCode rval;
 
-  if (argc < 6) {
+  if (argc != 6 && argc != 9) {
     std::cerr << "Usage: " << argv[0] << " <mesh_filename> "
-              << " <vol_id> <xxx> <yyy> <zzz> " << std::endl;
+              << " <vol_id> <xxx> <yyy> <zzz> [<uuu> <vvv> <www>]" << std::endl;
     return 1;
   }
   
@@ -56,6 +55,16 @@
   double xxx = atof(argv[3]);
   double yyy = atof(argv[4]);
   double zzz = atof(argv[5]);
+  double uuu = 0;
+  double vvv = 0;
+  double www = 0;
+
+  if (argc > 6) {
+    uuu = atof(argv[6]);
+    vvv = atof(argv[7]);
+    www = atof(argv[8]);
+  }
+
   int inside;
   


More information about the moab-dev mailing list