Class to manage MFEM coefficient objects representing material properties. More...
#include <CoefficientMap.h>
Public Member Functions | |
| CoefficientMap ()=default | |
| template<class P , class... Args> | |
| std::shared_ptr< P > | make (Args &&... args) |
| Make arbitrary coefficients which will be tracked by this object. More... | |
| void | addCoefficient (const std::string &name, std::shared_ptr< T > coeff) |
| Add a named global coefficient. More... | |
| void | addPiecewiseBlocks (const std::string &name, std::shared_ptr< T > coeff, const std::vector< std::string > &blocks) |
| Add piecewise material property. More... | |
| T & | getCoefficient (const std::string &name) |
| std::shared_ptr< T > | getCoefficientPtr (const std::string &name) |
| bool | hasCoefficient (const std::string &name) const |
| bool | propertyDefinedOnBlock (const std::string &name, const std::string &block) const |
| void | setTime (const mfem::real_t time) |
| template<class F > | |
| void | apply (F &&func) |
| Apply a function to every coefficient created by this map. More... | |
Private Types | |
| using | PWData = std::tuple< std::shared_ptr< Tpw >, std::map< const std::string, std::shared_ptr< T > >> |
Private Member Functions | |
| PWData | emptyPWData (std::shared_ptr< T >) |
| void | checkPWData (std::shared_ptr< T >, std::shared_ptr< Tpw >, const std::string &) |
Private Attributes | |
| std::map< const std::string, std::variant< std::shared_ptr< T >, PWData > > | _coefficients |
| std::vector< std::shared_ptr< T > > | _iterable_coefficients |
Class to manage MFEM coefficient objects representing material properties.
It can build up piecewise coefficients representing properties defined across multiple materials.
Definition at line 35 of file CoefficientMap.h.
|
private |
Definition at line 155 of file CoefficientMap.h.
|
default |
|
inline |
Add a named global coefficient.
It must have been created with the make method on this object.
Definition at line 51 of file CoefficientMap.h.
Referenced by Moose::MFEM::CoefficientMap< mfem::MatrixCoefficient, mfem::PWMatrixCoefficient >::addPiecewiseBlocks(), Moose::MFEM::CoefficientManager::declareMatrix(), Moose::MFEM::CoefficientManager::declareScalar(), and Moose::MFEM::CoefficientManager::declareVector().
|
inline |
Add piecewise material property.
The coefficient must have been created with the make method on this object.
Note: If you attempt to overwrite an existing block then an exception will be thrown and data for that property will be left in an undefined state.
Definition at line 67 of file CoefficientMap.h.
Referenced by Moose::MFEM::CoefficientManager::declareMatrixProperty(), Moose::MFEM::CoefficientManager::declareScalarProperty(), and Moose::MFEM::CoefficientManager::declareVectorProperty().
|
inline |
Apply a function to every coefficient created by this map.
Definition at line 148 of file CoefficientMap.h.
Referenced by Moose::MFEM::CoefficientManager::markSolutionChanged().
|
inlineprivate |
Definition at line 164 of file CoefficientMap.h.
Referenced by Moose::MFEM::CoefficientMap< mfem::MatrixCoefficient, mfem::PWMatrixCoefficient >::addPiecewiseBlocks().
|
inlineprivate |
Definition at line 159 of file CoefficientMap.h.
Referenced by Moose::MFEM::CoefficientMap< mfem::MatrixCoefficient, mfem::PWMatrixCoefficient >::addPiecewiseBlocks().
|
inline |
Definition at line 102 of file CoefficientMap.h.
|
inline |
Definition at line 104 of file CoefficientMap.h.
Referenced by Moose::MFEM::CoefficientMap< mfem::MatrixCoefficient, mfem::PWMatrixCoefficient >::getCoefficient(), Moose::MFEM::CoefficientManager::getMatrixCoefficientPtr(), Moose::MFEM::CoefficientManager::getScalarCoefficientPtr(), and Moose::MFEM::CoefficientManager::getVectorCoefficientPtr().
|
inline |
Definition at line 124 of file CoefficientMap.h.
Referenced by Moose::MFEM::CoefficientMap< mfem::MatrixCoefficient, mfem::PWMatrixCoefficient >::addPiecewiseBlocks(), Moose::MFEM::CoefficientManager::getScalarCoefficientPtr(), Moose::MFEM::CoefficientManager::getVectorCoefficientPtr(), and Moose::MFEM::CoefficientMap< mfem::MatrixCoefficient, mfem::PWMatrixCoefficient >::propertyDefinedOnBlock().
|
inline |
Make arbitrary coefficients which will be tracked by this object.
Definition at line 42 of file CoefficientMap.h.
Referenced by Moose::MFEM::CoefficientManager::declareMatrix(), Moose::MFEM::CoefficientManager::declareMatrixProperty(), Moose::MFEM::CoefficientManager::declareScalar(), Moose::MFEM::CoefficientManager::declareScalarProperty(), Moose::MFEM::CoefficientManager::declareVector(), and Moose::MFEM::CoefficientManager::declareVectorProperty().
|
inline |
Definition at line 129 of file CoefficientMap.h.
Referenced by Moose::MFEM::CoefficientManager::matrixPropertyIsDefined(), Moose::MFEM::CoefficientManager::scalarPropertyIsDefined(), and Moose::MFEM::CoefficientManager::vectorPropertyIsDefined().
|
inline |
Definition at line 140 of file CoefficientMap.h.
Referenced by Moose::MFEM::CoefficientManager::setTime().
|
private |
Definition at line 156 of file CoefficientMap.h.
Referenced by Moose::MFEM::CoefficientMap< mfem::MatrixCoefficient, mfem::PWMatrixCoefficient >::addCoefficient(), Moose::MFEM::CoefficientMap< mfem::MatrixCoefficient, mfem::PWMatrixCoefficient >::addPiecewiseBlocks(), Moose::MFEM::CoefficientMap< mfem::MatrixCoefficient, mfem::PWMatrixCoefficient >::getCoefficientPtr(), Moose::MFEM::CoefficientMap< mfem::MatrixCoefficient, mfem::PWMatrixCoefficient >::hasCoefficient(), and Moose::MFEM::CoefficientMap< mfem::MatrixCoefficient, mfem::PWMatrixCoefficient >::propertyDefinedOnBlock().
|
private |
Definition at line 157 of file CoefficientMap.h.
Referenced by Moose::MFEM::CoefficientMap< mfem::MatrixCoefficient, mfem::PWMatrixCoefficient >::addCoefficient(), Moose::MFEM::CoefficientMap< mfem::MatrixCoefficient, mfem::PWMatrixCoefficient >::addPiecewiseBlocks(), Moose::MFEM::CoefficientMap< mfem::MatrixCoefficient, mfem::PWMatrixCoefficient >::apply(), Moose::MFEM::CoefficientMap< mfem::MatrixCoefficient, mfem::PWMatrixCoefficient >::make(), and Moose::MFEM::CoefficientMap< mfem::MatrixCoefficient, mfem::PWMatrixCoefficient >::setTime().
1.8.14