decomposedBlockData Class Reference

decomposedBlockData is a List<char> with IO on the master processor only. More...

Inheritance diagram for decomposedBlockData:
[legend]
Collaboration diagram for decomposedBlockData:
[legend]

Public Member Functions

 TypeName ("decomposedBlockData")
 Declare type-name, virtual type (with debug switch) More...
 
 decomposedBlockData (const label comm, const IOobject &io, const UPstream::commsTypes=UPstream::commsTypes::scheduled)
 Construct given an IOobject. More...
 
 decomposedBlockData (const label comm, const IOobject &io, const UList< char > &list, const UPstream::commsTypes=UPstream::commsTypes::scheduled)
 Construct given an IOobject and for READ_IF_MODIFIED a List<char> More...
 
 decomposedBlockData (const label comm, const IOobject &io, List< char > &&list, const UPstream::commsTypes=UPstream::commsTypes::scheduled)
 Construct by transferring the List contents. More...
 
virtual ~decomposedBlockData ()=default
 Destructor. More...
 
virtual bool read ()
 Read object. More...
 
virtual bool writeData (Ostream &os) const
 Write separated content. Assumes content is the serialised data. More...
 
virtual bool writeObject (IOstreamOption streamOpt, const bool valid) const
 Write using stream options. More...
 
- Public Member Functions inherited from regIOobject
 TypeName ("regIOobject")
 Runtime type information. More...
 
 regIOobject (const IOobject &io, const bool isTime=false)
 
 regIOobject (const regIOobject &rio)
 Copy construct. More...
 
 regIOobject (const regIOobject &rio, bool registerCopy)
 
 regIOobject (const word &newName, const regIOobject &, bool registerCopy)
 
 regIOobject (const IOobject &io, const regIOobject &rio)
 Copy construct with new IO parameters. More...
 
virtual ~regIOobject ()
 Destructor. More...
 
bool checkIn ()
 Add object to registry, if not already registered. More...
 
bool checkOut ()
 Remove all file watches and remove object from registry. More...
 
virtual void addWatch ()
 Add file watch on object (if registered and READ_IF_MODIFIED) More...
 
bool ownedByRegistry () const
 Is this object owned by the registry? More...
 
bool store ()
 
void release (const bool unregister=false)
 Release ownership of this object from its registry. More...
 
label eventNo () const
 Event number at last update. More...
 
label & eventNo ()
 Event number at last update. More...
 
bool upToDate (const regIOobject &) const
 Return true if up-to-date with respect to given object. More...
 
bool upToDate (const regIOobject &, const regIOobject &) const
 Return true if up-to-date with respect to given objects. More...
 
bool upToDate (const regIOobject &, const regIOobject &, const regIOobject &) const
 Return true if up-to-date with respect to given objects. More...
 
bool upToDate (const regIOobject &, const regIOobject &, const regIOobject &, const regIOobject &) const
 Return true if up-to-date with respect to given objects. More...
 
void setUpToDate ()
 Set as up-to-date. More...
 
virtual void rename (const word &newName)
 Rename. More...
 
virtual fileName filePath () const
 Return complete path + object name if the file exists. More...
 
bool headerOk ()
 Read and check header info. More...
 
IstreamreadStream (const word &, const bool valid=true)
 Return Istream and check object type against that given. More...
 
void close ()
 Close Istream. More...
 
virtual bool readData (Istream &)
 Virtual readData function. More...
 
virtual label addWatch (const fileName &)
 Add file watch for fileName on object if not yet watched. More...
 
const labelListwatchIndices () const
 Return file-monitoring handles. More...
 
labelListwatchIndices ()
 Return file-monitoring handles. More...
 
virtual bool modified () const
 
virtual bool readIfModified ()
 Read object if modified (as set by call to modified) More...
 
virtual bool write (const bool valid=true) const
 Write using setting from DB. More...
 
virtual bool global () const
 Is object global. More...
 
void operator= (const IOobject &io)
 Copy assignment. More...
 
virtual bool writeObject (IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType comp, const bool valid) const
 Write using given format, version and compression. More...
 
- Public Member Functions inherited from IOobject
 TypeName ("IOobject")
 Declare type-name, virtual type (with debug switch) More...
 
 IOobject (const IOobject &)=default
 Copy construct. More...
 
virtual ~IOobject ()=default
 Destructor. More...
 
 IOobject (const word &name, const fileName &instance, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true)
 Construct from name, instance, registry, io options. More...
 
 IOobject (const word &name, const fileName &instance, const fileName &local, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true, bool globalObject=false)
 Construct from name, instance, local, registry, io options. More...
 
 IOobject (const fileName &path, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true, bool globalObject=false)
 Construct from path, registry, io options. More...
 
 IOobject (const IOobject &io, const objectRegistry &registry)
 Copy construct, resetting registry. More...
 
 IOobject (const IOobject &io, const word &name)
 Copy construct, resetting name. More...
 
 IOobject (const IOobject &io, readOption, writeOption)
 Copy construct, resetting io options. More...
 
autoPtr< IOobjectclone () const
 Clone. More...
 
autoPtr< IOobjectclone (const objectRegistry &registry) const
 Clone resetting registry. More...
 
const objectRegistrydb () const
 Return the local objectRegistry. More...
 
const Timetime () const
 Return time. More...
 
const wordname () const
 Return name. More...
 
const wordheaderClassName () const
 Return name of the class name read from header. More...
 
wordheaderClassName ()
 Return non-constant access to the class name read from header. More...
 
const stringnote () const
 Return the optional note. More...
 
stringnote ()
 Return non-constant access to the optional note. More...
 
bool registerObject () const
 Should object created with this IOobject be registered? More...
 
boolregisterObject ()
 Should object created with this IOobject be registered? More...
 
bool globalObject () const
 Is object same for all processors? More...
 
boolglobalObject ()
 Is object same for all processors? More...
 
unsigned labelByteSize () const
 The label byte-size, possibly read from the header. More...
 
unsigned scalarByteSize () const
 The scalar byte-size, possibly read from the header. More...
 
bool isHeaderClassName (const word &clsName) const
 Test if headerClassName() equals the given class name. More...
 
template<class Type >
bool isHeaderClassName () const
 Test if headerClassName() equals Type::typeName. More...
 
readOption readOpt () const
 The read option. More...
 
readOptionreadOpt ()
 Non-constant access to the read option. More...
 
writeOption writeOpt () const
 The write option. More...
 
writeOptionwriteOpt ()
 Non-constant access to the write option. More...
 
word group () const
 Return group (extension part of name) More...
 
word member () const
 Return member (name without the extension) More...
 
const fileNamerootPath () const
 
const fileNamecaseName () const
 
const fileNameinstance () const
 
fileNameinstance ()
 
const fileNamelocal () const
 
fileName path () const
 The complete path. More...
 
fileName path (const word &instance, const fileName &local=fileName::null) const
 The complete path with alternative instance and local. More...
 
fileName objectPath () const
 The complete path + object name. More...
 
fileName localFilePath (const word &typeName, const bool search=true) const
 Helper for filePath that searches locally. More...
 
fileName globalFilePath (const word &typeName, const bool search=true) const
 Helper for filePath that searches up if in parallel. More...
 
bool readHeader (Istream &is)
 Read header. More...
 
template<class Type >
bool typeHeaderOk (const bool checkType=true, const bool search=true, const bool verbose=true)
 Read header (uses typeFilePath to find file) and check its info. More...
 
template<class Type >
void warnNoRereading () const
 Helper: warn that type does not support re-reading. More...
 
bool writeHeader (Ostream &os) const
 Write header. More...
 
bool writeHeader (Ostream &os, const word &objectType) const
 Write header. Allow override of type. More...
 
bool good () const
 
bool bad () const
 
InfoProxy< IOobjectinfo () const
 Return info proxy. More...
 
void operator= (const IOobject &io)
 
template<>
bool isHeaderClassName () const
 Specialization for void always returns true (no headerClassName check). More...
 
template<class StringType >
Foam::word groupName (StringType base, const word &group)
 
template<class StringType >
Foam::word scopedName (StringType scope, const word &name)
 
- Public Member Functions inherited from List< char >
constexpr List () noexcept
 Null constructor. More...
 
 List (const label len)
 Construct with given size. More...
 
 List (const label len, const char &val)
 Construct with given size and value for all elements. More...
 
 List (const label len, const Foam::zero)
 Construct with given size initializing all elements to zero. More...
 
 List (const Foam::one, const char &val)
 Construct with length=1, copying the value as the only content. More...
 
 List (const Foam::one, char &&val)
 Construct with length=1, moving the value as the only content. More...
 
 List (const Foam::one, const Foam::zero)
 Construct with length=1, initializing content to zero. More...
 
 List (const List< char > &a)
 Copy construct from list. More...
 
 List (const UList< char > &a)
 Copy construct contents from list. More...
 
 List (List< char > &a, bool reuse)
 Construct as copy or re-use as specified. More...
 
 List (const UList< char > &list, const labelUList &indices)
 Copy construct subset of list. More...
 
 List (const UList< char > &list, const FixedList< label, N > &indices)
 Copy construct subset of list. More...
 
 List (InputIterator begIter, InputIterator endIter)
 Construct given begin/end iterators. More...
 
 List (const FixedList< char, N > &list)
 Construct as copy of FixedList<T, N> More...
 
 List (const PtrList< char > &list)
 Construct as copy of PtrList<T> More...
 
 List (const SLList< char > &list)
 Construct as copy of SLList<T> More...
 
 List (const IndirectListBase< char, Addr > &list)
 Construct as copy of IndirectList contents. More...
 
 List (std::initializer_list< char > list)
 Construct from an initializer list. More...
 
 List (List< char > &&list)
 Move construct from List. More...
 
 List (DynamicList< char, SizeMin > &&list)
 Move construct from DynamicList. More...
 
 List (SortableList< char > &&list)
 Move construct from SortableList. More...
 
 List (SLList< char > &&list)
 Move construct from SLList. More...
 
 List (Istream &is)
 Construct from Istream. More...
 
autoPtr< List< char > > clone () const
 Clone. More...
 
 ~List ()
 Destructor. More...
 
void resize (const label newSize)
 Adjust allocated size of list. More...
 
void resize (const label newSize, const char &val)
 Adjust allocated size of list and set val for new elements. More...
 
void resize (const label newSize)
 
void setSize (const label newSize)
 Alias for resize(const label) More...
 
void setSize (const label newSize, const char &val)
 Alias for resize(const label, const T&) More...
 
void clear ()
 Clear the list, i.e. set size to zero. More...
 
void append (const char &val)
 Append an element at the end of the list. More...
 
void append (char &&val)
 Move append an element at the end of the list. More...
 
void append (const UList< char > &list)
 Append a List to the end of this list. More...
 
void append (const IndirectListBase< char, Addr > &list)
 Append IndirectList contents at the end of this list. More...
 
void transfer (List< char > &list)
 
void transfer (DynamicList< char, SizeMin > &list)
 
void transfer (SortableList< char > &list)
 
char & newElmt (const label i)
 
void operator= (const UList< char > &a)
 Assignment to UList operator. Takes linear time. More...
 
void operator= (const List< char > &list)
 Assignment operator. Takes linear time. More...
 
void operator= (const SLList< char > &list)
 Assignment to SLList operator. Takes linear time. More...
 
void operator= (const IndirectListBase< char, Addr > &list)
 Assignment from IndirectList. Takes linear time. More...
 
void operator= (const FixedList< char, N > &list)
 Copy assignment from FixedList. More...
 
void operator= (std::initializer_list< char > list)
 Assignment to an initializer list. More...
 
void operator= (const char &val)
 Assignment of all entries to the given value. More...
 
void operator= (const Foam::zero)
 Assignment of all entries to zero. More...
 
void operator= (List< char > &&list)
 Move assignment. Takes constant time. More...
 
void operator= (DynamicList< char, SizeMin > &&list)
 Move assignment. Takes constant time. More...
 
void operator= (SortableList< char > &&list)
 Move assignment. Takes constant time. More...
 
void operator= (SLList< char > &&list)
 Move assignment. Takes constant time. More...
 
void shallowCopy (const UList< char > &)=delete
 No shallowCopy permitted. More...
 
std::enable_if< std::is_same< bool, TypeT >::value, bool >::type set (const label i, bool val=true)
 A bitSet::set() method for a list of bool. More...
 

Static Public Member Functions

static bool readMasterHeader (IOobject &, Istream &)
 Read header. Call only on master. More...
 
static void writeHeader (Ostream &os, const IOstream::versionNumber version, const IOstream::streamFormat format, const word &type, const string &note, const fileName &location, const word &name)
 Helper: write FoamFile IOobject header. More...
 
static autoPtr< ISstreamreadBlock (const label blocki, Istream &is, IOobject &headerIO)
 Read selected block (non-seeking) + header information. More...
 
static autoPtr< ISstreamreadBlocks (const label comm, const fileName &fName, autoPtr< ISstream > &isPtr, IOobject &headerIO, const UPstream::commsTypes commsType)
 Read master header information (into headerIO) and return. More...
 
static void gather (const label comm, const label data, labelList &datas)
 Helper: gather single label. Note: using native Pstream. More...
 
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. More...
 
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. More...
 
static label numBlocks (const fileName &fName)
 Detect number of blocks in a file. More...
 
- Static Public Member Functions inherited from regIOobject
template<class Type >
static Type & store (Type *p)
 Transfer pointer ownership to its registry. More...
 
template<class Type >
static Type & store (autoPtr< Type > &ptr)
 Transfer pointer ownership to its registry. More...
 
template<class Type >
static Type & store (autoPtr< Type > &&ptr)
 Transfer pointer ownership to its registry. More...
 
template<class Type >
static Type & store (refPtr< Type > &ptr)
 Transfer pointer ownership to its registry. More...
 
template<class Type >
static Type & store (refPtr< Type > &&ptr)
 Transfer pointer ownership to its registry. More...
 
template<class Type >
static Type & store (tmp< Type > &ptr)
 Transfer pointer ownership to its registry. More...
 
template<class Type >
static Type & store (tmp< Type > &&ptr)
 Transfer pointer ownership to its registry. More...
 
- Static Public Member Functions inherited from IOobject
static bool fileNameComponents (const fileName &path, fileName &instance, fileName &local, word &name)
 Split path into instance, local, name components. More...
 
template<class StringType >
static word groupName (StringType base, const word &group)
 Create dot-delimited name.group string. More...
 
static word group (const word &name)
 Return group (extension part of name) More...
 
static word member (const word &name)
 Return member (name without the extension) More...
 
template<class StringType >
static word scopedName (StringType scope, const word &name)
 Create scope:name or scope_name string. More...
 
static IOobject selectIO (const IOobject &io, const fileName &altFile, const word &ioName="")
 Return the IOobject, but also consider an alternative file name. More...
 
static OstreamwriteBanner (Ostream &os, bool noHint=false)
 Write the standard OpenFOAM file/dictionary banner. More...
 
static OstreamwriteDivider (Ostream &os)
 Write the standard file section divider. More...
 
static OstreamwriteEndDivider (Ostream &os)
 Write the standard end file divider. More...
 
- Static Public Member Functions inherited from List< char >
static const List< char > & null ()
 Return a null List. More...
 

Static Protected Member Functions

static label calcNumProcs (const label comm, const off_t maxBufferSize, const labelUList &recvSizes, const label startProci)
 Helper: determine number of processors whose recvSizes fits. More...
 
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. More...
 

Protected Attributes

const UPstream::commsTypes commsType_
 Type to use for gather. More...
 
const label comm_
 Communicator for all parallel comms. More...
 

Additional Inherited Members

- Public Types inherited from IOobject
enum  objectState : char { GOOD, BAD }
 Enumeration defining the valid states of an IOobject. More...
 
enum  readOption : char { MUST_READ, MUST_READ_IF_MODIFIED, READ_IF_PRESENT, NO_READ }
 Enumeration defining the read options. More...
 
enum  writeOption : char { AUTO_WRITE = 0, NO_WRITE = 1 }
 Enumeration defining the write options. More...
 
enum  fileCheckTypes : char { timeStamp, timeStampMaster, inotify, inotifyMaster }
 Enumeration defining the file checking options. More...
 
- Public Types inherited from List< char >
typedef SubList< char > subList
 Declare type of subList. More...
 
- Static Public Attributes inherited from regIOobject
static float fileModificationSkew
 
static int maxFileModificationPolls
 
- Static Public Attributes inherited from IOobject
static const Enum< fileCheckTypesfileCheckTypesNames
 Names for the fileCheckTypes. More...
 
static char scopeSeparator
 Character for scoping object names (':' or '_') More...
 
static fileCheckTypes fileModificationChecking
 Type of file modification checking. More...
 
- Protected Member Functions inherited from regIOobject
bool readHeaderOk (const IOstream::streamFormat PstreamFormat, const word &typeName)
 Helper: check readOpt flags and read if necessary. More...
 
IstreamobjectStream ()
 Construct and return an IFstream for the object. More...
 
- Protected Member Functions inherited from IOobject
void setBad (const string &s)
 Set the object state to bad. More...
 
- Static Protected Attributes inherited from regIOobject
static bool masterOnlyReading = false
 To flag master-only reading of objects. More...
 

Detailed Description

decomposedBlockData is a List<char> with IO on the master processor only.

Source files

Definition at line 53 of file decomposedBlockData.H.

Constructor & Destructor Documentation

◆ decomposedBlockData() [1/3]

decomposedBlockData ( const label  comm,
const IOobject io,
const UPstream::commsTypes  commsType = UPstream::commsTypes::scheduled 
)

Construct given an IOobject.

Definition at line 52 of file decomposedBlockData.C.

References Foam::endl(), Foam::name(), Foam::blockMeshTools::read(), IOobject::readOpt(), and WarningInFunction.

Here is the call graph for this function:

◆ decomposedBlockData() [2/3]

decomposedBlockData ( const label  comm,
const IOobject io,
const UList< char > &  list,
const UPstream::commsTypes  commsType = UPstream::commsTypes::scheduled 
)

Construct given an IOobject and for READ_IF_MODIFIED a List<char>

Definition at line 86 of file decomposedBlockData.C.

References Foam::endl(), Foam::name(), Foam::blockMeshTools::read(), IOobject::readOpt(), and WarningInFunction.

Here is the call graph for this function:

◆ decomposedBlockData() [3/3]

decomposedBlockData ( const label  comm,
const IOobject io,
List< char > &&  list,
const UPstream::commsTypes  commsType = UPstream::commsTypes::scheduled 
)

Construct by transferring the List contents.

Definition at line 126 of file decomposedBlockData.C.

References Foam::endl(), Foam::name(), Foam::blockMeshTools::read(), IOobject::readOpt(), and WarningInFunction.

Here is the call graph for this function:

◆ ~decomposedBlockData()

virtual ~decomposedBlockData ( )
virtualdefault

Destructor.

Member Function Documentation

◆ calcNumProcs()

Foam::label calcNumProcs ( const label  comm,
const off_t  maxBufferSize,
const labelUList recvSizes,
const label  startProci 
)
staticprotected

Helper: determine number of processors whose recvSizes fits.

ito maxBufferSize

Definition at line 696 of file decomposedBlockData.C.

References UPstream::master(), n, UPstream::nProcs(), UPstream::scatter(), and Foam::Zero.

Here is the call graph for this function:

◆ readBlocks() [1/2]

bool readBlocks ( const label  comm,
autoPtr< ISstream > &  isPtr,
List< char > &  data,
const UPstream::commsTypes  commsType 
)
staticprotected

Read data into *this. ISstream is only valid on master.

Definition at line 312 of file decomposedBlockData.C.

References UPstream::commsTypeNames, Foam::expressions::patchExpr::debug, Foam::endl(), IOstream::fatalCheck(), PstreamBuffers::finishedSends(), IOstream::good(), UPstream::master(), UPstream::masterNo(), UPstream::msgType(), ISstream::name(), UPstream::nonBlocking, Foam::Pout, Pstream::scatter(), UPstream::scheduled, and UPstream::subProcs().

Referenced by masterUncollatedFileOperation::readStream().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TypeName()

TypeName ( "decomposedBlockData"  )

Declare type-name, virtual type (with debug switch)

◆ read()

bool read ( )
virtual

Read object.

Reimplemented from regIOobject.

Definition at line 948 of file decomposedBlockData.C.

References Foam::fileHandler(), UPstream::master(), word::null, IOobject::readHeader(), and autoPtr< T >::reset().

Here is the call graph for this function:

◆ writeData()

bool writeData ( Ostream os) const
virtual

Write separated content. Assumes content is the serialised data.

and that the master data contains a header

Implements regIOobject.

Definition at line 963 of file decomposedBlockData.C.

References IOstreamOption::format(), IOstream::good(), IOobject::headerClassName(), UPstream::master(), UPstream::msgType(), Foam::name(), IOobject::note(), IOobject::readHeader(), Pstream::scatter(), IOstreamOption::versionNumber::str(), IOstreamOption::version(), IOobject::writeEndDivider(), Foam::writeHeader(), Ostream::writeQuoted(), and Ostream::writeRaw().

Here is the call graph for this function:

◆ writeObject()

bool writeObject ( IOstreamOption  streamOpt,
const bool  valid 
) const
virtual

Write using stream options.

Reimplemented from regIOobject.

Definition at line 1032 of file decomposedBlockData.C.

References IOstreamOption::BINARY, IOstreamOption::format(), UPstream::master(), autoPtr< T >::reset(), and IOobject::writeHeader().

Here is the call graph for this function:

◆ readMasterHeader()

bool readMasterHeader ( IOobject io,
Istream is 
)
static

Read header. Call only on master.

Definition at line 165 of file decomposedBlockData.C.

References Foam::expressions::patchExpr::debug, Foam::endl(), IOstream::fatalCheck(), ISstream::name(), IOstream::name(), Foam::Pout, and IOobject::readHeader().

Referenced by masterUncollatedFileOperation::readHeader().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeHeader()

void writeHeader ( Ostream os,
const IOstream::versionNumber  version,
const IOstream::streamFormat  format,
const word type,
const string note,
const fileName location,
const word name 
)
static

Helper: write FoamFile IOobject header.

Definition at line 187 of file decomposedBlockData.C.

References IOstreamOption::BINARY, Foam::foamVersion::buildArch, format(), IOstreamOption::format(), Foam::name(), Foam::nl, UPstream::nProcs(), UPstream::parRun(), Foam::type(), Foam::foamVersion::version, IOobject::writeBanner(), and IOobject::writeDivider().

Here is the call graph for this function:

◆ readBlock()

Foam::autoPtr< Foam::ISstream > readBlock ( const label  blocki,
Istream is,
IOobject headerIO 
)
static

Read selected block (non-seeking) + header information.

Definition at line 232 of file decomposedBlockData.C.

References IOstreamOption::currentVersion, Foam::expressions::patchExpr::debug, Foam::endl(), Foam::exit(), IOstream::fatalCheck(), Foam::FatalIOError, FatalIOErrorInFunction, IOstreamOption::format(), Foam::foamVersion::labelByteSize(), IOstream::labelByteSize(), ISstream::name(), IOstream::name(), Foam::Pout, IOobject::readHeader(), autoPtr< T >::reset(), Foam::foamVersion::scalarByteSize(), IOstream::scalarByteSize(), and IOstreamOption::version().

Referenced by masterUncollatedFileOperation::readStream().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readBlocks() [2/2]

Foam::autoPtr< Foam::ISstream > readBlocks ( const label  comm,
const fileName fName,
autoPtr< ISstream > &  isPtr,
IOobject headerIO,
const UPstream::commsTypes  commsType 
)
static

Read master header information (into headerIO) and return.

data in stream. Note: isPtr is only valid on master.

Set stream properties from realIsPtr on master

Definition at line 422 of file decomposedBlockData.C.

References UPstream::commsTypeNames, Foam::expressions::patchExpr::debug, Foam::endl(), Foam::exit(), IOstream::fatalCheck(), Foam::FatalIOError, FatalIOErrorInFunction, PstreamBuffers::finishedSends(), IOstream::good(), IOobject::headerClassName(), Foam::foamVersion::labelByteSize(), UPstream::master(), UPstream::masterNo(), UPstream::msgType(), ISstream::name(), IOstream::name(), IOobject::name(), Foam::name(), UPstream::nonBlocking, IOobject::note(), Foam::Pout, IOobject::readHeader(), IOobject::rename(), autoPtr< T >::reset(), Foam::foamVersion::scalarByteSize(), Pstream::scatter(), UPstream::scheduled, and UPstream::subProcs().

Here is the call graph for this function:

◆ gather()

void gather ( const label  comm,
const label  data,
labelList datas 
)
static

Helper: gather single label. Note: using native Pstream.

datas sized with num procs but undefined contents on slaves

Definition at line 597 of file decomposedBlockData.C.

References forAll, UPstream::gather(), UPstream::master(), UPstream::nProcs(), and List< T >::setSize().

Referenced by OFstreamCollator::write().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gatherSlaveData()

void gatherSlaveData ( const label  comm,
const UList< char > &  data,
const labelUList recvSizes,
const label  startProc,
const label  nProcs,
List< int > &  recvOffsets,
List< char > &  recvData 
)
static

Helper: gather data from (subset of) slaves. Returns.

recvData : received data recvOffsets : offset in data. recvOffsets is nProcs+1

Definition at line 636 of file decomposedBlockData.C.

References UPstream::gather(), UPstream::master(), UPstream::myProcNo(), UPstream::nProcs(), and List< T >::setSize().

Here is the call graph for this function:

◆ writeBlocks()

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  commsType,
const bool  syncReturnState = true 
)
static

Write *this. Ostream only valid on master. Returns starts of.

processor blocks

Enable to get synchronised error checking. Is the one that keeps

slaves as slow as the master (which does all the writing)

Definition at line 736 of file decomposedBlockData.C.

References UPstream::commsTypeNames, Foam::expressions::patchExpr::debug, Foam::endl(), IOstream::good(), UPstream::master(), UPstream::masterNo(), UPstream::msgType(), OSstream::name(), Foam::nl, UPstream::nProcs(), Foam::Pout, UIPstream::read(), Pstream::scatter(), UPstream::scheduled, List< T >::setSize(), OSstream::stdStream(), and UOPstream::write().

Here is the call graph for this function:

◆ numBlocks()

Foam::label numBlocks ( const fileName fName)
static

Detect number of blocks in a file.

Definition at line 1067 of file decomposedBlockData.C.

References IOstream::fatalCheck(), IOstreamOption::format(), dictionary::get(), IOstream::good(), token::isLabel(), token::isWord(), Istream::putBack(), dictionary::readIfPresent(), IOstreamOption::version(), and token::wordToken().

Referenced by fileOperation::nProcs().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ commsType_

const UPstream::commsTypes commsType_
protected

Type to use for gather.

Definition at line 63 of file decomposedBlockData.H.

◆ comm_

const label comm_
protected

Communicator for all parallel comms.

Definition at line 66 of file decomposedBlockData.H.


The documentation for this class was generated from the following files: