www.cemf.ir
shapeMixture Class Reference

Defines a mixture of particles for particle insertion. More...

+ Collaboration diagram for shapeMixture:

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...
 
shapeMixtureoperator= (const shapeMixture &)=default
 Copy assignment. More...
 
shapeMixtureoperator= (shapeMixture &&)=default
 Move assignment. More...
 
uniquePtr< shapeMixtureclone () 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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ shapeMixture() [1/3]

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().

+ Here is the call graph for this function:

◆ shapeMixture() [2/3]

shapeMixture ( const shapeMixture )
default

Copy.

◆ shapeMixture() [3/3]

shapeMixture ( shapeMixture &&  )
default

Move.

◆ ~shapeMixture()

~shapeMixture ( )
default

Destructor.

Member Function Documentation

◆ TypeInfoNV()

TypeInfoNV ( "shapeMixture"  )

Type info.

◆ operator=() [1/2]

shapeMixture& operator= ( const shapeMixture )
default

Copy assignment.

◆ operator=() [2/2]

shapeMixture& operator= ( shapeMixture &&  )
default

Move assignment.

◆ clone()

uniquePtr<shapeMixture> clone ( ) const
inline

Polymorphic copy.

Definition at line 88 of file shapeMixture.hpp.

◆ getNextShapeName()

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.

+ Here is the call graph for this function:

◆ getNextShapeNameN()

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.

◆ size()

auto size ( ) const
inline

Size of mixture (names)

Definition at line 105 of file shapeMixture.hpp.

References shapeMixture::names_, and Vector< T, Allocator >::size().

+ Here is the call graph for this function:

◆ totalInserted()

auto totalInserted ( ) const
inline

Total number inserted particles.

Definition at line 110 of file shapeMixture.hpp.

References shapeMixture::numberInserted_, and pFlow::sum().

+ Here is the call graph for this function:

◆ read()

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().

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

◆ write()

bool write ( dictionary dict) const

Definition at line 146 of file shapeMixture.cpp.

References dictionary::add(), pFlow::endl(), fatalErrorInFunction, ForAll, and dictionary::globalName().

+ Here is the call graph for this function:

Member Data Documentation

◆ names_

wordVector names_ {"shapeNames"}
private

List of shape names.

Definition at line 52 of file shapeMixture.hpp.

Referenced by shapeMixture::shapeMixture(), and shapeMixture::size().

◆ number_

uint32Vector number_ {"number"}
private

Number composition.

Definition at line 55 of file shapeMixture.hpp.

◆ numberInserted_

uint32Vector numberInserted_ {"numberInserted"}
private

Number of inserted particles of each shape.

Definition at line 58 of file shapeMixture.hpp.

Referenced by shapeMixture::totalInserted().

◆ current_

uint32Vector current_ {"currentInserted"}
private

Current number of inserted.

Definition at line 61 of file shapeMixture.hpp.

◆ lastPeaked_

uint32 lastPeaked_ = 0
private

Definition at line 63 of file shapeMixture.hpp.


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