|
MAIA bb96820c
Multiphysics at AIA
|
Front-end to create source term objects. More...
#include <lbsrctermcontroller.h>
Public Member Functions | |
| void | reg_function (const MString &p_name, srcTermConstructor fact_function) |
| Adds a new LbSrcTerm object to the function registry. More... | |
| LbSrcTerm< nDim, nDist, SysEqn > * | create_srcTerm (const MString &p_name, LbSolverDxQy< nDim, nDist, SysEqn > *p_solver) |
| Create an lb source term object and return a pointer to it. More... | |
Static Public Member Functions | |
| static LbSrcTermFactory * | instance () |
| Creates a static instance of LbSrcTermFactory. More... | |
Private Types | |
| using | srcTermConstructor = std::function< LbSrcTerm< nDim, nDist, SysEqn > *(LbSolverDxQy< nDim, nDist, SysEqn > *)> |
Private Member Functions | |
| LbSrcTermFactory () | |
Private Attributes | |
| std::map< std::string, srcTermConstructor > | m_function_reg |
This class holds a list (function_reg) where all source terms are automatically registered if they are derived from LbSrcTerm and include in their implementation the line:
static LbRegSrcTerm<LbSrcTermNAME> reg("unique_srcTerm_name");
To create a new source term, simply copy one of the existing ones and change the name. It will be found automatically, no includes are necessary.
Definition at line 47 of file lbsrctermcontroller.h.
|
private |
Definition at line 48 of file lbsrctermcontroller.h.
|
inlineprivate |
Definition at line 75 of file lbsrctermcontroller.h.
| LbSrcTerm< nDim, nDist, SysEqn > * maia::lb::LbSrcTermFactory< nDim, nDist, SysEqn >::create_srcTerm | ( | const MString & | p_name, |
| LbSolverDxQy< nDim, nDist, SysEqn > * | p_solver | ||
| ) |
| [in] | p_name | name of the source term (as stored in the registry) |
Definition at line 22 of file lbsrctermcontroller.cpp.
|
static |
Definition at line 15 of file lbsrctermcontroller.cpp.
|
inline |
| [in] | p_name | The name of the source term |
| [in] | fact_function | The source term constructor |
Definition at line 64 of file lbsrctermcontroller.h.
|
private |
data structure to associate srcTerm names with their implementations
Definition at line 76 of file lbsrctermcontroller.h.