www.mooseframework.org
MaterialRankFourTensorAux.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
13 
16 {
18  params.addClassDescription(
19  "Access a component of a RankFourTensor for automatic material property output");
20  params.addRequiredParam<unsigned int>("i", "The index i of ijkl for the tensor to output");
21  params.addRequiredParam<unsigned int>("j", "The index j of ijkl for the tensor to output");
22  params.addRequiredParam<unsigned int>("k", "The index k of ijkl for the tensor to output");
23  params.addRequiredParam<unsigned int>("l", "The index l of ijkl for the tensor to output");
24  return params;
25 }
26 
28  : MaterialAuxBase<RankFourTensor>(parameters),
29  _i(getParam<unsigned int>("i")),
30  _j(getParam<unsigned int>("j")),
31  _k(getParam<unsigned int>("k")),
32  _l(getParam<unsigned int>("l"))
33 {
34  mooseAssert(_i < LIBMESH_DIM, "i component out of range for current LIBMESH_DIM");
35  mooseAssert(_j < LIBMESH_DIM, "j component out of range for current LIBMESH_DIM");
36  mooseAssert(_k < LIBMESH_DIM, "k component out of range for current LIBMESH_DIM");
37  mooseAssert(_l < LIBMESH_DIM, "l component out of range for current LIBMESH_DIM");
38 }
39 
40 Real
42 {
43  return _prop[_qp](_i, _j, _k, _l);
44 }
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.
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...
static InputParameters validParams()
static InputParameters validParams()
const GenericMaterialProperty< T, is_ad > & _prop
Reference to the material property for this AuxKernel.
virtual Real getRealValue() override
Returns material property values at quadrature points.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
unsigned int _qp
Quadrature point index.
Definition: AuxKernel.h:230
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...
MaterialRankFourTensorAux(const InputParameters &parameters)
const unsigned int _i
tensor indices
void ErrorVector unsigned int
registerMooseObject("MooseApp", MaterialRankFourTensorAux)