Common interface for inserting gathered MOOSE data into the NEML2 material model. More...
#include <MOOSEToNEML2.h>
Public Member Functions | |
| MOOSEToNEML2 (const InputParameters ¶ms) | |
| const std::string & | NEML2Name () const |
| Name of the NEML2 variable/parameter. | |
| virtual at::Tensor | gatheredData () const =0 |
| Convert data gathered from MOOSE into an at::Tensor (shape (batch, *base_shape)) | |
| void | insertInto (std::map< std::string, at::Tensor > &) const |
| Insert the gathered data into the NEML2 model input map. | |
Static Public Member Functions | |
| static InputParameters | validParams () |
Private Attributes | |
| const std::string | _neml2_name |
| Name of the input variable or model parameter. | |
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 27 of file MOOSEToNEML2.h.
| MOOSEToNEML2::MOOSEToNEML2 | ( | const InputParameters & | params | ) |
Definition at line 23 of file MOOSEToNEML2.C.
|
pure virtual |
Convert data gathered from MOOSE into an at::Tensor (shape (batch, *base_shape))
Implemented in TorchPreKernel, and MOOSEQuantityToNEML2< T, state >.
Referenced by insertInto().
| void MOOSEToNEML2::insertInto | ( | std::map< std::string, at::Tensor > & | map | ) | const |
Insert the gathered data into the NEML2 model input map.
Definition at line 34 of file MOOSEToNEML2.C.
|
inline |
Name of the NEML2 variable/parameter.
Definition at line 36 of file MOOSEToNEML2.h.
Referenced by TorchPreKernel::TorchPreKernel().
|
static |
Definition at line 13 of file MOOSEToNEML2.C.
Referenced by TorchPreKernel::validParams(), and MOOSEQuantityToNEML2< T, state >::validParams().
|
private |
Name of the input variable or model parameter.
Definition at line 46 of file MOOSEToNEML2.h.
Referenced by insertInto(), and NEML2Name().