[MOAB-dev] r1465 - MOAB/trunk/tools/dagmc
bmsmith at mcs.anl.gov
bmsmith at mcs.anl.gov
Tue Dec 11 11:58:50 CST 2007
Author: bmsmith
Date: 2007-12-11 11:58:50 -0600 (Tue, 11 Dec 2007)
New Revision: 1465
Modified:
MOAB/trunk/tools/dagmc/DagMC.cpp
Log:
Changed discard_dist_tol to 1e-8 and min_tol_intersections to 1000 in ray_fire.
Modified: MOAB/trunk/tools/dagmc/DagMC.cpp
===================================================================
--- MOAB/trunk/tools/dagmc/DagMC.cpp 2007-12-11 15:48:15 UTC (rev 1464)
+++ MOAB/trunk/tools/dagmc/DagMC.cpp 2007-12-11 17:58:50 UTC (rev 1465)
@@ -46,7 +46,7 @@
DagMC::DagMC(MBInterface *mb_impl)
: mbImpl(mb_impl), obbTree(mb_impl),
facetingTolerance(0.001),
- addDistTol(1e-6), discardDistTol(1e-6),
+ addDistTol(1e-6), discardDistTol(1e-8),
moabMCNPSourceCell(0), moabMCNPUseDistLimit(false)
{
options[0] = Option( "source_cell", "source cell ID, or zero if unknown", "0" );
@@ -108,7 +108,7 @@
distances.clear();
surfaces.clear();
double len = use_dist_limit() ? distance_limit() : huge_val;
- unsigned min_tolerance_intersections = 3;
+ unsigned min_tolerance_intersections = 1000;
rval = obbTree.ray_intersect_sets( distances,
surfaces,
@@ -147,9 +147,10 @@
// Sometimes a ray hits the boundary of two triangles. In the next ray_fire the
// two hits are at zero distance. An infinite loop occurs between the two neighboring
- // triangles. This fix rejects surfaces closer than 100*machine_precision to avoid
+ // triangles. This fix rejects surfaces closer than discard_dist_tol to avoid
// infinite looping at zero distance. It required changing min_tolerance_intersections
- // from 2 to 3. Last_surf_hit!=0 ensures that source particles close to a surface are
+ // to a very large number to make sure that we get at least one hit beyond add_dist_tol.
+ // Last_surf_hit!=0 ensures that source particles close to a surface are
// not rejected.
while ( ( last_surf_hit!=0 ) && ( distances[smallest] < discard_dist_tol() ) ) {
distances.erase( distances.begin() + smallest );
More information about the moab-dev
mailing list