41 #ifndef Foam_masterOFstream_H 42 #define Foam_masterOFstream_H 75 const bool writeOnProc_;
92 void checkWrite(
const fileName& fName,
const std::string&
s);
111 const bool writeOnProc =
true 122 const bool writeOnProc =
true 144 const bool writeOnProc =
true 165 const bool writeOnProc =
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.
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.
Inter-processor communications stream.
masterOFstream(IOstreamOption::atomicType atomic, const label comm, const fileName &pathname, IOstreamOption streamOpt=IOstreamOption(), IOstreamOption::appendType append=IOstreamOption::NON_APPEND, const bool writeOnProc=true)
Construct with specified atomic behaviour and communicator from pathname, stream option, optional append.