Loading [MathJax]/extensions/tex2jax.js
www.mooseframework.org
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
MaterialStdVectorRealGradientAux.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 
15 
18 {
20  params.addClassDescription("Extracts a component of a material's std::vector<RealGradient> to an "
21  "aux variable. If the std::vector is not of sufficient size then "
22  "zero is returned");
23  params.addParam<unsigned int>(
24  "component", 0, "The gradient component to be extracted for this kernel");
25  return params;
26 }
27 
29  const InputParameters & parameters)
30  : MaterialStdVectorAuxBase<RealGradient>(parameters),
31  _component(getParam<unsigned int>("component"))
32 {
33  if (_component > LIBMESH_DIM)
34  mooseError(
35  "The component ", _component, " does not exist for ", LIBMESH_DIM, " dimensional problems");
36 }
37 
38 Real
40 {
41  return _prop[_qp][_index](_component);
42 }
MaterialStdVectorAuxBase
A base class for the various Material related AuxKernal objects.
Definition: MaterialStdVectorAuxBase.h:17
MaterialAuxBase< std::vector< RealGradient > >::_prop
const MaterialProperty< std::vector< RealGradient > > & _prop
Reference to the material property for this AuxKernel.
Definition: MaterialAuxBase.h:44
MooseObject::mooseError
void mooseError(Args &&... args) const
Definition: MooseObject.h:141
MaterialStdVectorRealGradientAux::_component
unsigned int _component
component of the real gradient to be extracted
Definition: MaterialStdVectorRealGradientAux.h:35
InputParameters::addParam
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.
Definition: InputParameters.h:1198
MaterialStdVectorRealGradientAux::getRealValue
virtual Real getRealValue() override
Returns material property values at quadrature points.
Definition: MaterialStdVectorRealGradientAux.C:39
InputParameters
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Definition: InputParameters.h:53
MaterialStdVectorRealGradientAux
AuxKernel for outputting a std::vector material-property component to an AuxVariable.
Definition: MaterialStdVectorRealGradientAux.h:24
MaterialStdVectorRealGradientAux::validParams
static InputParameters validParams()
Definition: MaterialStdVectorRealGradientAux.C:17
MaterialStdVectorRealGradientAux.h
InputParameters::addClassDescription
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.
Definition: InputParameters.C:70
defineLegacyParams
defineLegacyParams(MaterialStdVectorRealGradientAux)
MaterialStdVectorRealGradientAux::MaterialStdVectorRealGradientAux
MaterialStdVectorRealGradientAux(const InputParameters &parameters)
Definition: MaterialStdVectorRealGradientAux.C:28
MaterialStdVectorAuxBase< RealGradient >::_index
unsigned int _index
index of the vecor element
Definition: MaterialStdVectorAuxBase.h:36
MaterialStdVectorAuxBase::validParams
static InputParameters validParams()
Definition: MaterialStdVectorAuxBase.h:46
AuxKernelTempl::_qp
unsigned int _qp
Quadrature point index.
Definition: AuxKernel.h:227
registerMooseObject
registerMooseObject("MooseApp", MaterialStdVectorRealGradientAux)