https://mooseframework.inl.gov
Loading...
Searching...
No Matches
VariableGradientComponent.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
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{
17 MooseEnum component("x=0 y=1 z=2");
20 "Creates a field consisting of one component of the gradient of a coupled variable.");
21 params.addRequiredCoupledVar("gradient_variable",
22 "The variable from which to compute the gradient component");
23 params.addParam<MooseEnum>("component", component, "The gradient component to compute");
24 return params;
25}
26
28 : AuxKernel(parameters),
29 _gradient(coupledGradient("gradient_variable")),
30 _component(getParam<MooseEnum>("component"))
31{
32}
33
34Real
registerMooseObject("MooseApp", VariableGradientComponent)
unsigned int _qp
Quadrature point index.
Definition AuxKernel.h:155
static InputParameters validParams()
Definition AuxKernel.C:27
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object.
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.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition MooseEnum.h:55
Extract a component from the gradient of a variable.
static InputParameters validParams()
VariableGradientComponent(const InputParameters &parameters)
Class constructor.
const VariableGradient & _gradient
Reference to the gradient of the coupled variable.
virtual Real computeValue() override
Compute and return the value of the aux variable.