https://mooseframework.inl.gov
MOOSEMaterialPropertyToNEML2.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 
11 
12 #define registerMOOSEMaterialPropertyToNEML2(alias) \
13  registerMooseObject("MooseApp", MOOSE##alias##MaterialPropertyToNEML2); \
14  registerMooseObject("MooseApp", MOOSEOld##alias##MaterialPropertyToNEML2)
15 
20 
21 template <typename T, unsigned int state>
24 {
26  params.addClassDescription(NEML2Utils::docstring(
27  "Gather a MOOSE material property of type " + demangle(typeid(T).name()) +
28  " for insertion into the specified input or model parameter of a NEML2 model."));
29  params.template addRequiredParam<MaterialPropertyName>(
30  "from_moose", NEML2Utils::docstring("MOOSE material property to read from"));
31  return params;
32 }
33 
34 template <typename T, unsigned int state>
36  : MOOSEToNEML2Batched<T>(params)
37 #ifdef NEML2_ENABLED
38  ,
39  _mat_prop(this->template getGenericMaterialProperty<T, false>("from_moose", state))
40 #endif
41 {
42 }
43 
44 #define instantiateMOOSEMaterialPropertyToNEML2(T) \
45  template class MOOSEMaterialPropertyToNEML2<T, 0>; \
46  template class MOOSEMaterialPropertyToNEML2<T, 1>
47 
std::string name(const ElemQuality q)
MOOSEMaterialPropertyToNEML2< T, state >::MOOSEMaterialPropertyToNEML2(const InputParameters &params) template class MOOSEMaterialPropertyToNEML2< T, 1 > instantiateMOOSEMaterialPropertyToNEML2(Real)
registerMOOSEMaterialPropertyToNEML2(Real)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Generic gatherer for collecting "batched" MOOSE data for NEML2.
MOOSEMaterialPropertyToNEML2(const InputParameters &params)
static InputParameters validParams()
SymmetricRankTwoTensorTempl is designed to handle the Stress or Strain Tensor for an anisotropic mate...
std::string docstring(const std::string &desc)
Augment docstring if NEML2 is not enabled.
Definition: NEML2Utils.C:77
std::string demangle(const char *name)
RankTwoTensorTempl is designed to handle the Stress or Strain Tensor for a fully anisotropic material...
Definition: RankTwoTensor.h:87