31 template<
class CloudType>
42 cloud::geometryTypeNames[geomType],
49 geometryType_(geomType),
56 template<
class CloudType>
66 template<
class CloudType>
69 os << cloud_.size() <<
nl << token::BEGIN_LIST <<
nl;
71 switch (geometryType_)
73 case cloud::geometryType::COORDINATES:
75 for (
const auto&
p : cloud_)
77 p.writeCoordinates(
os);
82 case cloud::geometryType::POSITIONS:
84 for (
const auto&
p : cloud_)
99 template<
class CloudType>
106 const bool newFormat = (geometryType_ == cloud::geometryType::COORDINATES);
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 "
bool isPunctuation() const noexcept
Token is PUNCTUATION.
errorManipArg< error, int > exit(error &err, const int errNo=1)
geometryType
Cloud geometry type (internal or IO representations)
virtual bool check(const char *operation) const
Check IOstream status for given operation.
char readEndList(const char *funcName)
End read of list data, ends with ')' or '}'.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
constexpr char nl
The newline '\n' character (0x0a)
A token holds an item read from Istream.
Ostream & endl(Ostream &os)
Add newline and flush stream.
IOPosition(const CloudType &c, cloud::geometryType geomType=cloud::geometryType::COORDINATES)
Construct from cloud.
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
void putBack(const token &tok)
Put back a token (copy). Only a single put back is permitted.
A cloud is a registry collection of lagrangian particles.
virtual bool writeData(Ostream &os) const
Pure virtual writeData function.
char readBeginList(const char *funcName)
Begin read of list data, starts with '(' or '{'.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
virtual bool write(const bool writeOnProc=true) const
Write using setting from DB.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
const dimensionedScalar c
Speed of light in a vacuum.
label labelToken() const
Return label value.
bool isLabel() const noexcept
Token is LABEL.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Mesh consisting of general polyhedral cells.
virtual void readData(Istream &, CloudType &)
Defines the attributes of an object for which implicit objectRegistry management is supported...
Templated base class for dsmc cloud.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...