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 masterOFstream(IOstreamOption::atomicType atomic, const label comm, const fileName &pathname, IOstreamOption streamOpt=IOstreamOption(), IOstreamOption::appendType append=IOstreamOption::NO_APPEND, const bool writeOnProc=true)
Construct with specified atomic behaviour and communicator from pathname, stream option, optional append.
A class for handling file names.
compressionType
Compression treatment (UNCOMPRESSED | COMPRESSED)
Input/output from string buffers.
A simple container for options an IOstream can normally have.
Foam::string str() const
Get the string. As Foam::string instead of std::string (may change in future)
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.
no append (truncates existing)
appendType
File appending (NO_APPEND | APPEND_APP | APPEND_ATE)
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.