Merge remote-tracking branch 'origin/master' into develop

This commit is contained in:
Andrew Heather
2020-03-13 12:41:33 +00:00

View File

@ -6,6 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -78,18 +79,18 @@ Foam::point Foam::BSpline::position
const point& p0 = points()[segment]; const point& p0 = points()[segment];
const point& p1 = points()[segment+1]; const point& p1 = points()[segment+1];
// special cases - no calculation needed // Special cases - no calculation needed
if (mu <= 0.0) // Note: only checks at overall endpoints
if ((segment == 0) && (mu <= 0.0))
{ {
return p0; return p0;
} }
else if (mu >= 1.0) else if ((segment == nSegments() - 1) && (mu >= 1.0))
{ {
return p1; return p1;
} }
// Determine the end points
// determine the end points
point e0; point e0;
point e1; point e1;
@ -113,7 +114,6 @@ Foam::point Foam::BSpline::position
e1 = points()[segment+2]; e1 = points()[segment+2];
} }
return 1.0/6.0 * return 1.0/6.0 *
( (
( e0 + 4*p0 + p1 ) ( e0 + 4*p0 + p1 )