https://mooseframework.inl.gov
MaterialRankFourTensorAux.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 
14 
15 template <bool is_ad>
18 {
20  params.addClassDescription(
21  "Access a component of a RankFourTensor for automatic material property output");
22  params.addRequiredParam<unsigned int>("i", "The index i of ijkl for the tensor to output");
23  params.addRequiredParam<unsigned int>("j", "The index j of ijkl for the tensor to output");
24  params.addRequiredParam<unsigned int>("k", "The index k of ijkl for the tensor to output");
25  params.addRequiredParam<unsigned int>("l", "The index l of ijkl for the tensor to output");
26  return params;
27 }
28 
29 template <bool is_ad>
31  const InputParameters & parameters)
32  : MaterialAuxBaseTempl<RankFourTensor, is_ad>(parameters),
33  _i(this->template getParam<unsigned int>("i")),
34  _j(this->template getParam<unsigned int>("j")),
35  _k(this->template getParam<unsigned int>("k")),
36  _l(this->template getParam<unsigned int>("l"))
37 {
38  mooseAssert(_i < LIBMESH_DIM, "i component out of range for current LIBMESH_DIM");
39  mooseAssert(_j < LIBMESH_DIM, "j component out of range for current LIBMESH_DIM");
40  mooseAssert(_k < LIBMESH_DIM, "k component out of range for current LIBMESH_DIM");
41  mooseAssert(_l < LIBMESH_DIM, "l component out of range for current LIBMESH_DIM");
42 }
43 
44 template <bool is_ad>
45 Real
47 {
48  return MetaPhysicL::raw_value(this->_full_value(_i, _j, _k, _l));
49 }
RankFourTensorTempl is designed to handle any N-dimensional fourth order tensor, C.
MaterialRankFourTensorAux is designed to take the data in the RankFourTensor material property...
A base class for the various Material related AuxKernal objects.
auto raw_value(const Eigen::Map< T > &in)
Definition: EigenADReal.h:73
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
const unsigned int _i
tensor indices
virtual Real getRealValue() override
Returns material property values at quadrature points.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
MaterialRankFourTensorAuxTempl(const InputParameters &parameters)
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
static InputParameters validParams()
void ErrorVector unsigned int
registerMooseObject("MooseApp", MaterialRankFourTensorAux)