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 string & note() const noexcept
Return the optional note.
The IOstreamOption is a simple container for options an IOstream can normally have.
Generic input stream using a standard (STL) stream.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Generic output stream using a standard (STL) stream.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
A List obtained as a section of another List.
commsTypes
Types of communications.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Database for solution data, solver performance and other reduced data.
The decomposedBlockData comprise a List<char> for each output processor, typically with IO on the mas...
static bool readBlockEntry(Istream &is, List< char > &charData)
Helper: read block of (binary) character 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.
static std::streamoff writeBlockEntry(OSstream &os, const label blocki, const UList< char > &charData)
Helper: write block of (binary) character data.
virtual bool writeData(Ostream &os) const
Write separated content (assumes content is the serialised data)
TypeName("decomposedBlockData")
Declare type-name, virtual type (with debug switch)
static autoPtr< ISstream > readBlock(const label blocki, ISstream &is, IOobject &headerIO)
Read selected block (non-seeking) + header information.
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.
static void writeExtraHeaderContent(dictionary &dict, IOstreamOption streamOptData, const IOobject &io)
Helper: generate additional entries for FoamFile header.
static void gather(const label comm, const label data, labelList &datas)
Helper: gather single label. Note: using native Pstream.
virtual bool writeObject(IOstreamOption streamOpt, const bool valid) const
Write using stream options.
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.
virtual ~decomposedBlockData()=default
Destructor.
static bool isCollatedType(const word &objectType)
True if object type is a known collated type.
List< char > contentData_
The block content.
static bool readHeader(IOobject &io, Istream &is)
static label calcNumProcs(const label comm, const off_t maxBufferSize, const labelUList &recvSizes, const label startProci)
virtual bool read()
Read object.
const UPstream::commsTypes commsType_
Type to use for gather.
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.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A class for handling file names.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
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.