www.mooseframework.org
MaterialRealTensorValueAux.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
16 
17 template <>
20 {
21  InputParameters params = validParams<MaterialAuxBase<>>();
22  params.addParam<unsigned int>("row", 0, "The row component to consider for this kernel");
23  params.addParam<unsigned int>("column", 0, "The column component to consider for this kernel");
24  return params;
25 }
26 
28  : MaterialAuxBase<RealTensorValue>(parameters),
29  _row(getParam<unsigned int>("row")),
30  _col(getParam<unsigned int>("column"))
31 {
32  if (_row > LIBMESH_DIM)
33  mooseError(
34  "The row component ", _row, " does not exist for ", LIBMESH_DIM, " dimensional problems");
35  if (_col > LIBMESH_DIM)
36  mooseError("The column component ",
37  _col,
38  " does not exist for ",
39  LIBMESH_DIM,
40  " dimensional problems");
41 }
42 
43 Real
45 {
46  return _prop[_qp](_row, _col);
47 }
InputParameters validParams< MaterialRealTensorValueAux >()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
A base class for the various Material related AuxKernal objects.
const MaterialProperty< RealTensorValue > & _prop
Reference to the material property for this AuxKernel.
MaterialRealTensorValueAux(const InputParameters &parameters)
Class constructor.
unsigned int _qp
Quadrature point index.
Definition: AuxKernel.h:192
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...
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
virtual Real getRealValue() override
Returns material property values at quadrature points.
TensorValue< Real > RealTensorValue
Definition: Assembly.h:45
unsigned int _row
The row index to output.
unsigned int _col
The column index to output.