www.mooseframework.org
MaterialRealVectorValueAux.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>("component", 0, "The vector component to consider for this kernel");
23 
24  return params;
25 }
26 
28  : MaterialAuxBase<RealVectorValue>(parameters), _component(getParam<unsigned int>("component"))
29 {
30  if (_component > LIBMESH_DIM)
31  mooseError(
32  "The component ", _component, " does not exist for ", LIBMESH_DIM, " dimensional problems");
33 }
34 
35 Real
37 {
38  return _prop[_qp](_component);
39 }
virtual Real getRealValue() override
Returns material property values at quadrature points.
VectorValue< Real > RealVectorValue
Definition: Assembly.h:40
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< RealVectorValue > & _prop
Reference to the material property for this AuxKernel.
unsigned int _qp
Quadrature point index.
Definition: AuxKernel.h:192
InputParameters validParams< MaterialRealVectorValueAux >()
MaterialRealVectorValueAux(const InputParameters &parameters)
Class constructor.
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
unsigned int _component
The vector component to output.