40 { coordFormat::X,
"x" },
41 { coordFormat::Y,
"y" },
42 { coordFormat::Z,
"z" },
43 { coordFormat::RADIUS,
"radius" },
44 { coordFormat::DISTANCE,
"distance" },
57 <<
"Size not equal :" <<
nl
126 distance_(std::move(dist)),
127 axis_(coordFormatNames.get(axis))
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)
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,...
bool empty() const noexcept
bool get(const label i) const
label size() const noexcept
void size(const label n)
Older name for setAddressableSize.
static bool master(const label communicator=worldComm)
True if process corresponds to the master rank in the communicator.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
static autoPtr< T > New(Args &&... args)
Construct autoPtr with forwarding arguments.
scalarList distance_
Cumulative distance for "distance" write specifier.
const vector & vectorCoord(const label index) const
Get point according to axis="xyz" specification.
const word & axis() const
The sort axis name.
coordFormat axis_
Axis type.
autoPtr< coordSet > gatherSort(labelList &sortOrder) const
Gather and sort.
bool hasVectorAxis() const noexcept
True if axis specification is a vector.
Ostream & write(Ostream &os) const
Write to stream.
const scalarList & distance() const noexcept
Return the cumulative distance.
coordSet(const word &name, const coordFormat axisType)
Default construct with name and axis type.
const word & name() const noexcept
The coord-set name.
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.
@ X
Use 'x' component of points for (scalar) axis.
@ Z
Use 'z' component of points for (scalar) axis.
@ Y
Use 'y' component of points for (scalar) axis.
@ RADIUS
Use mag of points for (scalar) axis.
@ DISTANCE
Use additional distance field for (scalar) axis.
static void gatherOp(const UList< Type > &sendData, List< Type > &allData, const int tag=UPstream::msgType(), UPstream::commsTypes commsType=UPstream::commsTypes::nonBlocking, const label comm=UPstream::worldComm)
Collect data in processor order on master (in serial: performs a simple copy).
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)
List< label > labelList
A List of labels.
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)
vector point
Point is a vector.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
vectorField pointField
pointField is a vectorField.
errorManipArg< error, int > exit(error &err, const int errNo=1)
List< scalar > scalarList
List of scalar.
constexpr char nl
The newline '\n' character (0x0a).