https://mooseframework.inl.gov
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
MOOSEToNEML2 Class Referenceabstract

Common interface for inserting gathered MOOSE data into the NEML2 material model. More...

#include <MOOSEToNEML2.h>

Inheritance diagram for MOOSEToNEML2:
[legend]

Public Member Functions

 MOOSEToNEML2 (const InputParameters &params)
 
const std::string & NEML2Name () const
 Name of the NEML2 variable/parameter. More...
 
virtual neml2::Tensor gatheredData () const =0
 Convert data gathered from MOOSE into neml2::Tensor. More...
 
void insertInto (std::map< std::string, neml2::Tensor > &) const
 Insert the gathered data into the NEML2 material model. More...
 

Static Public Member Functions

static InputParameters validParams ()
 

Private Attributes

const std::string _neml2_name
 Name of the input variable or model parameter. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ MOOSEToNEML2()

MOOSEToNEML2::MOOSEToNEML2 ( const InputParameters params)

Definition at line 23 of file MOOSEToNEML2.C.

23 {}

Member Function Documentation

◆ gatheredData()

virtual neml2::Tensor MOOSEToNEML2::gatheredData ( ) const
pure virtual

Convert data gathered from MOOSE into neml2::Tensor.

Implemented in MOOSEQuantityToNEML2< T, state >, and NEML2PreKernel.

Referenced by insertInto().

◆ insertInto()

void MOOSEToNEML2::insertInto ( std::map< std::string, neml2::Tensor > &  map) const

Insert the gathered data into the NEML2 material model.

Definition at line 34 of file MOOSEToNEML2.C.

35 {
36  map[_neml2_name] = gatheredData();
37 }
const std::string _neml2_name
Name of the input variable or model parameter.
Definition: MOOSEToNEML2.h:47
virtual neml2::Tensor gatheredData() const =0
Convert data gathered from MOOSE into neml2::Tensor.

◆ NEML2Name()

const std::string& MOOSEToNEML2::NEML2Name ( ) const
inline

Name of the NEML2 variable/parameter.

Definition at line 37 of file MOOSEToNEML2.h.

Referenced by NEML2PreKernel::NEML2PreKernel().

37 { return _neml2_name; }
const std::string _neml2_name
Name of the input variable or model parameter.
Definition: MOOSEToNEML2.h:47

◆ validParams()

InputParameters MOOSEToNEML2::validParams ( )
static

Definition at line 13 of file MOOSEToNEML2.C.

Referenced by NEML2PreKernel::validParams(), and MOOSEQuantityToNEML2< T, state >::validParams().

14 {
15  auto params = emptyInputParameters();
16  params.addRequiredParam<std::string>("to_neml2",
17  "Name of the NEML2 variable or parameter to write to");
18  return params;
19 }
InputParameters emptyInputParameters()

Member Data Documentation

◆ _neml2_name

const std::string MOOSEToNEML2::_neml2_name
private

Name of the input variable or model parameter.

Definition at line 47 of file MOOSEToNEML2.h.

Referenced by insertInto().


The documentation for this class was generated from the following files: