40 { coordFormat::X,
"x" },
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;
232 allDistance = List<scalar>(allDistance, sortOrder);
239 std::move(allDistance)
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
void size(const label n)
Older name for setAddressableSize.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
labelList sortedOrder(const UList< T > &input)
Return the (stable) sort order for the list.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const scalarList & distance() const noexcept
Return the cumulative distance.
const vector & vectorCoord(const label index) const
Get point according to axis="xyz" specification.
scalar distance(const vector &p1, const vector &p2)
autoPtr< coordSet > gatherSort(labelList &sortOrder) const
Gather and sort.
bool hasVectorAxis() const noexcept
True if axis specification is a vector.
Holds list of sampling positions.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
void checkDimensions() const
Check for consistent dimensions of points and curve distance.
A class for handling words, derived from Foam::string.
Ostream & write(Ostream &os) const
Write to stream.
const pointField & points() const noexcept
Return the points.
coordFormat
Enumeration defining the output format for coordinates.
errorManip< error > abort(error &err)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
label size() const noexcept
The number of elements in the container.
OBJstream os(runTime.globalPath()/outputName)
coordSet(const word &name, const coordFormat axisType)
Default construct with name and axis type.
#define WarningInFunction
Report a warning using Foam::Warning.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
PtrList< volScalarField > & Y
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...
List< label > labelList
A List of labels.
static autoPtr< T > New(Args &&... args)
Construct autoPtr with forwarding arguments.
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).
scalar scalarCoord(const label index) const
Get coordinate of point according to axis specification.
static const Enum< coordFormat > coordFormatNames
String representation of coordFormat enum.