Go to the documentation of this file.
84 #ifndef decomposedBlockData_H
85 #define decomposedBlockData_H
110 static void writeHeaderContent
114 const word& objectType,
117 const word& objectName
142 const off_t maxBufferSize,
144 const label startProci
212 const word& objectType,
215 const word& objectName,
258 const bool withLocalHeader
301 const label startProc,
324 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.
static void writeHeader(Ostream &os, IOstreamOption streamOptContainer, const word &objectType, const string ¬e, const fileName &location, const word &objectName, const dictionary &extraEntries)
Helper: write FoamFile IOobject header.
virtual ~decomposedBlockData()=default
Destructor.
List< char > contentData_
The block content.
A class for handling words, derived from Foam::string.
A class for handling file names.
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)
Generic input stream using a standard (STL) stream.
static void writeExtraHeaderContent(dictionary &dict, IOstreamOption streamOptData, const IOobject &io)
Helper: generate additional entries for FoamFile header.
static bool writeBlocks(const label comm, autoPtr< OSstream > &osPtr, List< std::streamoff > &blockOffset, 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.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
TypeName("decomposedBlockData")
Declare type-name, virtual type (with debug switch)
static bool readBlocks(const label comm, autoPtr< ISstream > &isPtr, List< char > &contentChars, const UPstream::commsTypes commsType)
Read data into *this. ISstream is only valid on master.
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.
const UPstream::commsTypes commsType_
Type to use for gather.
Generic output stream using a standard (STL) stream.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
static bool readBlockEntry(Istream &is, List< char > &charData)
Helper: read block of (binary) character data.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
decomposedBlockData(const label comm, const IOobject &io, const UPstream::commsTypes=UPstream::commsTypes::scheduled)
Construct given an IOobject.
static bool isCollatedType(const word &objectType)
True if object type is a known collated type.
OBJstream os(runTime.globalPath()/outputName)
The decomposedBlockData comprise a List<char> for each output processor, typically with IO on the mas...
virtual bool writeData(Ostream &os) const
Write separated content (assumes content is the serialised data)
commsTypes
Types of communications.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
const string & note() const noexcept
Return the optional note.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
static std::streamoff writeBlockEntry(OSstream &os, const label blocki, const UList< char > &charData)
Helper: write block of (binary) character data.
static autoPtr< ISstream > readBlock(const label blocki, ISstream &is, IOobject &headerIO)
Read selected block (non-seeking) + header information.
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.
static bool readHeader(IOobject &io, Istream &is)
virtual bool read()
Read object.