Common interface for inserting gathered MOOSE data into the NEML2 material model. More...
#include <MOOSEToNEML2.h>
Public Types | |
enum | Mode { Mode::VARIABLE, Mode::OLD_VARIABLE, Mode::PARAMETER, Mode::UNDEFINED } |
Public Member Functions | |
MOOSEToNEML2 (const InputParameters ¶ms) | |
void | setMode (Mode) const |
Change the mode of operation. More... | |
Mode | getMode () const |
Get the current mode of operation. More... | |
virtual void | checkMode () const |
Perform error checking after _mode has been set. More... | |
const std::string & | NEML2Name () const |
Raw name of the NEML2 variable/parameter. More... | |
const neml2::VariableName & | NEML2VariableName () const |
Name of the NEML2 input variable (only meaningful when _mode == VARIABLE) More... | |
const std::string & | NEML2ParameterName () const |
Name of the NEML2 parameter (only meaningful when _mode == PARAMETER) More... | |
virtual neml2::Tensor | gatheredData () const =0 |
Convert data gathered from MOOSE into neml2::Tensor. More... | |
void | insertInto (neml2::ValueMap &, std::map< std::string, neml2::Tensor > &) const |
Insert the gathered data into the NEML2 material model. More... | |
Static Public Member Functions | |
static InputParameters | validParams () |
Protected Attributes | |
Mode | _mode |
Whether we should insert into NEML2 input variable or NEML2 model parameter. More... | |
neml2::VariableName | _neml2_variable |
NEML2 input variable to transfer data to. More... | |
std::string | _neml2_parameter |
NEML2 parameter to transfer data to. More... | |
Private Attributes | |
const std::string | _raw_name |
Raw name of the input variable or model parameter. More... | |
Common interface for inserting gathered MOOSE data into the NEML2 material model.
This interface handles the insertion into both NEML2 input variable and NEML2 model parameter.
Users are only required to provide the name of the variable/parameter, and we perform a run-time introspection of the NEML2 model to determine if the supplied name is for a NEML2 variable or for a NEML2 model parameter.
Definition at line 28 of file MOOSEToNEML2.h.
|
strong |
Enumerator | |
---|---|
VARIABLE | |
OLD_VARIABLE | |
PARAMETER | |
UNDEFINED |
Definition at line 36 of file MOOSEToNEML2.h.
MOOSEToNEML2::MOOSEToNEML2 | ( | const InputParameters & | params | ) |
Definition at line 23 of file MOOSEToNEML2.C.
|
virtual |
Perform error checking after _mode has been set.
Definition at line 49 of file MOOSEToNEML2.C.
Referenced by setMode().
|
pure virtual |
Convert data gathered from MOOSE into neml2::Tensor.
Implemented in MOOSEToNEML2Batched< T >, MOOSEToNEML2Batched< Real >, and MOOSEPostprocessorToNEML2Templ< state >.
Referenced by insertInto().
|
inline |
Get the current mode of operation.
Definition at line 54 of file MOOSEToNEML2.h.
void MOOSEToNEML2::insertInto | ( | neml2::ValueMap & | input, |
std::map< std::string, neml2::Tensor > & | params | ||
) | const |
Insert the gathered data into the NEML2 material model.
Definition at line 73 of file MOOSEToNEML2.C.
|
inline |
Raw name of the NEML2 variable/parameter.
Definition at line 60 of file MOOSEToNEML2.h.
const std::string & MOOSEToNEML2::NEML2ParameterName | ( | ) | const |
Name of the NEML2 parameter (only meaningful when _mode == PARAMETER)
Definition at line 66 of file MOOSEToNEML2.C.
const neml2::VariableName & MOOSEToNEML2::NEML2VariableName | ( | ) | const |
Name of the NEML2 input variable (only meaningful when _mode == VARIABLE)
Definition at line 58 of file MOOSEToNEML2.C.
void MOOSEToNEML2::setMode | ( | MOOSEToNEML2::Mode | m | ) | const |
Change the mode of operation.
The NEML2ModelExecutor user object performs run-time introspection of the NEML2 model to determine if the supplied name is for a NEML2 variable or for a NEML2 model parameter. It then uses this method to change the mode of operation of the MOOSEToNEML2 gatherer.
Definition at line 34 of file MOOSEToNEML2.C.
|
static |
Definition at line 13 of file MOOSEToNEML2.C.
Referenced by MOOSEToNEML2Unbatched::validParams(), and MOOSEToNEML2Batched< Real >::validParams().
|
mutableprotected |
Whether we should insert into NEML2 input variable or NEML2 model parameter.
Definition at line 76 of file MOOSEToNEML2.h.
Referenced by checkMode(), getMode(), insertInto(), NEML2ParameterName(), NEML2VariableName(), and setMode().
|
mutableprotected |
NEML2 parameter to transfer data to.
Definition at line 82 of file MOOSEToNEML2.h.
Referenced by insertInto(), NEML2ParameterName(), and setMode().
|
mutableprotected |
NEML2 input variable to transfer data to.
Definition at line 79 of file MOOSEToNEML2.h.
Referenced by checkMode(), insertInto(), NEML2VariableName(), and setMode().
|
private |
Raw name of the input variable or model parameter.
Definition at line 86 of file MOOSEToNEML2.h.
Referenced by NEML2Name(), and setMode().