diff --git a/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C index 591b5fb94b..39d55419f9 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C @@ -176,7 +176,7 @@ void surfaceSlipDisplacementPointPatchVectorField::calcProjection // Knock out any wedge component scalarField offset(start.size(), 0.0); - if (wedgePlane_ >= 0 && wedgePlane_ <= vector::nComponents) + if (wedgePlane_ >= 0 && wedgePlane_ < vector::nComponents) { forAll(offset, i) { @@ -262,7 +262,7 @@ void surfaceSlipDisplacementPointPatchVectorField::calcProjection if (interPt.hit()) { - if (wedgePlane_ >= 0 && wedgePlane_ <= vector::nComponents) + if (wedgePlane_ >= 0 && wedgePlane_ < vector::nComponents) { interPt.rawPoint()[wedgePlane_] += offset[i]; }