Go to the documentation of this file.
31 template<
class CloudType>
42 cloud::geometryTypeNames[geomType],
49 geometryType_(geomType),
56 template<
class CloudType>
63 template<
class CloudType>
66 os << cloud_.size() <<
nl << token::BEGIN_LIST <<
nl;
68 switch (geometryType_)
70 case cloud::geometryType::COORDINATES:
74 iter().writeCoordinates(os);
79 case cloud::geometryType::POSITIONS:
83 iter().writePosition(os);
90 os << token::END_LIST <<
endl;
96 template<
class CloudType>
101 token firstToken(is);
103 const bool newFormat = (geometryType_ == cloud::geometryType::COORDINATES);
112 for (label i=0; i<
s; i++)
132 if (firstToken.
pToken() != token::BEGIN_LIST)
135 <<
"incorrect first token, '(', found "
144 && lastToken.
pToken() == token::END_LIST
161 <<
"incorrect first token, expected <int> or '(', found "
Defines the attributes of an object for which implicit objectRegistry management is supported,...
label labelToken() const
Return label value.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
virtual bool writeData(Ostream &os) const
char readBeginList(const char *funcName)
Begin read of list data, starts with '(' or '{'.
char readEndList(const char *funcName)
End read of list data, ends with ')' or '}'.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A token holds an item read from Istream.
Mesh consisting of general polyhedral cells.
punctuationToken pToken() const
Return punctuation character.
bool isLabel() const
Token is LABEL.
InfoProxy< token > info() const
Return info proxy for printing token information to a stream.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
geometryType
Cloud geometry type (internal or IO representations)
Templated base class for dsmc cloud.
virtual bool write(const bool valid=true) const
virtual bool check(const char *operation) const
Check IOstream status for given operation.
ParticleType particleType
errorManipArg< error, int > exit(error &err, const int errNo=1)
IOPosition(const CloudType &c, cloud::geometryType geomType=cloud::geometryType::COORDINATES)
Construct from cloud.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
forAllConstIters(mixture.phases(), phase)
void putBack(const token &tok)
Put back token.
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
const dimensionedScalar c
Speed of light in a vacuum.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
bool good() const
Return true if next operation might succeed.
bool isPunctuation() const
Token is PUNCTUATION.
virtual void readData(Istream &, CloudType &)