mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: linearNormal: access out of bounds
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -100,9 +100,16 @@ point linearNormal::operator()
|
|||||||
const vector& surfaceNormal,
|
const vector& surfaceNormal,
|
||||||
const label layer
|
const label layer
|
||||||
) const
|
) const
|
||||||
|
{
|
||||||
|
if (layer == 0)
|
||||||
|
{
|
||||||
|
return surfacePoint;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
return surfacePoint + layerPoints_[layer - 1]*surfaceNormal;
|
return surfacePoint + layerPoints_[layer - 1]*surfaceNormal;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
Reference in New Issue
Block a user