diff --git a/ApplicationCode/ReservoirDataModel/RigCellFaceGeometryTools.cpp b/ApplicationCode/ReservoirDataModel/RigCellFaceGeometryTools.cpp index ac5c12b97e..b64c03607c 100644 --- a/ApplicationCode/ReservoirDataModel/RigCellFaceGeometryTools.cpp +++ b/ApplicationCode/ReservoirDataModel/RigCellFaceGeometryTools.cpp @@ -243,7 +243,7 @@ void RigCellFaceGeometryTools::extractConnectionsForFace( const RigFault::FaultF size_t i; size_t j; size_t k; - mainGrid->ijkFromCellIndexNonGuarded( sourceReservoirCellIndex, &i, &j, &k ); + mainGrid->ijkFromCellIndexUnguarded( sourceReservoirCellIndex, &i, &j, &k ); mainGrid->neighborIJKAtCellFace( i, j, k, sourceCellFace, &ni, &nj, &nk ); @@ -280,7 +280,7 @@ void RigCellFaceGeometryTools::extractConnectionsForFace( const RigFault::FaultF size_t ci = std::numeric_limits::max(); size_t cj = std::numeric_limits::max(); size_t ck = std::numeric_limits::max(); - mainGrid->ijkFromCellIndexNonGuarded( candidateCellIndex, &ci, &cj, &ck ); + mainGrid->ijkFromCellIndexUnguarded( candidateCellIndex, &ci, &cj, &ck ); auto gridAxis = cvf::StructGridInterface::gridAxisFromFace( sourceCellFace ); if ( gridAxis == cvf::StructGridInterface::GridAxisType::AXIS_I ) diff --git a/ApplicationCode/ReservoirDataModel/RigGridBase.cpp b/ApplicationCode/ReservoirDataModel/RigGridBase.cpp index 0a131c185e..7a8354f63e 100644 --- a/ApplicationCode/ReservoirDataModel/RigGridBase.cpp +++ b/ApplicationCode/ReservoirDataModel/RigGridBase.cpp @@ -220,13 +220,12 @@ bool RigGridBase::ijkFromCellIndex( size_t cellIndex, size_t* i, size_t* j, size /// This version does no if-guarding. Check that all dimensions of the grid are non-zero before using. /// Useful for running in a loop after doing the sanity check once. //-------------------------------------------------------------------------------------------------- -void RigGridBase::ijkFromCellIndexNonGuarded( size_t cellIndex, size_t* i, size_t* j, size_t* k ) const +void RigGridBase::ijkFromCellIndexUnguarded( size_t cellIndex, size_t* i, size_t* j, size_t* k ) const { size_t index = cellIndex; size_t cellCountI = m_gridPointDimensions[0] - 1; size_t cellCountJ = m_gridPointDimensions[1] - 1; - size_t cellCountK = m_gridPointDimensions[2] - 1; *k = index / ( cellCountI * cellCountJ ); index -= ( *k ) * ( cellCountI * cellCountJ ); diff --git a/ApplicationCode/ReservoirDataModel/RigGridBase.h b/ApplicationCode/ReservoirDataModel/RigGridBase.h index a66d7e434c..6dd6122f25 100644 --- a/ApplicationCode/ReservoirDataModel/RigGridBase.h +++ b/ApplicationCode/ReservoirDataModel/RigGridBase.h @@ -93,7 +93,7 @@ public: size_t cellIndexFromIJK( size_t i, size_t j, size_t k ) const override; size_t cellIndexFromIJKUnguarded( size_t i, size_t j, size_t k ) const; bool ijkFromCellIndex( size_t cellIndex, size_t* i, size_t* j, size_t* k ) const override; - void ijkFromCellIndexNonGuarded( size_t cellIndex, size_t* i, size_t* j, size_t* k ) const; + void ijkFromCellIndexUnguarded( size_t cellIndex, size_t* i, size_t* j, size_t* k ) const; bool cellIJKFromCoordinate( const cvf::Vec3d& coord, size_t* i, size_t* j, size_t* k ) const override; void cellCornerVertices( size_t cellIndex, cvf::Vec3d vertices[8] ) const override;