38 #ifndef Foam_masterOFstream_H 39 #define Foam_masterOFstream_H 85 void checkWrite(
const fileName& fName,
const std::string&
s);
103 const bool valid =
true 113 const bool valid =
true A class for handling file names.
compressionType
Compression treatment (UNCOMPRESSED | COMPRESSED)
Foam::string str() const
Get the string - as Foam::string rather than std::string.
Input/output from string buffers.
A simple container for options an IOstream can normally have.
constexpr IOstreamOption(streamFormat fmt=streamFormat::ASCII, compressionType comp=compressionType::UNCOMPRESSED) noexcept
Default construct (ASCII, UNCOMPRESSED, currentVersion) or construct with format, compression...
atomicType
Atomic operations (output)
Master-only drop-in replacement for OFstream.
masterOFstream(IOstreamOption::atomicType atomic, const fileName &pathname, IOstreamOption streamOpt=IOstreamOption(), IOstreamOption::appendType append=IOstreamOption::NON_APPEND, const bool valid=true)
Construct with specified atomic behaviour (with worldComm) from pathname, stream option, optional append.
appendType
File appending (NON_APPEND | APPEND)
rAUs append(new volScalarField(IOobject::groupName("rAU", phase1.name()), 1.0/(U1Eqn.A()+byDt(max(phase1.residualAlpha() - alpha1, scalar(0)) *rho1))))
~masterOFstream()
Destructor - commits buffered information to file.
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))
Output to string buffer, using a OSstream. Always UNCOMPRESSED.