38 { fileExt3d::POLY_ASCII,
"fpma" },
39 { fileExt3d::POLY_BINARY,
"fpmb" },
41 { fileExt3d::POLY_BINARY_Z,
"fpmbz" },
68 <<
"no points in file " << is.name()
96 reinterpret_cast<char *
>(&ivalue),
120 reinterpret_cast<char *
>(&coord),
131 pt.
x() = readScalar(is);
132 pt.
y() = readScalar(is);
133 pt.
z() = readScalar(is);
150 reinterpret_cast<char *
>(&len),
156 for (std::size_t
pos = 0;
pos < str.size(); ++
pos)
165 const std::string whitespace(
" \t\f\v\n\r");
177 size_t pos =
s.find_first_not_of(whitespace);
179 if (
pos != std::string::npos)
184 pos =
s.find_last_not_of(whitespace);
185 if (
pos != std::string::npos)
191 if (
pos == std::string::npos)
213 fireInt_t ivalue(value);
217 reinterpret_cast<char const *
>(&ivalue),
238 fireInt_t ivalue(lst.
size());
242 reinterpret_cast<char const *
>(&ivalue),
252 reinterpret_cast<char const *
>(&ivalue),
280 fireInt_t ivalue(count);
284 reinterpret_cast<char const *
>(&ivalue),
289 for (label i=0; i < count; ++i, ++ivalue)
293 reinterpret_cast<char const *
>(&ivalue),
304 label ivalue = start;
305 for (label i = 0; i <
count; ++i, ++ivalue)
322 fireReal_t fvalue[3];
323 fvalue[0] = value.x();
324 fvalue[1] = value.y();
325 fvalue[2] = value.z();
329 reinterpret_cast<char const *
>(&fvalue),
340 << value.z() <<
'\n';
348 const std::string& value
353 long len(value.size());
357 reinterpret_cast<char const *
>(&len),
361 os.stdStream().write(value.data(), len);
366 os.stdStream() << value <<
'\n';
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
streamFormat format() const noexcept
Get the current stream format.
Generic input stream using a standard (STL) stream.
virtual const fileName & name() const override
The name of the input serial stream. (eg, the name of the Fstream file name).
ISstream & getLine(std::string &str, char delim='\n')
Raw, low-level getline (until delimiter) into a string.
void syncState()
Set stream state to match that of the std::istream.
virtual const std::istream & stdStream() const
Const access to underlying std::istream.
Generic output stream using a standard (STL) stream.
void size(const label n)
Older name for setAddressableSize.
const Cmpt & x() const noexcept
Access to the vector x component.
const Cmpt & z() const noexcept
Access to the vector z component.
const Cmpt & y() const noexcept
Access to the vector y component.
A class for handling file names.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
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))
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
dimensionedScalar pos(const dimensionedScalar &ds)
label readLabel(const char *buf)
Parse entire buffer as a label, skipping leading/trailing whitespace.
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...
vectorField pointField
pointField is a vectorField.
UList< label > labelUList
A UList of labels.
#define forAll(list, i)
Loop across all elements in list.