Front-end class for creating and storing MFEM coefficients. More...
#include <CoefficientManager.h>
Public Member Functions | |
| CoefficientManager ()=default | |
| mfem::Coefficient & | declareScalar (const std::string &name, const std::string &existing_or_literal) |
| Declare an alias to an existing scalar coefficient or, if it does not exist, try interpreting the name as a number with which to create a new constant coefficient. More... | |
| template<class P , class... Args> | |
| P & | declareScalar (const std::string &name, Args &&... args) |
| Create a new scalar coefficient, constructed from the argument pack. More... | |
| mfem::Coefficient & | declareScalarProperty (const std::string &name, const std::vector< std::string > &blocks, const std::string &existing_or_literal) |
| Use an existing scalar coefficient for a property on some blocks of the mesh. More... | |
| template<class P , class... Args> | |
| mfem::Coefficient & | declareScalarProperty (const std::string &name, const std::vector< std::string > &blocks, Args &&... args) |
| Use a new scalar coefficient, constructed from the argument pack, for a property on some blocks of the mesh. More... | |
| mfem::VectorCoefficient & | declareVector (const std::string &name, const std::string &existing_or_literal) |
| Declare an alias to an existing vector coefficientor or, if it does not exist, try interpreting the name as a vector of numbers with which to create a new constant vector coefficient. More... | |
| template<class P , class... Args> | |
| P & | declareVector (const std::string &name, Args &&... args) |
| Create a new vector coefficient, constructed from the argument pack. More... | |
| mfem::VectorCoefficient & | declareVectorProperty (const std::string &name, const std::vector< std::string > &blocks, const std::string &existing_or_literal) |
| Use an existing vector coefficient for a property on some blocks of the mesh. More... | |
| template<class P , class... Args> | |
| mfem::VectorCoefficient & | declareVectorProperty (const std::string &name, const std::vector< std::string > &blocks, Args &&... args) |
| Use a new vector coefficient, constructed from the argument pack, for a property on some blocks of the mesh. More... | |
| mfem::MatrixCoefficient & | declareMatrix (const std::string &name, const std::string &existing_coef) |
| Declare an alias to an existing matrix coefficient. More... | |
| template<class P , class... Args> | |
| P & | declareMatrix (const std::string &name, Args &&... args) |
| Create a new matrix coefficient, constructed from the argument pack. More... | |
| mfem::MatrixCoefficient & | declareMatrixProperty (const std::string &name, const std::vector< std::string > &blocks, const std::string &existing_coef) |
| Use an existing matrix coefficient for a property on some blocks of the mesh. More... | |
| template<class P , class... Args> | |
| mfem::MatrixCoefficient & | declareMatrixProperty (const std::string &name, const std::vector< std::string > &blocks, Args &&... args) |
| Use a new matrix coefficient, constructed from the argument pack, for a property on some blocks of the mesh. More... | |
| mfem::Coefficient & | getScalarCoefficient (const std::string &name) |
| Return a scalar coefficient with the given name or, if that doesn't exists, try interpreting the name as a number with which to build a new constant coefficient. More... | |
| mfem::VectorCoefficient & | getVectorCoefficient (const std::string &name) |
| Return a vector coefficient with the given name or, if that doesn't exists, try interpreting the name as a vector of number with which to build a new constant vector coefficient. More... | |
| mfem::MatrixCoefficient & | getMatrixCoefficient (const std::string &name) |
| Return scalar coefficient with the given name. More... | |
| bool | scalarPropertyIsDefined (const std::string &name, const std::string &block) const |
| bool | vectorPropertyIsDefined (const std::string &name, const std::string &block) const |
| bool | matrixPropertyIsDefined (const std::string &name, const std::string &block) const |
| void | setTime (const mfem::real_t time) |
| void | markSolutionChanged () |
| Notify quadrature function coefficients that solution variables have changed, marking the stored values of those with a NONLINEAR update policy as stale so their source coefficients are re-projected on next use. More... | |
Private Member Functions | |
| mfem::Coefficient & | declareScalar (const std::string &name, std::shared_ptr< mfem::Coefficient > coef) |
| mfem::Coefficient & | declareScalarProperty (const std::string &name, const std::vector< std::string > &blocks, std::shared_ptr< mfem::Coefficient > coef) |
| mfem::VectorCoefficient & | declareVector (const std::string &name, std::shared_ptr< mfem::VectorCoefficient > coef) |
| mfem::VectorCoefficient & | declareVectorProperty (const std::string &name, const std::vector< std::string > &blocks, std::shared_ptr< mfem::VectorCoefficient > coef) |
| mfem::MatrixCoefficient & | declareMatrix (const std::string &name, std::shared_ptr< mfem::MatrixCoefficient > coef) |
| mfem::MatrixCoefficient & | declareMatrixProperty (const std::string &name, const std::vector< std::string > &blocks, std::shared_ptr< mfem::MatrixCoefficient > coef) |
| std::shared_ptr< mfem::Coefficient > | getScalarCoefficientPtr (const std::string &name) |
| std::shared_ptr< mfem::VectorCoefficient > | getVectorCoefficientPtr (const std::string &name) |
| std::shared_ptr< mfem::MatrixCoefficient > | getMatrixCoefficientPtr (const std::string &name) |
Private Attributes | |
| ScalarMap | _scalar_coeffs |
| VectorMap | _vector_coeffs |
| MatrixMap | _matrix_coeffs |
Front-end class for creating and storing MFEM coefficients.
They can be created so they are global (defined across the entire domain) or as piecewise material properties.
Definition at line 32 of file CoefficientManager.h.
|
default |
| mfem::MatrixCoefficient & Moose::MFEM::CoefficientManager::declareMatrix | ( | const std::string & | name, |
| const std::string & | existing_coef | ||
| ) |
Declare an alias to an existing matrix coefficient.
Unlike for the scalar and vector counterparts, there is currently no way to try interpreting the name as numbers with which to construct a constant matrix coefficient.
Definition at line 97 of file CoefficientManager.C.
Referenced by declareMatrix().
|
inline |
Create a new matrix coefficient, constructed from the argument pack.
Definition at line 122 of file CoefficientManager.h.
|
private |
Definition at line 89 of file CoefficientManager.C.
| mfem::MatrixCoefficient & Moose::MFEM::CoefficientManager::declareMatrixProperty | ( | const std::string & | name, |
| const std::vector< std::string > & | blocks, | ||
| const std::string & | existing_coef | ||
| ) |
Use an existing matrix coefficient for a property on some blocks of the mesh.
The property will be a piecewise coefficient and it will have the value of existing_coef on these blocks. Unlike for the scalar and vector counterparts, there is currently no way to try interpreting the name as numbers with which to construct a constant matrix coefficient.
Definition at line 112 of file CoefficientManager.C.
Referenced by declareMatrixProperty().
|
inline |
Use a new matrix coefficient, constructed from the argument pack, for a property on some blocks of the mesh.
The property will be a piecewise coefficient and it will have the value of the new coefficient on these blocks.
Definition at line 147 of file CoefficientManager.h.
|
private |
Definition at line 103 of file CoefficientManager.C.
| mfem::Coefficient & Moose::MFEM::CoefficientManager::declareScalar | ( | const std::string & | name, |
| const std::string & | existing_or_literal | ||
| ) |
Declare an alias to an existing scalar coefficient or, if it does not exist, try interpreting the name as a number with which to create a new constant coefficient.
Definition at line 28 of file CoefficientManager.C.
Referenced by MFEMProblem::addFunction(), MFEMProblem::addPostprocessor(), MFEMComplexVariable::declareCoefficients(), MFEMVariable::declareCoefficients(), declareScalar(), and MFEMScalarQuadratureFunction::MFEMScalarQuadratureFunction().
|
inline |
Create a new scalar coefficient, constructed from the argument pack.
Definition at line 44 of file CoefficientManager.h.
|
private |
Definition at line 21 of file CoefficientManager.C.
| mfem::Coefficient & Moose::MFEM::CoefficientManager::declareScalarProperty | ( | const std::string & | name, |
| const std::vector< std::string > & | blocks, | ||
| const std::string & | existing_or_literal | ||
| ) |
Use an existing scalar coefficient for a property on some blocks of the mesh.
The property will be a piecewise coefficient and it will have the value of existing_coef on these blocks. If no such scalar coefficient exists, try interpreting the name as a number with which to create a new constant coefficient.
Definition at line 43 of file CoefficientManager.C.
Referenced by declareScalarProperty(), and MFEMGenericFunctorMaterial::MFEMGenericFunctorMaterial().
|
inline |
Use a new scalar coefficient, constructed from the argument pack, for a property on some blocks of the mesh.
The property will be a piecewise coefficient and it will have the value of the new coefficient on these blocks.
Definition at line 68 of file CoefficientManager.h.
|
private |
Definition at line 34 of file CoefficientManager.C.
| mfem::VectorCoefficient & Moose::MFEM::CoefficientManager::declareVector | ( | const std::string & | name, |
| const std::string & | existing_or_literal | ||
| ) |
Declare an alias to an existing vector coefficientor or, if it does not exist, try interpreting the name as a vector of numbers with which to create a new constant vector coefficient.
Definition at line 62 of file CoefficientManager.C.
Referenced by MFEMProblem::addFunction(), MFEMComplexVariable::declareCoefficients(), MFEMVariable::declareCoefficients(), declareVector(), and MFEMVectorQuadratureFunction::MFEMVectorQuadratureFunction().
|
inline |
Create a new vector coefficient, constructed from the argument pack.
Definition at line 82 of file CoefficientManager.h.
|
private |
Definition at line 54 of file CoefficientManager.C.
| mfem::VectorCoefficient & Moose::MFEM::CoefficientManager::declareVectorProperty | ( | const std::string & | name, |
| const std::vector< std::string > & | blocks, | ||
| const std::string & | existing_or_literal | ||
| ) |
Use an existing vector coefficient for a property on some blocks of the mesh.
The property will be a piecewise coefficient and it will have the value of existing_coef on these blocks. If no such vector coefficient exists, try interpreting the name as a vector of numbers with which to create a new constant vector coefficient.
Definition at line 77 of file CoefficientManager.C.
Referenced by declareVectorProperty(), and MFEMGenericFunctorVectorMaterial::MFEMGenericFunctorVectorMaterial().
|
inline |
Use a new vector coefficient, constructed from the argument pack, for a property on some blocks of the mesh.
The property will be a piecewise coefficient and it will have the value of the new coefficient on these blocks.
Definition at line 107 of file CoefficientManager.h.
|
private |
Definition at line 68 of file CoefficientManager.C.
| mfem::MatrixCoefficient & Moose::MFEM::CoefficientManager::getMatrixCoefficient | ( | const std::string & | name | ) |
Return scalar coefficient with the given name.
Unlike for the scalar and vector counterparts, there is currently no way to try interpreting the name as numbers with which to construct a constant matrix coefficient.
Definition at line 174 of file CoefficientManager.C.
Referenced by declareMatrixProperty(), and MFEMObject::getMatrixCoefficientByName().
|
private |
Definition at line 155 of file CoefficientManager.C.
Referenced by declareMatrix(), declareMatrixProperty(), and getMatrixCoefficient().
| mfem::Coefficient & Moose::MFEM::CoefficientManager::getScalarCoefficient | ( | const std::string & | name | ) |
Return a scalar coefficient with the given name or, if that doesn't exists, try interpreting the name as a number with which to build a new constant coefficient.
Definition at line 162 of file CoefficientManager.C.
Referenced by declareScalarProperty(), MFEMObject::getScalarCoefficientByName(), MFEMParsedFunction::initialSetup(), and MFEMParaViewDataCollection::registerScalarCoefficients().
|
private |
Definition at line 123 of file CoefficientManager.C.
Referenced by declareScalar(), declareScalarProperty(), and getScalarCoefficient().
| mfem::VectorCoefficient & Moose::MFEM::CoefficientManager::getVectorCoefficient | ( | const std::string & | name | ) |
Return a vector coefficient with the given name or, if that doesn't exists, try interpreting the name as a vector of number with which to build a new constant vector coefficient.
Definition at line 168 of file CoefficientManager.C.
Referenced by MFEMComplexVariable::declareCoefficients(), MFEMVariable::declareCoefficients(), declareVectorProperty(), MFEMObject::getVectorCoefficientByName(), and MFEMParaViewDataCollection::registerVectorCoefficients().
|
private |
Definition at line 139 of file CoefficientManager.C.
Referenced by declareVector(), declareVectorProperty(), and getVectorCoefficient().
| void Moose::MFEM::CoefficientManager::markSolutionChanged | ( | ) |
Notify quadrature function coefficients that solution variables have changed, marking the stored values of those with a NONLINEAR update policy as stale so their source coefficients are re-projected on next use.
Definition at line 209 of file CoefficientManager.C.
Referenced by Moose::MFEM::ComplexEquationSystem::SetTrialVariablesFromTrueVectors(), and Moose::MFEM::EquationSystem::SetTrialVariablesFromTrueVectors().
| bool Moose::MFEM::CoefficientManager::matrixPropertyIsDefined | ( | const std::string & | name, |
| const std::string & | block | ||
| ) | const |
Definition at line 194 of file CoefficientManager.C.
| bool Moose::MFEM::CoefficientManager::scalarPropertyIsDefined | ( | const std::string & | name, |
| const std::string & | block | ||
| ) | const |
Definition at line 180 of file CoefficientManager.C.
| void Moose::MFEM::CoefficientManager::setTime | ( | const mfem::real_t | time | ) |
Definition at line 201 of file CoefficientManager.C.
Referenced by Moose::MFEM::TimeDependentEquationSystemProblemOperator::ImplicitSolve().
| bool Moose::MFEM::CoefficientManager::vectorPropertyIsDefined | ( | const std::string & | name, |
| const std::string & | block | ||
| ) | const |
Definition at line 187 of file CoefficientManager.C.
|
private |
Definition at line 183 of file CoefficientManager.h.
Referenced by declareMatrix(), declareMatrixProperty(), getMatrixCoefficientPtr(), matrixPropertyIsDefined(), and setTime().
|
private |
Definition at line 181 of file CoefficientManager.h.
Referenced by declareScalar(), declareScalarProperty(), getScalarCoefficientPtr(), markSolutionChanged(), scalarPropertyIsDefined(), and setTime().
|
private |
Definition at line 182 of file CoefficientManager.h.
Referenced by declareVector(), declareVectorProperty(), getVectorCoefficientPtr(), markSolutionChanged(), setTime(), and vectorPropertyIsDefined().
1.8.14