www.cemf.ir
simulationDomain Class Referenceabstract
+ Inheritance diagram for simulationDomain:
+ Collaboration diagram for simulationDomain:

Public Member Functions

 TypeInfo ("simulationDomain")
 
 simulationDomain (systemControl &control)
 Constrcut from components. More...
 
 ~simulationDomain () override=default
 Destructor. More...
 
 create_vCtor (simulationDomain, systemControl,(systemControl &control),(control))
 
const auto & globalBox () const
 
const auto & globalBoundariesDict () const
 The original dictionary supplied by the user as input. More...
 
const dictionarythisBoundariesDict () const
 The generated dictionary generated by code which is used. More...
 
word thisBoundariesDictName () const
 
const dictionaryboundaryDict (uint32 i) const
 return a const ref to dicrionary of boundary i of this processor More...
 
virtual bool initialUpdateDomains (span< realx3 > pointPos)=0
 
virtual uint32 initialNumberInThis () const =0
 
virtual bool initialTransferBlockData (span< char > src, span< char > dst, size_t sizeOfElement) const =0
 
virtual bool initialTransferBlockData (span< realx3 > src, span< realx3 > dst) const =0
 
virtual bool initialTransferBlockData (span< real > src, span< real > dst) const =0
 
virtual bool initialTransferBlockData (span< uint32 > src, span< uint32 > dst) const =0
 
virtual bool initialTransferBlockData (span< int32 > src, span< int32 > dst) const =0
 
template<typename T >
bool initialTransferBlockData (span< T > src, span< T > dst) const
 
virtual uint32 numberToBeImported () const =0
 Number of points to be imported after updating domains. More...
 
virtual uint32 numberToBeExported () const =0
 
virtual bool domainActive () const =0
 Is this domain active? Active mean, there is particle in it and boundaries and other entities of simulation domains are valid
More...
 
virtual const domainthisDomain () const =0
 return the simulation domain of this processor More...
 
domain extendThisDomain (const realx3 &lowerPointExtension, const realx3 &upperPointExtension) const
 
const planeboundaryPlane (uint32 i) const
 return a const ref to the plane of boundary i of this processor More...
 
- Public Member Functions inherited from fileDictionary
 TypeInfo ("fileDictionary")
 
 fileDictionary (const objectFile &of, repository *owner=nullptr)
 construct an empty dictionary with keyword and make it global/fileDictionary More...
 
 fileDictionary (const word &keyword, const fileSystem &file)
 construct a dictionary with name and read it from file More...
 
 fileDictionary (const objectFile &objf, const dictionary &dict, repository *owner=nullptr)
 
bool read (iIstream &is, const IOPattern &iop) override
 read from stream More...
 
bool write (iOstream &os, const IOPattern &iop) const override
 write to stream More...
 
bool read (iIstream &is) override
 read from stream More...
 
bool write (iOstream &os) const override
 write to stream More...
 
- Public Member Functions inherited from IOobject
virtual word typeName () const =0
 
 IOobject (const objectFile &objf, const IOPattern &iop, repository *owner)
 
 ~IOobject () override
 
 IOobject (const IOobject &src)=delete
 
 IOobject (IOobject &&src)=delete
 
const IOPatternioPattern () const
 
const repositoryowner () const override
 
repositoryowner ()
 
repositoryreleaseOwner (bool fromOwner=false)
 
bool isIncluded (const word &objName) const override
 
bool isExcluded (const word &objName) const override
 
bool readObject (bool rdHdr=true)
 
bool writeObject () const
 
bool readObject (iIstream &is, bool rdHdr=true)
 
bool writeObject (iOstream &os) const
 
- Public Member Functions inherited from IOfileHeader
 IOfileHeader (const objectFile &objf)
 
const wordobjectName () const
 
const wordobjectType () const
 
fileSystem path () const
 
bool outFileBinary () const
 
bool inFileBinary () const
 
bool headerOk (bool silent=false)
 
bool implyRead () const
 Imply read. More...
 
bool implyWrite () const
 Imply write. More...
 
bool fileExist () const
 Check if file exists. More...
 
bool readIfPresent () const
 Check read if present. More...
 
bool writeHeader () const
 Check if the header should be written to file True: on master + implyWrite + readWriteHeader = true False: otherwise. More...
 
bool writeHeader (iOstream &os, const word &typeName, bool forceWrite=false) const
 Write the header to the file , typeName comes from caller. More...
 
bool writeHeader (iOstream &os, bool forceWrite=false) const
 Write the header to the file, typeName comes from the one read from file. More...
 
bool readHeader () const
 Check if header should be read from file. More...
 
bool readHeader (iIstream &is, bool silent=false)
 Read the header in the file. More...
 
bool writeBanner (iOstream &os) const
 write the banner More...
 
bool writeSeparator (iOstream &os) const
 wirte a separator line More...
 
- Public Member Functions inherited from objectFile
 objectFile (const word &name)
 
 objectFile (const word &name, const fileSystem &localPath, const readFlag &rf=readFlag::READ_NEVER, const writeFlag &wf=writeFlag::WRITE_NEVER, bool rwHeader=true)
 
 objectFile (const objectFile &src)=default
 
 objectFile (objectFile &&src)=default
 
objectFileoperator= (const objectFile &rhs)=default
 
objectFileoperator= (objectFile &&rhs)=default
 
virtual ~objectFile ()=default
 
virtual const wordname () const
 
virtual const fileSystemlocalPath () const
 
readFlag rFlag () const
 
writeFlag wFlag () const
 
bool isReadAlways () const
 
bool isReadNever () const
 
bool isReadIfPresent () const
 
bool isWriteAlways () const
 
bool isWriteNever () const
 
bool readWriteHeader () const
 
- Public Member Functions inherited from dictionary
 TypeInfo ("dictionary")
 
 dictionary (const word &keyword, bool global)
 construct an empty dictionary with keyword and make it global/fileDictionary (if true) More...
 
 dictionary (const word &keyword, const fileSystem &file)
 construct a dictionary with name and read it from file More...
 
 dictionary ()
 cunstructs a null dictionary More...
 
 dictionary (const word &keyword)
 construct an empty dictionary with keyword More...
 
 dictionary (const word &keyword, const dictionary &parDict)
 cunstruct an empty dictionary with keyword and parDict More...
 
 dictionary (const word &keyword, const dictionary &parDict, iIstream &is)
 cunstruct a dictionary with keyword and parDict and from stream More...
 
 dictionary (const word &keyword, const dictionary &parDict, const dictionary &dict)
 copy construct with keyword and new parrent dict discard the keyword and parDict of dict More...
 
 dictionary (const dictionary &)
 copy construct as default behavior entries_ are copied smoothly. More...
 
 dictionary (const dictionary &src, bool global)
 
dictionaryoperator= (const dictionary &rhs)
 assignment preserve name of this dictionary only entries are transfered with ownership More...
 
virtual dictionarydictPtr ()
 pointer to this dictionary More...
 
virtual const dictionarydictPtr () const
 pointer to this dictionary More...
 
virtual bool isDictionary () const
 if this is a dictionary More...
 
virtual word globalName () const
 global name of entry, separated with dots More...
 
virtual const dictionaryparrentDict () const
 const ref to parrent dictionary More...
 
virtual dictionarydict ()
 ref to this dictionary, if it is a dictionary More...
 
virtual const dictionarydict () const
 const ref to this dictionary, if it is a dictionary More...
 
virtual bool isFileDict () const
 if dictionary is file dictionary, return false More...
 
bool addPtr (const word &keyword, uniquePtr< iEntry > &etry, bool warning=true)
 add a pointer entry (dictionary/dataEntry) replaces this entry with existing one and issue a warning More...
 
bool add (const word &keyword, const float &v)
 add a float dataEntry More...
 
bool add (const word &keyword, const double &v)
 add a double dataEntry More...
 
bool add (const word &keyword, const word &v)
 add a word dataEntry More...
 
bool add (const word &keyword, const int64 &v)
 add a int64 dataEntry More...
 
bool add (const word &keyword, const int32 &v)
 add a int32 dataEntry More...
 
bool add (const word &keyword, const int8 &v)
 add a int8 dataEntry More...
 
bool add (const word &keyword, const uint64 &v)
 add a uint64 dataEntry More...
 
bool add (const word &keyword, const uint32 &v)
 add a uint32 dataEntry More...
 
bool add (const word &keyword, const uint8 &v)
 add a uint8 dataEntry More...
 
bool addDict (const word &keyword, const dictionary &dict)
 add a dictionary with the specifiedd keyword, if it exists, replace it. More...
 
template<typename T >
bool add (const word &keyword, const T &v)
 add a dataEntry of type T More...
 
template<typename T >
bool addOrKeep (const word &keyword, const T &v)
 
template<typename T >
bool addOrReplace (const word &keyword, const T &v)
 
void clear ()
 
dictionarysubDictPtr (const word &keyword)
 pointer to a subdictionary fatalExit if not found More...
 
dictionarysubDict (const word &keyword)
 ref to a subdictioanry fatalExit if not found
More...
 
const dictionarysubDict (const word &keyword) const
 const ref to a subdictioanry fatalExit if not found
More...
 
dataEntrydataEntryPtr (const word &keyword)
 pointer to a dataEntry fatalExit if not found/not a dataEntry More...
 
dataEntrydataEntryRef (const word &keyword)
 ref to a subdictioanry fatalExit if not found/not a dataEntry
More...
 
const dataEntrydataEntryRef (const word &keyword) const
 const ref to a subdictioanry fatalExit if not found/not a dataEntry
More...
 
dictionarysubDictOrCreate (const word &keyword)
 search for a sub-dict with keyword create a new sub-dict if not found and return a ref to it fatalExit if fails More...
 
template<typename T >
getVal (const word &keyword) const
 get the value of data entry More...
 
template<typename T >
getValMax (const word &keyword, const T &maxVal) const
 get the value of data entry and return max(value, maxVal) More...
 
template<typename T >
getValMin (const word &keyword, const T &minVal) const
 get the value of data entry and return min(value, minVal) More...
 
template<typename T >
getValOrSet (const word &keyword, const T &setVal) const
 get the value of data entry or if not found, set the value to setVal More...
 
template<typename T >
getValOrSetMax (const word &keyword, const T &setMaxVal) const
 get the value of data entry anf return max(setMaxVal, value) if not found, set the value to setMaxVal
More...
 
template<typename T >
getValOrSetMin (const word &keyword, const T &setMinVal) const
 get the value of data entry anf return max(setMinVal, value) if not found, set the value to setMinVal
More...
 
size_t numEntries () const
 return number of entris in this dictionary More...
 
size_t numDataEntries () const
 return number of non-nullptr dataEntries More...
 
size_t numDictionaries () const
 return number of non-nullptr dictionaries More...
 
wordList allKeywords () const
 return all keywords (non-nullptr) in this dictionary More...
 
wordList dataEntryKeywords () const
 return a list of all dataEntries (non-nullptr) keywords More...
 
wordList dictionaryKeywords () const
 return a list of all dictionary (non-null) keywords More...
 
bool containsDictionay (const word &name) const
 check if a sub-dictionary exists More...
 
bool containsDataEntry (const word &name) const
 check if a data entry exist More...
 
virtual uniquePtr< iEntryclone () const
 clone polymorphic object (here dictionary) More...
 
virtual iEntryclonePtr () const
 clone the object More...
 
virtual uniquePtr< iEntryclone (const dictionary &parDict) const
 clone the polymorhpic object with parDict as the new parrent dictionary More...
 
virtual iEntryclonePtr (const dictionary &parDict) const
 clone the object and change its ownership to parDict More...
 
bool read (iIstream &is) override
 read from stream More...
 
bool write (iOstream &os) const override
 write to stream More...
 
- Public Member Functions inherited from iEntry
 TypeInfo ("iEntry")
 Type info. More...
 
 iEntry ()
 empty constructor More...
 
 iEntry (const word &key)
 construct with a keyword More...
 
virtual ~iEntry ()
 destructor More...
 
virtual const wordkeyword () const
 return keyword More...
 
virtual wordkeyword ()
 return keyword More...
 
virtual word name () const
 name/keyword of entry More...
 

Static Public Member Functions

static uniquePtr< simulationDomaincreate (systemControl &control)
 
static const wordbundaryName (uint32 i)
 Boundary name based on boundary index. More...
 
static uint32 sizeOfBoundaries ()
 
- Static Public Member Functions inherited from iEntry
static bool readKeyword (iIstream &is, word &keyword, token &tok)
 read a keyword from stream More...
 
static bool createEntry (dictionary &parDict, iIstream &is, bool hasBlockToken=false)
 create an entry (dataEntry or dictionary) from stream More...
 

Protected Member Functions

bool prepareBoundaryDicts ()
 
virtual bool createBoundaryDicts ()=0
 
virtual bool setThisDomain ()=0
 
- Protected Member Functions inherited from IOfileHeader
uniquePtr< iFstreaminStream () const
 
uniquePtr< oFstreamoutStream () const
 
uniquePtr< oFstreamdummyOutStream () const
 
- Protected Member Functions inherited from dictionary
iEntryfindEntry (const word &keyword)
 find an entry based on keyword return nullptr if not found More...
 
iEntryfindEntry (const word &keyword) const
 find and entry based on keyword return nullptr if not found More...
 
template<typename T >
bool readDataEntry (const word &keyword, T &val) const
 reads a dataEntry with keyword from dictionary More...
 
bool readDictionary (iIstream &is)
 read dictionary from stream - without keyword More...
 
bool writeDictionary (iOstream &os, bool withBlock=true) const
 write dictionary to stream - with keyword More...
 
- Protected Member Functions inherited from iEntry
bool writeKeyword (iOstream &os) const
 

Private Attributes

box globalBox_
 acutal limits of the global box of simulation More...
 

Static Private Attributes

static constexpr uint32 sizeOfBoundaries_ = 6
 
static const std::array< word, 6 > boundaryNames_
 

Additional Inherited Members

- Public Types inherited from objectFile
enum  readFlag { READ_ALWAYS, READ_NEVER, READ_IF_PRESENT }
 
enum  writeFlag { WRITE_ALWAYS, WRITE_NEVER }
 
- Static Public Attributes inherited from dictionary
static dictionary nullDict
 
- Protected Attributes inherited from IOfileHeader
word objectName_
 
word objectType_
 
word fileFormat_ = "ASCII"
 file format read from file More...
 
- Protected Attributes inherited from dictionary
word name_
 global name of dictionary, separated with dots More...
 
wordOrderedMapPtr< iEntryentries_
 all the entries (data and dictionary) of the current dictionary More...
 
List< iEntry * > orderedEntries_
 entries in order of insertion More...
 
const dictionaryparDict_
 ref to parrent dictionary More...
 
bool isGlobal_ = false
 
- Protected Attributes inherited from iEntry
word keyword_
 

Detailed Description

Definition at line 38 of file simulationDomain.hpp.

Constructor & Destructor Documentation

◆ simulationDomain()

simulationDomain ( systemControl control)
explicit

Constrcut from components.

Definition at line 85 of file simulationDomain.cpp.

References pFlow::endl(), fatalErrorInFunction, fatalExit, and simulationDomain::prepareBoundaryDicts().

+ Here is the call graph for this function:

◆ ~simulationDomain()

~simulationDomain ( )
overridedefault

Destructor.

Member Function Documentation

◆ prepareBoundaryDicts()

◆ createBoundaryDicts()

virtual bool createBoundaryDicts ( )
protectedpure virtual

Implemented in regularSimulationDomain.

◆ setThisDomain()

virtual bool setThisDomain ( )
protectedpure virtual

Implemented in regularSimulationDomain.

◆ TypeInfo()

TypeInfo ( "simulationDomain"  )

◆ create_vCtor()

create_vCtor ( simulationDomain  ,
systemControl  ,
(systemControl &control)  ,
(control)   
)

◆ globalBox()

const auto& globalBox ( ) const
inline

Definition at line 87 of file simulationDomain.hpp.

References simulationDomain::globalBox_.

◆ globalBoundariesDict()

const auto& globalBoundariesDict ( ) const
inline

The original dictionary supplied by the user as input.

Definition at line 94 of file simulationDomain.hpp.

◆ thisBoundariesDict()

const dictionary& thisBoundariesDict ( ) const
inline

The generated dictionary generated by code which is used.

Definition at line 100 of file simulationDomain.hpp.

References dictionary::subDict(), and simulationDomain::thisBoundariesDictName().

Referenced by simulationDomain::boundaryDict().

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

◆ thisBoundariesDictName()

word thisBoundariesDictName ( ) const
inline

Definition at line 105 of file simulationDomain.hpp.

Referenced by regularSimulationDomain::createBoundaryDicts(), simulationDomain::prepareBoundaryDicts(), and simulationDomain::thisBoundariesDict().

+ Here is the caller graph for this function:

◆ boundaryDict()

const dictionary& boundaryDict ( uint32  i) const
inline

return a const ref to dicrionary of boundary i of this processor

Definition at line 112 of file simulationDomain.hpp.

References simulationDomain::bundaryName(), dictionary::subDict(), and simulationDomain::thisBoundariesDict().

+ Here is the call graph for this function:

◆ initialUpdateDomains()

virtual bool initialUpdateDomains ( span< realx3 pointPos)
pure virtual

Implemented in regularSimulationDomain.

◆ initialNumberInThis()

virtual uint32 initialNumberInThis ( ) const
pure virtual

Implemented in regularSimulationDomain.

◆ initialTransferBlockData() [1/6]

virtual bool initialTransferBlockData ( span< char >  src,
span< char >  dst,
size_t  sizeOfElement 
) const
pure virtual

Implemented in regularSimulationDomain.

Referenced by simulationDomain::initialTransferBlockData().

+ Here is the caller graph for this function:

◆ initialTransferBlockData() [2/6]

virtual bool initialTransferBlockData ( span< realx3 src,
span< realx3 dst 
) const
pure virtual

Implemented in regularSimulationDomain.

◆ initialTransferBlockData() [3/6]

virtual bool initialTransferBlockData ( span< real src,
span< real dst 
) const
pure virtual

Implemented in regularSimulationDomain.

◆ initialTransferBlockData() [4/6]

virtual bool initialTransferBlockData ( span< uint32 src,
span< uint32 dst 
) const
pure virtual

Implemented in regularSimulationDomain.

◆ initialTransferBlockData() [5/6]

virtual bool initialTransferBlockData ( span< int32 src,
span< int32 dst 
) const
pure virtual

Implemented in regularSimulationDomain.

◆ initialTransferBlockData() [6/6]

bool initialTransferBlockData ( span< T >  src,
span< T >  dst 
) const
inline

Definition at line 151 of file simulationDomain.hpp.

References pFlow::charSpan(), and simulationDomain::initialTransferBlockData().

+ Here is the call graph for this function:

◆ numberToBeImported()

virtual uint32 numberToBeImported ( ) const
pure virtual

Number of points to be imported after updating domains.

Returns
number of points

Implemented in regularSimulationDomain.

◆ numberToBeExported()

virtual uint32 numberToBeExported ( ) const
pure virtual

Implemented in regularSimulationDomain.

◆ domainActive()

virtual bool domainActive ( ) const
pure virtual

Is this domain active? Active mean, there is particle in it and boundaries and other entities of simulation domains are valid

Implemented in regularSimulationDomain.

◆ thisDomain()

virtual const domain& thisDomain ( ) const
pure virtual

return the simulation domain of this processor

Implemented in regularSimulationDomain.

◆ extendThisDomain()

pFlow::domain extendThisDomain ( const realx3 lowerPointExtension,
const realx3 upperPointExtension 
) const

Definition at line 104 of file simulationDomain.cpp.

◆ boundaryPlane()

const pFlow::plane & boundaryPlane ( uint32  i) const

return a const ref to the plane of boundary i of this processor

Definition at line 115 of file simulationDomain.cpp.

◆ create()

pFlow::uniquePtr< pFlow::simulationDomain > create ( systemControl control)
static

Definition at line 121 of file simulationDomain.cpp.

References pFlow::angleBracketsNames(), fatalError, fatalExit, pFlow::pFlowProcessors(), and pFlow::printKeys().

+ Here is the call graph for this function:

◆ bundaryName()

static const word& bundaryName ( uint32  i)
inlinestatic

Boundary name based on boundary index.

Parameters
iboundary index (range from 0 to 5)
Returns
const reference to name of the boundary

Definition at line 198 of file simulationDomain.hpp.

References simulationDomain::boundaryNames_.

Referenced by simulationDomain::boundaryDict(), regularSimulationDomain::createBoundaryDicts(), and simulationDomain::prepareBoundaryDicts().

+ Here is the caller graph for this function:

◆ sizeOfBoundaries()

static uint32 sizeOfBoundaries ( )
inlinestatic

Definition at line 204 of file simulationDomain.hpp.

References simulationDomain::boundaryNames_.

Referenced by regularSimulationDomain::createBoundaryDicts(), and simulationDomain::prepareBoundaryDicts().

+ Here is the caller graph for this function:

Member Data Documentation

◆ globalBox_

box globalBox_
private

acutal limits of the global box of simulation

Definition at line 45 of file simulationDomain.hpp.

Referenced by simulationDomain::globalBox().

◆ sizeOfBoundaries_

constexpr uint32 sizeOfBoundaries_ = 6
staticconstexprprivate

Definition at line 47 of file simulationDomain.hpp.

◆ boundaryNames_

const std::array<word,6> boundaryNames_
inlinestaticprivate
Initial value:
=
{
"left", "right",
"bottom", "top",
"rear", "front"
}

Definition at line 50 of file simulationDomain.hpp.

Referenced by simulationDomain::bundaryName(), and simulationDomain::sizeOfBoundaries().


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