Skip to content

Commit

Permalink
Update approach to getting all volumes
Browse files Browse the repository at this point in the history
  • Loading branch information
pshriwise committed Aug 17, 2023
1 parent 63ef0cd commit 9453874
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/RTI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -701,9 +701,12 @@ RayTracingInterface::find_volume(const double xyz[3],
moab::EntityHandle& volume,
double* uvw) {
int result = 0;
for (int i = 0; i < GTT->num_entities(3); i++) {
moab::EntityHandle vol = GTT->entity_by_index(3, i);
point_in_volume(vol, xyz, result, uvw);
moab::Range vols;
moab::ErrorCode rval = GTT->get_gsets_by_dimension(3, vols);
if (rval != moab::MB_SUCCESS) return rval;
for (auto vol : vols) {
rval = point_in_volume(vol, xyz, result, uvw);
if (rval != moab::MB_SUCCESS) return rval;
if (result == 1) {
volume = vol;
break;
Expand Down

0 comments on commit 9453874

Please sign in to comment.