22 if( MB_SUCCESS != ( A ) ) \
24 std::cerr << "Failure (error code " << ( A ) << ") at " __FILE__ ":" << __LINE__ << std::endl; \
29 std::string
input_file = TestDir +
"unittest/test_geom.h5m";
53 double dir[3] = { -1.0, 0.0, 0.0 };
54 double origin[3] = { 0.0, 0.0, 0.0 };
55 double next_surf_dist;
57 DAG->ray_fire( vol_h,
origin, dir, next_surf, next_surf_dist );
58 double expected_next_surf_dist = 5.0;
66 double dir[3] = { 1.0, 0.0, 0.0 };
67 double origin[3] = { -10.0, 0.0, 0.0 };
68 double next_surf_dist;
70 DAG->ray_fire( vol_h,
origin, dir, next_surf, next_surf_dist );
71 std::cout << next_surf_dist << std::endl;
72 double expected_next_surf_dist = 15.0;
78 DagMC::RayHistory history;
81 double dir[3] = { 1.0, 0.0, 0.0 };
82 double origin[3] = { -10.0, 0.0, 0.0 };
83 double next_surf_dist;
85 DAG->ray_fire( vol_h,
origin, dir, next_surf, next_surf_dist, &history, 0, 1 );
86 std::cout << next_surf_dist << std::endl;
87 double expected_next_surf_dist = 15.0;
93 DagMC::RayHistory history;
96 double dir[3] = { 1.0, 0.0, 0.0 };
97 double origin[3] = { -10.0, 0.0, 0.0 };
98 double next_surf_dist;
100 DAG->ray_fire( vol_h,
origin, dir, next_surf, next_surf_dist, &history, 0.0, -1 );
101 std::cout << next_surf_dist << std::endl;
102 double expected_next_surf_dist = 5.0;
108 DagMC::RayHistory history;
111 double dir[3] = { 1.0, 0.0, 0.0 };
112 double origin[3] = { -10.0, 0.0, 0.0 };
114 double next_surf_dist;
123 DAG->ray_fire( vol_h,
origin, dir, next_surf, next_surf_dist, &history, 0, 1 );
125 DAG->ray_fire( vol_h, xyz, dir, next_surf, next_surf_dist, &history, 0, 1 );
127 DAG->ray_fire( vol_h, xyz, dir, next_surf, next_surf_dist, &history, 0, 1 );
136 DagMC::RayHistory history;
139 double dir[3] = { 1.0, 0.0, 0.0 };
140 double origin[3] = { -10.0, 0.0, 0.0 };
142 double next_surf_dist;
147 DAG->ray_fire( vol_h,
origin, dir, next_surf, next_surf_dist, &history, 0, 1 );
148 std::cout << next_surf <<
" " << history.size() << std::endl;
151 xyz[0] =
origin[0] + ( next_surf_dist * dir[0] );
152 xyz[1] =
origin[1] + ( next_surf_dist * dir[1] );
153 xyz[2] =
origin[2] + ( next_surf_dist * dir[2] );
157 DAG->ray_fire( vol_h, xyz, dir, next_surf, next_surf_dist, &history, 0, 1 );
159 DAG->ray_fire( vol_h, xyz, dir, next_surf, next_surf_dist, &history, 0, 1 );