40 { coordFormat::X,
"x" },
41 { coordFormat::Y,
"y" },
42 { coordFormat::Z,
"z" },
43 { coordFormat::RADIUS,
"radius" },
44 { coordFormat::DISTANCE,
"distance" },
45 { coordFormat::XYZ,
"xyz" },
57 <<
"Size not equal :" <<
nl
110 axis_(coordFormatNames[axis])
126 distance_(std::move(dist)),
127 axis_(coordFormatNames.get(axis))
137 return axis_ == coordFormat::XYZ;
147 return points()[index].x();
151 return points()[index].y();
155 return points()[index].z();
157 case coordFormat::RADIUS:
161 case coordFormat::DISTANCE:
169 <<
"Axis type '" << coordFormatNames[axis_]
170 <<
"' requested but curve distance has not been set"
178 <<
"Illegal axis specification '" << coordFormatNames[axis_]
179 <<
"' for sampling " << name_
196 os <<
"name:" << name_ <<
" axis:" << coordFormatNames[axis_] <<
nl
198 <<
"\t(coord)" <<
nl;
200 for (
const point&
p : *
this)
202 os <<
'\t' <<
p <<
nl;
224 <<
"Gathered empty coordSet: " <<
name() <<
endl;
238 std::move(allPoints),
239 std::move(allDistance)
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
bool empty() const noexcept
True if the UList is empty (ie, size() is zero)
label size() const noexcept
The number of elements in the UList.
void size(const label n)
Older name for setAddressableSize.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Holds list of sampling positions.
const vector & vectorCoord(const label index) const
Get point according to axis="xyz" specification.
autoPtr< coordSet > gatherSort(labelList &sortOrder) const
Gather and sort.
bool hasVectorAxis() const noexcept
True if axis specification is a vector.
const scalarList & distance() const noexcept
Return the cumulative distance.
void checkDimensions() const
Check for consistent dimensions of points and curve distance.
const pointField & points() const noexcept
Return the points.
static const Enum< coordFormat > coordFormatNames
String representation of coordFormat enum.
scalar scalarCoord(const label index) const
Get coordinate of point according to axis specification.
coordFormat
Enumeration defining the output format for coordinates.
virtual bool write()
Write the output fields.
static void gatherOp(const UList< Type > &sendData, List< Type > &allData, const int tag=UPstream::msgType(), const UPstream::commsTypes=UPstream::commsTypes::nonBlocking, const label comm=UPstream::worldComm)
Collect data in processor order on master (in serial: performs a simple copy).
splitCell * master() const
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
#define WarningInFunction
Report a warning using Foam::Warning.
scalar distance(const vector &p1, const vector &p2)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
labelList sortedOrder(const UList< T > &input)
Return the (stable) sort order for the list.
errorManip< error > abort(error &err)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)