IOdistributionMap Class Reference

IOdistributionMap is derived from distributionMap and IOobject to give the distributionMap automatic IO functionality via the objectRegistry. More...

Inheritance diagram for IOdistributionMap:
Collaboration diagram for IOdistributionMap:

Public Member Functions

 TypeName ("distributionMap")
 Runtime type information. More...
 
 IOdistributionMap (const IOobject &)
 Construct given an IOobject. More...
 
 IOdistributionMap (const IOobject &, const distributionMap &)
 Construct given an IOobject and distributionMap. More...
 
 IOdistributionMap (const IOobject &, distributionMap &&)
 Move constructor transferring the distributionMap contents. More...
 
virtual ~IOdistributionMap ()
 Destructor. More...
 
virtual bool readData (Istream &)
 ReadData function required for regIOobject read operation. More...
 
virtual bool writeData (Ostream &) const
 WriteData function required for regIOobject write operation. More...
 
- Public Member Functions inherited from regIOobject
 TypeName ("regIOobject")
 Runtime type information. More...
 
 regIOobject (const IOobject &, const bool isTime=false)
 Construct from IOobject. Optional flag for if IOobject is the. More...
 
 regIOobject (const regIOobject &)
 Copy constructor. More...
 
 regIOobject (const regIOobject &&)
 Move constructor. More...
 
 regIOobject (const regIOobject &, bool registerCopy)
 Copy constructor, transferring registry registration to copy. More...
 
 regIOobject (const word &newName, const regIOobject &, bool registerCopy)
 Copy constructor with new name, transferring registry registration. More...
 
 regIOobject (const IOobject &, const regIOobject &)
 Copy constructor with new IO parameters. More...
 
virtual ~regIOobject ()
 Destructor. More...
 
virtual bool global () const
 Return true if object is global, i.e. same for all processors. More...
 
virtual bool globalFile () const
 Return true if object is global, i.e. same for all processors. More...
 
const fileNamecaseName () const
 
fileName path () const
 Return complete path. More...
 
fileName objectPath () const
 Return complete path + object name. More...
 
fileName filePath () const
 Return complete path + object name if the file exists. More...
 
bool checkIn ()
 Add object to registry. More...
 
bool checkOut ()
 Remove object from registry. More...
 
void addWatch ()
 Add file watch on object (if registered and READ_IF_MODIFIED) More...
 
bool registered () const
 Is this object registered with the registry? More...
 
bool ownedByRegistry () const
 Is this object owned by the registry? More...
 
void store ()
 Transfer ownership of this object to its registry. More...
 
void release ()
 Release ownership of this object from its registry. More...
 
label eventNo () const
 Event number at last update. More...
 
labeleventNo ()
 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 up to date (obviously) More...
 
virtual void rename (const word &newName)
 Rename. More...
 
bool headerOk ()
 Read and check header info. More...
 
IstreamreadStream (const word &, const bool read=true)
 Return Istream and check object type against that given. More...
 
void close ()
 Close Istream. More...
 
virtual bool read ()
 Read object. More...
 
const labelListwatchIndices () const
 Return file-monitoring handles. More...
 
labelListwatchIndices ()
 Return file-monitoring handles. More...
 
virtual bool modified () const
 Return true if the object's file (or files for objectRegistry) More...
 
virtual bool readIfModified ()
 Read object if modified (as set by call to modified) More...
 
virtual bool writeObject (IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType, const bool write) const
 Write using given format, version and compression. More...
 
virtual bool write (const bool write=true) const
 Write using setting from DB. More...
 
void operator= (const IOobject &)
 
const fileNamecaseName (const bool global) const
 
fileName path (const bool global) const
 Return complete path including the processor sub-directory. More...
 
fileName objectPath (const bool global) const
 Return complete path + object name including the processor. More...
 
fileName filePath (const word &typeName, const bool global) const
 Return complete path + object name if the file exists. More...
 
- Public Member Functions inherited from IOobject
 TypeName ("IOobject")
 Runtime type information. 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)
 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)
 Construct from path, registry, io options. More...
 
 IOobject (const IOobject &io, const objectRegistry &registry)
 Construct from copy resetting registry. More...
 
 IOobject (const IOobject &io, const word &name)
 Construct from copy resetting name. More...
 
 IOobject (const IOobject &io)=default
 Copy constructor. More...
 
autoPtr< IOobjectclone () const
 Clone. More...
 
autoPtr< IOobjectclone (const objectRegistry &registry) const
 Clone resetting registry. More...
 
virtual ~IOobject ()
 Destructor. More...
 
const Timetime () const
 Return time. More...
 
const objectRegistrydb () const
 Return the local objectRegistry. More...
 
const wordname () const
 Return name. More...
 
const wordheaderClassName () const
 Return name of the class name read from header. More...
 
wordheaderClassName ()
 Return name of the class name read from header. More...
 
stringnote ()
 Return non-constant access to the optional note. More...
 
const stringnote () const
 Return the optional note. More...
 
bool & registerObject ()
 Register object created from this IOobject with registry if true. More...
 
bool registerObject () const
 Register object created from this IOobject with registry if true. More...
 
readOption readOpt () const
 
readOptionreadOpt ()
 
writeOption writeOpt () const
 
writeOptionwriteOpt ()
 
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 bool global) const
 
fileNameinstance () const
 Return the instance directory, constant, system, <time> etc. More...
 
void updateInstance () const
 If the instance is a time directory update to the current time. More...
 
const fileNamelocal () const
 
fileName path (const bool global) const
 Return complete path including the processor sub-directory. More...
 
fileName objectPath (const bool global) const
 Return complete path + object name including the processor. More...
 
fileName relativePath () const
 Return the path relative to the case directory. More...
 
fileName relativeObjectPath () const
 Return complete relativePath + object name. More...
 
fileName filePath (const word &typeName, const bool global) const
 Return complete path + object name if the file exists. More...
 
bool readHeader (Istream &)
 Read header. More...
 
bool headerOk ()
 Read header of local object without type-checking. More...
 
template<class Type >
void warnNoRereading () const
 Helper: warn that type does not support re-reading. More...
 
bool writeHeader (Ostream &) const
 Write header. More...
 
bool writeHeader (Ostream &, 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 &)
 
template<class Name >
Foam::word groupName (Name name, const word &group)
 
- Public Member Functions inherited from distributionMap
 ClassName ("distributionMap")
 
 distributionMap ()
 Construct null. More...
 
 distributionMap (const label constructSize, labelListList &&subMap, labelListList &&constructMap, const bool subHasFlip=false, const bool constructHasFlip=false)
 Construct from components. More...
 
 distributionMap (const label constructSize, labelListList &&subMap, labelListList &&constructMap, labelListList &&transformElements, labelList &&transformStart, const bool subHasFlip=false, const bool constructHasFlip=false)
 Construct from components. More...
 
 distributionMap (const labelList &sendProcs, const labelList &recvProcs)
 Construct from reverse addressing: per data item the send. More...
 
 distributionMap (const globalIndex &, labelList &elements, List< Map< label >> &compactMap, const int tag=Pstream::msgType())
 Construct from list of (possibly) remote elements in globalIndex. More...
 
 distributionMap (const globalIndex &, labelListList &cellCells, List< Map< label >> &compactMap, const int tag=Pstream::msgType())
 Special variant that works with the info sorted into bins. More...
 
 distributionMap (const globalIndex &, labelList &untransformedElements, const globalIndexAndTransform &, const labelPairList &transformedElements, labelList &transformedIndices, List< Map< label >> &compactMap, const int tag=Pstream::msgType())
 Construct from list of (possibly remote) untransformed elements. More...
 
 distributionMap (const globalIndex &, labelListList &cellCells, const globalIndexAndTransform &, const List< labelPairList > &transformedElements, labelListList &transformedIndices, List< Map< label >> &compactMap, const int tag=Pstream::msgType())
 As above but with ListLists. More...
 
 distributionMap (const distributionMap &)
 Copy constructor. More...
 
 distributionMap (distributionMap &&)
 Move constructor. More...
 
 distributionMap (Istream &)
 Construct from Istream. More...
 
autoPtr< distributionMapclone () const
 Clone. More...
 
virtual ~distributionMap ()
 Destructor. More...
 
const labelListListtransformElements () const
 For every globalIndexAndTransform::transformPermutations. More...
 
const labelListtransformStart () const
 Destination in constructMap for transformed elements. More...
 
label whichTransform (const label index) const
 Find transform from transformElements. More...
 
void transfer (distributionMap &)
 Transfer the contents of the argument and annul the argument. More...
 
template<class T >
void distribute (List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
 Distribute data using default commsType. More...
 
template<class T , class negateOp >
void distribute (List< T > &fld, const negateOp &negOp, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
 Distribute data using default commsType. More...
 
template<class T >
void distribute (DynamicList< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
 Distribute data using default commsType. More...
 
template<class T >
void reverseDistribute (const label constructSize, List< T > &, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
 Reverse distribute data using default commsType. More...
 
template<class T >
void reverseDistribute (const label constructSize, const T &nullValue, List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
 Reverse distribute data using default commsType. More...
 
template<class T , class TransformOp >
void distribute (const globalIndexAndTransform &, List< T > &fld, const TransformOp &top, const int tag=UPstream::msgType()) const
 Distribute with transforms. More...
 
template<class T , class TransformOp >
void reverseDistribute (const globalIndexAndTransform &, const label constructSize, List< T > &fld, const TransformOp &top, const int tag=UPstream::msgType()) const
 Reverse distribute with transforms. More...
 
template<class T , class TransformOp >
void reverseDistribute (const globalIndexAndTransform &, const label constructSize, const T &nullValue, List< T > &fld, const TransformOp &top, const int tag=UPstream::msgType()) const
 Reverse distribute with transforms. More...
 
void printLayout (Ostream &os) const
 Debug: print layout. Can only be used on maps with sorted. More...
 
void operator= (const distributionMap &)
 
- Public Member Functions inherited from distributionMapBase
 ClassName ("distributionMapBase")
 
 distributionMapBase ()
 Construct null. More...
 
 distributionMapBase (const label constructSize, const labelListList &&subMap, const labelListList &&constructMap, const bool subHasFlip=false, const bool constructHasFlip=false)
 Move construct from components. More...
 
 distributionMapBase (const labelList &sendProcs, const labelList &recvProcs)
 Construct from reverse addressing: per data item the send. More...
 
 distributionMapBase (const globalIndex &, labelList &elements, List< Map< label >> &compactMap, const int tag=Pstream::msgType())
 Construct from list of (possibly) remote elements in globalIndex. More...
 
 distributionMapBase (const globalIndex &, labelListList &cellCells, List< Map< label >> &compactMap, const int tag=Pstream::msgType())
 Special variant that works with the info sorted into bins. More...
 
 distributionMapBase (const distributionMapBase &)
 Construct copy. More...
 
 distributionMapBase (distributionMapBase &&)
 Move constructor. More...
 
 distributionMapBase (Istream &)
 Construct from Istream. More...
 
label constructSize () const
 Constructed data size. More...
 
labelconstructSize ()
 Constructed data size. More...
 
const labelListListsubMap () const
 From subsetted data back to original data. More...
 
labelListListsubMap ()
 From subsetted data back to original data. More...
 
const labelListListconstructMap () const
 From subsetted data to new reconstructed data. More...
 
labelListListconstructMap ()
 From subsetted data to new reconstructed data. More...
 
bool subHasFlip () const
 Does subMap include a sign. More...
 
bool & subHasFlip ()
 Does subMap include a sign. More...
 
bool constructHasFlip () const
 Does constructMap include a sign. More...
 
bool & constructHasFlip ()
 Does constructMap include a sign. More...
 
const List< labelPair > & schedule () const
 Return a schedule. Demand driven. See above. More...
 
void transfer (distributionMapBase &)
 Transfer the contents of the argument and annul the argument. More...
 
void compact (const boolList &elemIsUsed, const int tag=UPstream::msgType())
 Compact maps. Gets per field a bool whether it is used (locally) More...
 
void compact (const boolList &elemIsUsed, const label localSize, labelList &oldToNewSub, labelList &oldToNewConstruct, const int tag=UPstream::msgType())
 Compact all maps and layout. Returns compaction maps for. More...
 
template<class T >
void distribute (List< T > &fld, const int tag=UPstream::msgType()) const
 Distribute data using default commsType. More...
 
template<class T , class negateOp >
void distribute (List< T > &fld, const negateOp &negOp, const int tag=UPstream::msgType()) const
 Distribute data using default commsType. More...
 
template<class T >
void distribute (DynamicList< T > &fld, const int tag=UPstream::msgType()) const
 Distribute data using default commsType. More...
 
template<class T >
void reverseDistribute (const label constructSize, List< T > &, const int tag=UPstream::msgType()) const
 Reverse distribute data using default commsType. More...
 
template<class T >
void reverseDistribute (const label constructSize, const T &nullValue, List< T > &fld, const int tag=UPstream::msgType()) const
 Reverse distribute data using default commsType. More...
 
template<class T >
void send (PstreamBuffers &, const List< T > &) const
 Do all sends using PstreamBuffers. More...
 
template<class T >
void receive (PstreamBuffers &, List< T > &) const
 Do all receives using PstreamBuffers. More...
 
void printLayout (Ostream &os) const
 Debug: print layout. Can only be used on maps with sorted. More...
 
void operator= (const distributionMapBase &)
 
void operator= (distributionMapBase &&)
 

Additional Inherited Members

- Public Types inherited from IOobject
enum  objectState { GOOD , BAD }
 Enumeration defining the valid states of an IOobject. More...
 
enum  readOption { MUST_READ , MUST_READ_IF_MODIFIED , READ_IF_PRESENT , NO_READ }
 Enumeration defining the read options. More...
 
enum  writeOption { AUTO_WRITE = 0 , NO_WRITE = 1 }
 Enumeration defining the write options. More...
 
enum  fileCheckTypes { timeStamp , timeStampMaster , inotify , inotifyMaster }
 Enumeration defining the file checking options. More...
 
- Static Public Member Functions inherited from regIOobject
template<class Type >
static Type & store (Type *)
 Transfer ownership of the given object pointer to its registry. More...
 
template<class Type >
static Type & store (autoPtr< Type > &)
 Transfer ownership of the given object pointer 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 Name >
static word groupName (Name name, const word &group)
 
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 Stream >
static Stream & writeBanner (Stream &os, bool noHint=false)
 Write the standard OpenFOAM file/dictionary banner. More...
 
template<class Stream >
static Stream & writeDivider (Stream &os)
 Write the standard file section divider. More...
 
template<class Stream >
static Stream & writeEndDivider (Stream &os)
 Write the standard end file divider. More...
 
- Static Public Member Functions inherited from distributionMapBase
static List< labelPairschedule (const labelListList &subMap, const labelListList &constructMap, const int tag)
 Calculate a schedule. See above. More...
 
static label renumber (const globalIndex &, const List< Map< label >> &compactMap, const label globalElement)
 Helper for construct from globalIndex. Renumbers element. More...
 
template<class T , class negateOp >
static void distribute (const Pstream::commsTypes commsType, const List< labelPair > &schedule, const label constructSize, const labelListList &subMap, const bool subHasFlip, const labelListList &constructMap, const bool constructHasFlip, List< T > &, const negateOp &negOp, const int tag=UPstream::msgType())
 Distribute data. Note:schedule only used for. More...
 
template<class T , class CombineOp , class negateOp >
static void distribute (const Pstream::commsTypes commsType, const List< labelPair > &schedule, const label constructSize, const labelListList &subMap, const bool subHasFlip, const labelListList &constructMap, const bool constructHasFlip, List< T > &, const CombineOp &cop, const negateOp &negOp, const T &nullValue, const int tag=UPstream::msgType())
 Distribute data. If multiple processors writing to same. More...
 
- Static Public Attributes inherited from regIOobject
static float fileModificationSkew
 
- Static Public Attributes inherited from IOobject
static constexpr const char * foamFile = "FoamFile"
 Keyword for the FoamFile header sub-dictionary. More...
 
static const NamedEnum< fileCheckTypes, 4 > fileCheckTypesNames
 
static fileCheckTypes fileModificationChecking
 Type of file modification checking. More...
 
- Protected Member Functions inherited from regIOobject
bool readHeaderOk (const IOstream::streamFormat defaultFormat, const word &typeName)
 Read header, check readOpt flags and read data if necessary. More...
 
- Protected Member Functions inherited from IOobject
void setBad (const string &)
 Set the object state to bad. More...
 
template<class Type >
bool typeHeaderOk (const bool checkType)
 Read header using typeGlobalFile to find file. More...
 
- Protected Member Functions inherited from distributionMapBase
void calcCompactAddressing (const globalIndex &globalNumbering, const labelList &elements, List< Map< label >> &compactMap) const
 Construct per processor compact addressing of the global elements. More...
 
void calcCompactAddressing (const globalIndex &globalNumbering, const labelListList &elements, List< Map< label >> &compactMap) const
 
void exchangeAddressing (const int tag, const globalIndex &globalNumbering, labelList &elements, List< Map< label >> &compactMap, labelList &compactStart)
 
void exchangeAddressing (const int tag, const globalIndex &globalNumbering, labelListList &elements, List< Map< label >> &compactMap, labelList &compactStart)
 
- Static Protected Member Functions inherited from distributionMapBase
static void checkReceivedSize (const label proci, const label expectedSize, const label receivedSize)
 
template<class T , class CombineOp , class negateOp >
static void flipAndCombine (const UList< label > &map, const bool hasFlip, const UList< T > &rhs, const CombineOp &cop, const negateOp &negOp, List< T > &lhs)
 
template<class T , class negateOp >
static T accessAndFlip (const UList< T > &fld, const label index, const bool hasFlip, const negateOp &negOp)
 
- Protected Attributes inherited from distributionMapBase
label constructSize_
 Size of reconstructed data. More...
 
labelListList subMap_
 Maps from subsetted data back to original data. More...
 
labelListList constructMap_
 Maps from subsetted data to new reconstructed data. More...
 
bool subHasFlip_
 Whether subMap includes flip or not. More...
 
bool constructHasFlip_
 Whether constructMap includes flip or not. More...
 
autoPtr< List< labelPair > > schedulePtr_
 Schedule. More...
 

Detailed Description

IOdistributionMap is derived from distributionMap and IOobject to give the distributionMap automatic IO functionality via the objectRegistry.

Source files

Definition at line 51 of file IOdistributionMap.H.

Constructor & Destructor Documentation

◆ IOdistributionMap() [1/3]

◆ IOdistributionMap() [2/3]

◆ IOdistributionMap() [3/3]

◆ ~IOdistributionMap()

~IOdistributionMap ( )
virtual

Destructor.

Definition at line 140 of file IOdistributionMap.C.

Member Function Documentation

◆ TypeName()

TypeName ( "distributionMap"  )

Runtime type information.

◆ readData()

bool readData ( Istream is)
virtual

ReadData function required for regIOobject read operation.

Reimplemented from regIOobject.

Definition at line 146 of file IOdistributionMap.C.

◆ writeData()

bool writeData ( Ostream os) const
virtual

WriteData function required for regIOobject write operation.

Implements regIOobject.

Definition at line 152 of file IOdistributionMap.C.


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