49 #ifndef fileOperations_collatedFileOperation_H 50 #define fileOperations_collatedFileOperation_H 59 namespace fileOperations
79 void init(
bool verbose);
100 void printBanner(
const bool printRanks =
false)
const;
139 const word& typeName,
165 const bool valid =
true 171 virtual void flush()
const;
const labelList ioRanks_
Ranks of IO handlers.
A class for handling file names.
TypeName("collated")
Runtime type information.
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).
collatedFileOperationInitialise(int &argc, char **&argv)
Construct from components.
virtual ~collatedFileOperationInitialise()=default
Destructor.
collatedFileOperation(bool verbose)
Default construct.
A simple container for options an IOstream can normally have.
virtual bool needsThreading() const
Requires threading for non-zero maxThreadFileBufferSize.
bool appendObject(const regIOobject &io, const fileName &pathName, IOstreamOption streamOpt) const
Append to processorsNN/ file.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
virtual fileName objectPath(const IOobject &io, const word &typeName) const
Generate disk file name for object. Opposite of filePath.
A class for handling words, derived from Foam::string.
bool isMasterRank(const label proci) const
Is proci master of communicator (in parallel) or master of the io ranks (non-parallel) ...
void printBanner(const bool printRanks=false) const
Print banner information, optionally with io ranks.
virtual void flush() const
Forcibly wait until all output done. Flush any cached data.
static float maxThreadFileBufferSize
Max size of thread buffer size. This is the overall size of.
virtual ~collatedFileOperation()
Destructor.
virtual label nProcs(const fileName &dir, const fileName &local="") const
Get number of processor directories/results. Used for e.g.
virtual void setNProcs(const label nProcs)
Set number of processor directories/results. Only used in decomposePar.
Version of masterUncollatedFileOperation that collates regIOobjects into a container in the processor...
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
label nProcs_
Number of processors (overall)
static labelList ioRanks()
Retrieve list of IO ranks from FOAM_IORANKS env variable.
fileOperations that performs all file operations on the master processor. Requires the calls to be pa...
Defines the attributes of an object for which implicit objectRegistry management is supported...
virtual word processorsDir(const IOobject &) const
Actual name of processors dir.