[MOAB-dev] r2695 - MOAB/trunk/tools/dagmc
wilsonp at engr.wisc.edu
wilsonp at engr.wisc.edu
Tue Mar 10 13:49:10 CDT 2009
Author: wilsonp
Date: 2009-03-10 13:49:10 -0500 (Tue, 10 Mar 2009)
New Revision: 2695
Modified:
MOAB/trunk/tools/dagmc/ray_fire_test.cc
Log:
Bug fix: need to specify source volume index too in case source point
is now in volume other than idx=1.
Modified: MOAB/trunk/tools/dagmc/ray_fire_test.cc
===================================================================
--- MOAB/trunk/tools/dagmc/ray_fire_test.cc 2009-03-10 18:41:52 UTC (rev 2694)
+++ MOAB/trunk/tools/dagmc/ray_fire_test.cc 2009-03-10 18:49:10 UTC (rev 2695)
@@ -33,16 +33,17 @@
{
MBErrorCode rval;
- if (argc < 4) {
+ if (argc < 6) {
std::cerr << "Usage: " << argv[0] << " <mesh_filename> "
- << " <facet_tol> <source_rad> <#calls> " << std::endl;
+ << " <facet_tol> <source_rad> <vol_index> <#calls> " << std::endl;
return 1;
}
char* filename = argv[1];
double facet_tol = atof(argv[2]);
double rad = atof(argv[3]);
- int ncalls = atoi(argv[4]);
+ int vol_idx = atoi(argv[4]);
+ int ncalls = atoi(argv[5]);
DagMC& dagmc = *DagMC::instance();
@@ -52,7 +53,7 @@
return 2;
}
- MBEntityHandle vol = dagmc.entity_by_index(3, 2);
+ MBEntityHandle vol = dagmc.entity_by_index(3, vol_idx);
if (0 == vol) {
std::cerr << "Problem getting first volume." << std::endl;
return 2;
More information about the moab-dev
mailing list