https://mooseframework.inl.gov
Loading...
Searching...
No Matches
NEML2ToMOOSEMaterialProperty.h
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#pragma once
11
12#include "NEML2Utils.h"
13#include "Material.h"
16
17// at::Tensor is available via NEML2Utils.h (which includes ATen) when NEML2 is enabled.
18
20
21template <typename T>
23{
24public:
26
28
29#ifdef NEML2_ENABLED
30 void computeProperties() override;
31
32protected:
33 void initQpStatefulProperties() override {}
34
37
40
43
45 const at::Tensor & _value;
46#endif
47};
48
49#define DefineNEML2ToMOOSEMaterialPropertyAlias(T, alias) \
50 using NEML2ToMOOSE##alias##MaterialProperty = NEML2ToMOOSEMaterialProperty<T>
51
55DefineNEML2ToMOOSEMaterialPropertyAlias(RealVectorValue, RealVectorValue);
DefineNEML2ToMOOSEMaterialPropertyAlias(Real, Real)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Materials compute MaterialProperties.
Definition Material.h:36
NEML2ModelExecutor executes a NEML2 model.
const MaterialProperty< T > * _prop0
Initial condition.
void initQpStatefulProperties() override
Initialize stateful properties at quadrature points.
const at::Tensor & _value
Reference to the requested output (or its derivative) value.
void computeProperties() override
Performs the quadrature point loop, calling computeQpProperties.
const NEML2ModelExecutor & _execute_neml2_model
User object managing the execution of the NEML2 model.
MaterialProperty< T > & _prop
Emitted material property.
RankFourTensorTempl is designed to handle any N-dimensional fourth order tensor, C.
SymmetricRankFourTensorTempl is designed to handle an N-dimensional fourth order tensor with minor sy...