[MOAB-dev] r4542 - MOAB/trunk/tools/dagmc
bmsmith6 at wisc.edu
bmsmith6 at wisc.edu
Sun Mar 6 11:15:24 CST 2011
Author: bmsmith
Date: 2011-03-06 11:15:24 -0600 (Sun, 06 Mar 2011)
New Revision: 4542
Modified:
MOAB/trunk/tools/dagmc/DagMC.cpp
MOAB/trunk/tools/dagmc/test_geom.cc
Log:
-Add DAGMC test case for overlapping logic.
Modified: MOAB/trunk/tools/dagmc/DagMC.cpp
===================================================================
--- MOAB/trunk/tools/dagmc/DagMC.cpp 2011-03-03 17:50:46 UTC (rev 4541)
+++ MOAB/trunk/tools/dagmc/DagMC.cpp 2011-03-06 17:15:24 UTC (rev 4542)
@@ -651,7 +651,7 @@
// If both negative and nonnegative RTIs are returned, the negative RTI must
// closer to the origin.
if(0!=facets[0] && 0!=facets[1]) {
- assert(-dists[0] < dists[1]);
+ assert(-dists[0] <= dists[1]);
}
// If an RTI is found at negative distance, perform a PMT to see if the
Modified: MOAB/trunk/tools/dagmc/test_geom.cc
===================================================================
--- MOAB/trunk/tools/dagmc/test_geom.cc 2011-03-03 17:50:46 UTC (rev 4541)
+++ MOAB/trunk/tools/dagmc/test_geom.cc 2011-03-06 17:15:24 UTC (rev 4542)
@@ -32,6 +32,13 @@
ErrorCode test_surface_sense( DagMC& );
+ErrorCode overlap_write_geometry( const char* output_file_name );
+ErrorCode overlap_test_ray_fire( DagMC& );
+ErrorCode overlap_test_point_in_volume( DagMC& );
+ErrorCode overlap_test_measure_volume( DagMC& );
+ErrorCode overlap_test_measure_area( DagMC& );
+ErrorCode overlap_test_surface_sense( DagMC& );
+ErrorCode overlap_test_tracking( DagMC& );
ErrorCode write_geometry( const char* output_file_name )
{
@@ -144,6 +151,134 @@
return MB_SUCCESS;
}
+ErrorCode overlap_write_geometry( const char* output_file_name )
+{
+ ErrorCode rval;
+ Core moab_instance;
+ Interface& moab = moab_instance;
+
+ // Define two 1x2x2 cubes that overlap from 0 <= x <= 0.01
+ // cube 0 centered at (0.5,0,0)
+ const double coords[] = {
+ 1, -1, -1,
+ 1, 1, -1,
+ 0, 1, -1,
+ 0, -1, -1,
+ 1, -1, 1,
+ 1, 1, 1,
More information about the moab-dev
mailing list