Skip to content

Commit

Permalink
Merge pull request #303 from PauloCarvalhoRJ/next_release
Browse files Browse the repository at this point in the history
SearchAnnulusStratigraphic: improved the isInside() test.
  • Loading branch information
PauloCarvalhoRJ authored Apr 12, 2024
2 parents 7e670d5 + a17e594 commit 1fa7ee7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions geostats/searchannulusstratigraphic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ bool SearchAnnulusStratigraphic::isInside(double centerX, double centerY, double
//determine the stratigraphic intervals corresponding to the
//reference location and to the query location
uint I, J, refK, queryK;
m_geoGrid->XYZtoIJK(centerX, centerY, centerZ, I, J, refK);
m_geoGrid->XYZtoIJK(x, y, z, I, J, queryK);
bool isRefOK = m_geoGrid->XYZtoIJK(centerX, centerY, centerZ, I, J, refK);
bool isQueryOK = m_geoGrid->XYZtoIJK(x, y, z, I, J, queryK);

//if both locations don't lie in the same stratigraphic interval, return a miss.
if( refK != queryK )
//if both locations don't lie in the same stratigraphic interval or there was a problem
//in finding grid cells, return a miss.
if( refK != queryK || ! isRefOK || ! isQueryOK )
return false;

//if the locations belong to the same stratigraphic interval, do the same geometric in/out
Expand Down

0 comments on commit 1fa7ee7

Please sign in to comment.