Go to the documentation of this file.
33 const char* Foam::vtk::foamVtkBase64Layer::encoding_ =
"base64";
50 Foam::vtk::foamVtkBase64Layer::foamVtkBase64Layer(std::ostream&
os)
75 write(
reinterpret_cast<const char*
>(&numbytes),
sizeof(uint64_t));
89 write(
reinterpret_cast<const char*
>(&val),
sizeof(label));
96 write(
reinterpret_cast<const char*
>(&val),
sizeof(
float));
109 else if (val <= std::numeric_limits<float>::lowest())
111 write(std::numeric_limits<float>::lowest());
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))
bool close()
End the encoding sequence, padding the final characters with '='.
virtual ~foamVtkBase64Layer()
Destructor. Closes/flushes the underlying layer.
virtual void flush()
End the encoding sequence (padding the final characters with '=')
virtual bool writeSize(const uint64_t numbytes)
Write leading size for binary output.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
OBJstream os(runTime.globalPath()/outputName)
void add(char c)
Add a character to the group, outputting when the group is full.
virtual const char * encoding() const
Name for the XML append encoding ("base64").
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
An output filter layer to write base-64 encoded content.
static std::size_t encodedLength(std::size_t n)
The encoded length has 4 bytes out for every 3 bytes in.
void write(const char *s, std::streamsize n)
Write.
virtual std::size_t encodedLength(std::size_t n) const
The encoded length for base64 encoded output.