35 #ifndef decomposedBlockData_H 36 #define decomposedBlockData_H 74 const off_t maxBufferSize,
76 const label startProci
201 const label startProc,
223 const bool syncReturnState =
true decomposedBlockData(const label comm, const IOobject &, const UPstream::commsTypes=UPstream::commsTypes::scheduled)
Construct given an IOobject.
virtual ~decomposedBlockData()
Destructor.
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.
virtual bool read()
Read object.
const word & name() const
Return name.
A class for handling file names.
virtual bool writeData(Ostream &) const
Write separated content. Assumes content is the serialised data.
const label comm_
Communicator for all parallel comms.
const UPstream::commsTypes commsType_
Type to use for gather.
commsTypes
Types of communications.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
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 &)
Detect number of blocks in a file.
word format(conversionProperties.lookup("format"))
string & note()
Return non-constant access to the optional note.
A List obtained as a section of another List.
A class for handling words, derived from string.
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.
decomposedBlockData is a List<char> with IO on the master processor only.
streamFormat
Enumeration for the format of data in the stream.
virtual bool writeObject(IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType, const bool write) const
Write using given format, version and compression.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
compressionType
Enumeration for the format of data in the stream.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Database for solution and other reduced data.
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.
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 autoPtr< ISstream > readBlock(const label blocki, Istream &is, IOobject &headerIO)
Read selected block (non-seeking) + header information.
static bool readMasterHeader(IOobject &, Istream &)
Read header. Call only on master.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
TypeName("decomposedBlockData")
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
virtual bool write(const bool write=true) const
Write using setting from DB.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
static void gather(const label comm, const label data, labelList &datas)
Helper: gather single label. Note: using native Pstream.