31template<
class CloudType>
42 cloud::geometryTypeNames[geomType],
49 geometryType_(geomType),
56template<
class CloudType>
66template<
class CloudType>
71 switch (geometryType_)
75 for (
const auto&
p : cloud_)
77 p.writeCoordinates(
os);
82 case cloud::geometryType::POSITIONS:
84 for (
const auto&
p : cloud_)
99template<
class CloudType>
115 for (label i=0; i<len; ++i)
136 while (!tok.isPunctuation(token::END_LIST))
143 new typename CloudType::particleType(
mesh, is,
false, newFormat)
151 <<
"incorrect first token, expected <int> or '(', found "
153 <<
exit(FatalIOError);
ParticleType particleType
virtual bool writeData(Ostream &os) const
Pure virtual writeData function.
virtual bool write(const bool writeOnProc=true) const
Write using setting from DB.
virtual void readData(Istream &, CloudType &)
IOPosition(const CloudType &c, cloud::geometryType geomType=cloud::geometryType::COORDINATES)
Construct from cloud.
@ MUST_READ
Reading required.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const Time & time() const noexcept
Return Time associated with the objectRegistry.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
char readEndList(const char *funcName)
End read of list data, ends with ')' or '}'.
char readBeginList(const char *funcName)
Begin read of list data, starts with '(' or '{'.
void putBack(const token &tok)
Put back a token (copy). Only a single put back is permitted.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A cloud is a registry collection of lagrangian particles.
geometryType
Cloud geometry type (internal or IO representations).
@ COORDINATES
barycentric coordinates
Mesh consisting of general polyhedral cells.
regIOobject(const IOobject &io, const bool isTimeObject=false)
Construct from IOobject. The optional flag adds special handling if the object is the top-level regIO...
virtual bool write(const bool writeOnProc=true) const
Write using setting from DB.
A token holds an item read from Istream.
bool isPunctuation() const noexcept
Token is PUNCTUATION.
@ BEGIN_LIST
Begin list [isseparator].
@ END_LIST
End list [isseparator].
bool isLabel() const noexcept
Integral token is convertible to Foam::label.
label labelToken() const
Return integer type as label value or Error.
InfoProxy< token > info() const noexcept
Return info proxy, for printing token information to a stream.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
OBJstream os(runTime.globalPath()/outputName)
DSMCCloud< dsmcParcel > CloudType
Ostream & endl(Ostream &os)
Add newline and flush stream.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a).