38 { fileExt3d::POLY_ASCII,
"fpma" },
39 { fileExt3d::POLY_BINARY,
"fpmb" },
40 { fileExt3d::POLY_ASCII_Z,
"fpmaz" },
41 { fileExt3d::POLY_BINARY_Z,
"fpmbz" },
68 <<
"no points in file " << is.
name()
84 return base +
'.' + file3dExtensions[ext];
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';
Generic output stream using a standard (STL) stream.
void size(const label n)
Older name for setAddressableSize.
A class for handling file names.
virtual const std::istream & stdStream() const
Const access to underlying std::istream.
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.
void syncState()
Set stream state to match that of the std::istream.
label readLabel(const char *buf)
Parse entire buffer as a label, skipping leading/trailing whitespace.
#define forAll(list, i)
Loop across all elements in list.
dimensionedScalar pos(const dimensionedScalar &ds)
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
virtual const fileName & name() const override
The name of the input serial stream. (eg, the name of the Fstream file name)
errorManip< error > abort(error &err)
ISstream & getLine(std::string &str, char delim='\n')
Raw, low-level getline (until delimiter) into a string.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
OBJstream os(runTime.globalPath()/outputName)
Generic input stream using a standard (STL) stream.
vector point
Point is a vector.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
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))
streamFormat format() const noexcept
Get the current stream format.