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
14 template <>
17 {
18  InputParameters params = validParams<MaterialAuxBase<>>();
19  params.addClassDescription(
20  "Access a component of a RankTwoTensor for automatic material property output");
21  params.addRequiredParam<unsigned int>("i", "The index i of ij for the tensor to output");
22  params.addRequiredParam<unsigned int>("j", "The index j of ij for the tensor to output");
23  return params;
24 }
27  : MaterialAuxBase<RankTwoTensor>(parameters),
28  _i(getParam<unsigned int>("i")),
29  _j(getParam<unsigned int>("j"))
30 {
31  mooseAssert(_i < LIBMESH_DIM, "i component out of range for current LIBMESH_DIM");
32  mooseAssert(_j < LIBMESH_DIM, "j component out of range for current LIBMESH_DIM");
33 }
35 Real
37 {
38  return _prop[_qp](_i, _j);
39 }
MaterialRankTwoTensorAux(const InputParameters &parameters)
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...
A base class for the various Material related AuxKernal objects.
const MaterialProperty< RankTwoTensor > & _prop
Reference to the material property for this AuxKernel.
InputParameters validParams< MaterialRankTwoTensorAux >()
MaterialRankTwoTensorAux is designed to take the data in the RankTwoTensor material property...
registerMooseObject("MooseApp", MaterialRankTwoTensorAux)
unsigned int _qp
Quadrature point index.
Definition: AuxKernel.h:219
const unsigned int _i
tensor indices
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...
virtual Real getRealValue() override
Returns material property values at quadrature points.