42 auto& result = tresult.ref();
60 param_.resize(points_.size());
66 for (label i=1; i < param_.size(); i++)
68 param_[i] = param_[i-1] +
mag(points_[i] - points_[i-1]);
72 lineLength_ = param_.last();
73 for (label i=1; i < param_.size() - 1; i++)
75 param_[i] /= lineLength_;
102 points_(
polyLine::concat(start, intermediate,
end)),
120 return points_.size()-1;
132 else if (
lambda > 1 - SMALL)
163 return points_.first();
165 else if (
mu > 1 - SMALL)
167 return points_.last();
185 return points_.first();
187 else if (
segment > nSegments())
189 return points_.last();
void size(const label n)
Older name for setAddressableSize.
scalar length() const noexcept
The length of the curve.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
T & first()
Access first element of the list, position [0].
point position(const scalar) const
The point position corresponding to the curve parameter.
A List obtained as a section of another List.
vectorField pointField
pointField is a vectorField.
void calcParam()
Precalculate the rational cumulative parameter value and the line-length.
dimensionedScalar lambda("lambda", dimTime/sqr(dimLength), laminarTransport)
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
A series of straight line segments, which can also be interpreted as a series of control points for s...
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
T & last()
Access last element of the list, position [size()-1].
static tmp< pointField > concat(const point &start, const pointField &intermediate, const point &end)
Concatenate begin, intermediate and end points.
const dimensionedScalar mu
Atomic mass unit.
label localParameter(scalar &lambda) const
Return the line segment and the local parameter [0..1] corresponding to the global lambda [0...
vector point
Point is a vector.
label nSegments() const noexcept
The number of line segments.
A class for managing temporary objects.
polyLine(const pointField &points, const bool notImplementedClosed=false)
Construct from components.
const volScalarField & p0
const pointField & points() const noexcept
Return const-access to the control-points.