Corrected checking of component

This commit is contained in:
mattijs
2009-12-09 12:49:04 +00:00
parent 4bdd240291
commit 17121a46a3

View File

@ -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];
}