49#ifndef fileOperations_collatedFileOperation_H
50#define fileOperations_collatedFileOperation_H
59namespace fileOperations
92 void printBanner(
const bool printRanks =
false)
const;
131 const word& typeName,
157 const bool valid =
true
163 virtual void flush()
const;
Defines the attributes of an object for which implicit objectRegistry management is supported,...
The IOstreamOption is a simple container for options an IOstream can normally have.
A class for handling file names.
static labelList ioRanks()
Retrieve list of IO ranks from FOAM_IORANKS env variable.
virtual label nProcs(const fileName &dir, const fileName &local="") const
Get number of processor directories/results. Used for e.g.
virtual ~collatedFileOperationInitialise()=default
Destructor.
virtual bool needsThreading() const
Requires threading for non-zero maxThreadFileBufferSize.
collatedFileOperationInitialise(int &argc, char **&argv)
Construct from components.
Version of masterUncollatedFileOperation that collates regIOobjects into a container in the processor...
bool isMasterRank(const label proci) const
virtual void setNProcs(const label nProcs)
virtual ~collatedFileOperation()
Destructor.
const label myComm_
Any communicator allocated by me.
virtual word processorsDir(const IOobject &) const
Actual name of processors dir.
virtual void flush() const
Forcibly wait until all output done. Flush any cached data.
const labelList ioRanks_
Ranks of IO handlers.
label nProcs_
Number of processors (overall)
TypeName("collated")
Runtime type information.
static float maxThreadFileBufferSize
Max size of thread buffer size. This is the overall size of.
bool appendObject(const regIOobject &io, const fileName &pathName, IOstreamOption streamOpt) const
Append to processorsNN/ file.
OFstreamCollator writer_
Threaded writer.
virtual bool writeObject(const regIOobject &, IOstreamOption streamOpt=IOstreamOption(), const bool valid=true) const
Writes a regIOobject (so header, contents and divider).
void printBanner(const bool printRanks=false) const
Print banner information, optionally with io ranks.
virtual fileName objectPath(const IOobject &io, const word &typeName) const
Generate disk file name for object. Opposite of filePath.
fileOperations that performs all file operations on the master processor. Requires the calls to be pa...
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
A class for handling words, derived from Foam::string.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.