Go to the documentation of this file.
40 for (label i=1; i <
param_.size(); i++)
47 for (label i=1; i <
param_.size() - 1; i++)
63 Foam::polyLine::polyLine(
const pointField& ps,
const bool)
83 return points_.size()-1;
95 else if (
lambda > 1 - SMALL)
106 while (param_[segmentI] <
lambda)
114 (
lambda - param_[segmentI])/(param_[segmentI+1] - param_[segmentI]);
125 return points_.first();
127 else if (
mu > 1 - SMALL)
129 return points_.last();
147 return points_.first();
149 else if (
segment > nSegments())
151 return points_.last();
const pointField & points() const
Return const-access to the control-points.
const dimensionedScalar mu
Atomic mass unit.
label nSegments() const
Return the number of line segments.
scalarList param_
The rational (0-1) cumulative parameter value for each point.
point position(const scalar) const
Return the point position corresponding to the curve parameter.
pointField points_
The control points or ends of each segments.
dimensionedScalar lambda("lambda", dimTime/sqr(dimLength), laminarTransport)
An ordered pair of two objects of type <T> with first() and second() elements.
scalar lineLength_
The real line length.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
void calcParam()
Precalculate the rational cumulative parameter value.
const volScalarField & p0
label localParameter(scalar &lambda) const
Return the line segment and the local parameter [0..1].
void setSize(const label newSize)
Alias for resize(const label)
scalar length() const
Return the length of the curve.