Defines a mixture of particles for particle insertion. More...
Public Member Functions | |
TypeInfoNV ("shapeMixture") | |
Type info. More... | |
shapeMixture (const dictionary &dict, const wordList &validNames) | |
Construct from dictionary. More... | |
shapeMixture (const shapeMixture &)=default | |
Copy. More... | |
shapeMixture (shapeMixture &&)=default | |
Move. More... | |
shapeMixture & | operator= (const shapeMixture &)=default |
Copy assignment. More... | |
shapeMixture & | operator= (shapeMixture &&)=default |
Move assignment. More... | |
uniquePtr< shapeMixture > | clone () const |
Polymorphic copy. More... | |
~shapeMixture ()=default | |
Destructor. More... | |
word | getNextShapeName () |
The name of the next shape that should be inserted. More... | |
void | getNextShapeNameN (size_t n, wordVector &names) |
The name of the n next shapes that should be inserted. More... | |
auto | size () const |
Size of mixture (names) More... | |
auto | totalInserted () const |
Total number inserted particles. More... | |
bool | read (const dictionary &dict) |
bool | write (dictionary &dict) const |
Private Attributes | |
wordVector | names_ {"shapeNames"} |
List of shape names. More... | |
uint32Vector | number_ {"number"} |
Number composition. More... | |
uint32Vector | numberInserted_ {"numberInserted"} |
Number of inserted particles of each shape. More... | |
uint32Vector | current_ {"currentInserted"} |
Current number of inserted. More... | |
uint32 | lastPeaked_ = 0 |
Defines a mixture of particles for particle insertion.
The mixture composition is defined based on the integer numbers. For example, if there are 3 shape names in the simulaiotn (shape1, shape2, and shape3), the mixture composition can be defined as:
{ shape1 4; shape2 2; shape3 6; }
Definition at line 47 of file shapeMixture.hpp.
shapeMixture | ( | const dictionary & | dict, |
const wordList & | validNames | ||
) |
Construct from dictionary.
Definition at line 24 of file shapeMixture.cpp.
References pFlow::endl(), fatalErrorInFunction, fatalExit, dictionary::globalName(), shapeMixture::names_, and shapeMixture::read().
|
default |
Copy.
|
default |
Move.
|
default |
Destructor.
TypeInfoNV | ( | "shapeMixture" | ) |
Type info.
|
default |
Copy assignment.
|
default |
Move assignment.
|
inline |
Polymorphic copy.
Definition at line 88 of file shapeMixture.hpp.
pFlow::word getNextShapeName | ( | ) |
The name of the next shape that should be inserted.
Definition at line 57 of file shapeMixture.cpp.
References pFlow::fill(), and ForAll.
void getNextShapeNameN | ( | size_t | n, |
wordVector & | names | ||
) |
The name of the n next shapes that should be inserted.
Definition at line 74 of file shapeMixture.cpp.
References n.
|
inline |
Size of mixture (names)
Definition at line 105 of file shapeMixture.hpp.
References shapeMixture::names_, and Vector< T, Allocator >::size().
|
inline |
Total number inserted particles.
Definition at line 110 of file shapeMixture.hpp.
References shapeMixture::numberInserted_, and pFlow::sum().
bool read | ( | const dictionary & | dict | ) |
Definition at line 85 of file shapeMixture.cpp.
References dictionary::dataEntryKeywords(), pFlow::endl(), fatalErrorInFunction, ForAll, dictionary::getVal(), and dictionary::globalName().
Referenced by shapeMixture::shapeMixture().
bool write | ( | dictionary & | dict | ) | const |
Definition at line 146 of file shapeMixture.cpp.
References dictionary::add(), pFlow::endl(), fatalErrorInFunction, ForAll, and dictionary::globalName().
|
private |
List of shape names.
Definition at line 52 of file shapeMixture.hpp.
Referenced by shapeMixture::shapeMixture(), and shapeMixture::size().
|
private |
Number composition.
Definition at line 55 of file shapeMixture.hpp.
|
private |
Number of inserted particles of each shape.
Definition at line 58 of file shapeMixture.hpp.
Referenced by shapeMixture::totalInserted().
|
private |
Current number of inserted.
Definition at line 61 of file shapeMixture.hpp.
|
private |
Definition at line 63 of file shapeMixture.hpp.