[MOAB-dev] r4487 - MOAB/trunk/tools/dagmc
bmsmith6 at wisc.edu
bmsmith6 at wisc.edu
Thu Feb 10 18:44:57 CST 2011
Author: bmsmith
Date: 2011-02-10 18:44:56 -0600 (Thu, 10 Feb 2011)
New Revision: 4487
Modified:
MOAB/trunk/tools/dagmc/DagMC.cpp
Log:
-Fix incorrect comments in point_in_volume test. Code was correct but comments were wrong.
-Simplify negative ray length used for overlapping geometry.
-Consistently use nonneg_ray_length and neg_ray_length in ray_fire.
Passes make check. Better tests of overlap logic are in progress.
Modified: MOAB/trunk/tools/dagmc/DagMC.cpp
===================================================================
--- MOAB/trunk/tools/dagmc/DagMC.cpp 2011-02-08 19:51:57 UTC (rev 4486)
+++ MOAB/trunk/tools/dagmc/DagMC.cpp 2011-02-11 00:44:56 UTC (rev 4487)
@@ -67,11 +67,9 @@
of results
Overlap Thickness:
- This tolerance is the maximum normal distance between two overlapping
- volumes. This should be zero unless geometry has overlaps. User must provide
- guidance about the magnitude of overlaps. Overlap thickness depends upon
- geometric model and must be small enough not to significantly affect physics.
- For CAD models, 0.1 cm is suggested.
+ This tolerance is the maximum distance across an overlap. It should be zero
+ unless the geometry has overlaps. The overlap thickness is set using the dagmc
+ card. Overlaps must be small enough not to significantly affect physics.
Performance: increasing tolerance decreases performance
Robustness: increasing tolerance increases robustness
Knowledge: user must have intuition of overlap thickness
@@ -583,48 +581,28 @@
prev_facets.clear();
}
+ // check behind the ray origin for intersections
double neg_ray_len;
- // no overlaps
if(0 == overlapThickness) {
neg_ray_len = -numericalPrecision;
-
- // overlaps
} else {
- // If the previous facet (surface) is unknown, use large neg_ray_len.
- // Although an overlap does not occur after a collision, it may occur after
- // a particle starts on a surface (cell-based weight windows).
- if(prev_facets.empty()) {
- neg_ray_len = -100*overlapThickness;
-
- // if the previous facet is known, use the angle made with the normal
- } else {
- // get coords of prev facet
- const EntityHandle* conn;
- int len;
- CartVect coords[3], normal;
- rval = MBI->get_connectivity( prev_facets.back(), conn, len );
- if (MB_SUCCESS != rval || len != 3) return MB_FAILURE;
- rval = MBI->get_coords( conn, len, coords[0].array() );
- if (MB_SUCCESS != rval) return rval;
- // get normal of prev facet
- coords[1] -= coords[0];
- coords[2] -= coords[0];
- normal = coords[1] * coords[2];
More information about the moab-dev
mailing list