Go to the documentation of this file.
38 #ifndef decomposedBlockData_H
39 #define decomposedBlockData_H
77 const off_t maxBufferSize,
79 const label startProci
203 const label startProc,
225 const bool syncReturnState =
true
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const label comm_
Communicator for all parallel comms.
virtual ~decomposedBlockData()=default
Destructor.
const word & name() const
Return name.
A class for handling words, derived from Foam::string.
A class for handling file names.
static autoPtr< ISstream > readBlock(const label blocki, Istream &is, IOobject &headerIO)
Read selected block (non-seeking) + header information.
A List obtained as a section of another List.
static label calcNumProcs(const label comm, const off_t maxBufferSize, const labelUList &recvSizes, const label startProci)
Helper: determine number of processors whose recvSizes fits.
static bool writeBlocks(const label comm, autoPtr< OSstream > &osPtr, List< std::streamoff > &start, const UList< char > &masterData, const labelUList &recvSizes, const PtrList< SubList< char >> &slaveData, const UPstream::commsTypes, const bool syncReturnState=true)
Write *this. Ostream only valid on master. Returns starts of.
static label numBlocks(const fileName &fName)
Detect number of blocks in a file.
word format(conversionProperties.get< word >("format"))
static bool readMasterHeader(IOobject &, Istream &)
Read header. Call only on master.
Representation of a major/minor version number.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
static void writeHeader(Ostream &os, const IOstream::versionNumber version, const IOstream::streamFormat format, const word &type, const string ¬e, const fileName &location, const word &name)
Helper: write FoamFile IOobject header.
TypeName("decomposedBlockData")
Declare type-name, virtual type (with debug switch)
static void gather(const label comm, const label data, labelList &datas)
Helper: gather single label. Note: using native Pstream.
The IOstreamOption is a simple container for options an IOstream can normally have.
static void gatherSlaveData(const label comm, const UList< char > &data, const labelUList &recvSizes, const label startProc, const label nProcs, List< int > &recvOffsets, List< char > &recvData)
Helper: gather data from (subset of) slaves. Returns.
const UPstream::commsTypes commsType_
Type to use for gather.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
streamFormat
Data format (ascii | binary)
decomposedBlockData(const label comm, const IOobject &io, const UPstream::commsTypes=UPstream::commsTypes::scheduled)
Construct given an IOobject.
decomposedBlockData is a List<char> with IO on the master processor only.
const std::string version
OpenFOAM version (name or stringified number) as a std::string.
virtual bool writeData(Ostream &os) const
Write separated content. Assumes content is the serialised data.
const string & note() const
Return the optional note.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
commsTypes
Types of communications.
static bool readBlocks(const label comm, autoPtr< ISstream > &isPtr, List< char > &data, const UPstream::commsTypes commsType)
Read data into *this. ISstream is only valid on master.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual bool writeObject(IOstreamOption streamOpt, const bool valid) const
Write using stream options.
Database for solution data, solver performance and other reduced data.
virtual bool read()
Read object.