32Foam::scalar Foam::CatmullRomSpline::derivative
64 const point derivativePoint
71 2 * (2*e0 - 5*
p0 + 4*p1 - e1)
72 +
mu * 3 * (-e0 + 3*
p0 - 3*p1 + e1)
76 return mag(derivativePoint);
101 else if (
mu > 1 - SMALL)
123 else if (
segment > nSegments())
176 (2*e0 - 5*
p0 + 4*p1 - e1)
186 const solveScalar xi[5]=
188 -0.9061798459386639927976,
189 -0.5384693101056830910363,
191 0.5384693101056830910363,
192 0.9061798459386639927976
194 const solveScalar wi[5]=
196 0.2369268850561890875143,
197 0.4786286704993664680413,
198 0.5688888888888888888889,
199 0.4786286704993664680413,
200 0.2369268850561890875143
205 for (
int i=0;i<5;i++)
207 sum+=wi[i]*derivative(
segment,(xi[i]+1.0)/2.0)/2.0;
scalar length() const
The length of the curve.
point position(const scalar lambda) const
The point position corresponding to the curve parameter.
CatmullRomSpline(const pointField &knots, const bool notImplementedClosed=false)
Construct from components.
T & first()
Access first element of the list, position [0].
T & last()
Access last element of the list, position [size()-1].
polyLine(const pointField &points, const bool notImplementedClosed=false)
Construct from components.
const pointField & points() const noexcept
Return const-access to the control-points.
label localParameter(scalar &lambda) const
Return the line segment and the local parameter [0..1] corresponding to the global lambda [0....
label nSegments() const noexcept
The number of line segments.
const volScalarField & p0
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
vector point
Point is a vector.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &f1, const label comm)
vectorField pointField
pointField is a vectorField.
dimensionedScalar lambda("lambda", dimTime/sqr(dimLength), laminarTransport)