https://mooseframework.inl.gov
MOOSEToNEML2.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #include "MOOSEToNEML2.h"
11 
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 }
20 
21 #ifndef NEML2_ENABLED
22 
24 
25 #else
26 
28  : _neml2_name(params.get<std::string>("to_neml2"))
29 {
31 }
32 
33 void
34 MOOSEToNEML2::insertInto(std::map<std::string, neml2::Tensor> & map) const
35 {
36  map[_neml2_name] = gatheredData();
37 }
38 #endif
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
InputParameters emptyInputParameters()
const std::string _neml2_name
Name of the input variable or model parameter.
Definition: MOOSEToNEML2.h:47
void insertInto(std::map< std::string, neml2::Tensor > &) const
Insert the gathered data into the NEML2 material model.
Definition: MOOSEToNEML2.C:34
MOOSEToNEML2(const InputParameters &params)
Definition: MOOSEToNEML2.C:23
virtual neml2::Tensor gatheredData() const =0
Convert data gathered from MOOSE into neml2::Tensor.
void assertNEML2Enabled()
Assert that NEML2 is enabled.
Definition: NEML2Utils.C:81
static InputParameters validParams()
Definition: MOOSEToNEML2.C:13
const Elem & get(const ElemType type_in)