www.mooseframework.org
MaterialRealTensorValueAux.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("Object for extracting a component of a rank two tensor material "
19  "property to populate an auxiliary variable.");
20  params.addParam<unsigned int>("row", 0, "The row component to consider for this kernel");
21  params.addParam<unsigned int>("column", 0, "The column component to consider for this kernel");
22  return params;
23 }
24 
26  : MaterialAuxBase<RealTensorValue>(parameters),
27  _row(getParam<unsigned int>("row")),
28  _col(getParam<unsigned int>("column"))
29 {
30  if (_row > LIBMESH_DIM)
31  mooseError(
32  "The row component ", _row, " does not exist for ", LIBMESH_DIM, " dimensional problems");
33  if (_col > LIBMESH_DIM)
34  mooseError("The column component ",
35  _col,
36  " does not exist for ",
37  LIBMESH_DIM,
38  " dimensional problems");
39 }
40 
41 Real
43 {
44  return _prop[_qp](_row, _col);
45 }
static InputParameters validParams()
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...
AuxKernel for outputting a RealTensorValue material property component to an AuxVariable.
static InputParameters validParams()
TensorValue< Real > RealTensorValue
const GenericMaterialProperty< T, is_ad > & _prop
Reference to the material property for this AuxKernel.
MaterialRealTensorValueAux(const InputParameters &parameters)
Class constructor.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
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...
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an option parameter and a documentation string to the InputParameters object...
virtual Real getRealValue() override
Returns material property values at quadrature points.
registerMooseObject("MooseApp", MaterialRealTensorValueAux)
unsigned int _row
The row index to output.
unsigned int _col
The column index to output.
void ErrorVector unsigned int