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 double time) |
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 38 of file CoefficientMap.h.
|
private |
Definition at line 150 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 54 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 70 of file CoefficientMap.h.
Referenced by Moose::MFEM::CoefficientManager::declareMatrixProperty(), Moose::MFEM::CoefficientManager::declareScalarProperty(), and Moose::MFEM::CoefficientManager::declareVectorProperty().
|
inlineprivate |
Definition at line 159 of file CoefficientMap.h.
Referenced by Moose::MFEM::CoefficientMap< mfem::MatrixCoefficient, mfem::PWMatrixCoefficient >::addPiecewiseBlocks().
|
inlineprivate |
Definition at line 154 of file CoefficientMap.h.
Referenced by Moose::MFEM::CoefficientMap< mfem::MatrixCoefficient, mfem::PWMatrixCoefficient >::addPiecewiseBlocks().
|
inline |
Definition at line 105 of file CoefficientMap.h.
|
inline |
Definition at line 107 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 127 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 45 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 132 of file CoefficientMap.h.
Referenced by Moose::MFEM::CoefficientManager::matrixPropertyIsDefined(), Moose::MFEM::CoefficientManager::scalarPropertyIsDefined(), and Moose::MFEM::CoefficientManager::vectorPropertyIsDefined().
|
inline |
Definition at line 143 of file CoefficientMap.h.
Referenced by Moose::MFEM::CoefficientManager::setTime().
|
private |
Definition at line 151 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 152 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 >::make(), and Moose::MFEM::CoefficientMap< mfem::MatrixCoefficient, mfem::PWMatrixCoefficient >::setTime().