www.mooseframework.org
GradientComponent.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 #ifndef GRADIENTCOMPONENT_H
8 #define GRADIENTCOMPONENT_H
9 
10 #include "Kernel.h"
11 
12 class GradientComponent;
13 
14 template <>
15 InputParameters validParams<GradientComponent>();
16 
17 class GradientComponent : public Kernel
18 {
19 public:
20  GradientComponent(const InputParameters & parameters);
21 
22 protected:
23  virtual Real computeQpResidual();
24  virtual Real computeQpJacobian();
25  virtual Real computeQpOffDiagJacobian(unsigned int jvar);
26 
28  const unsigned int _v_var;
29 
31  const VariableGradient & _grad_v;
32 
34  const unsigned int _component;
35 };
36 
37 #endif // GRADIENTCOMPONENT_H
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
GradientComponent(const InputParameters &parameters)
const VariableGradient & _grad_v
Gradient of the coupled variable.
virtual Real computeQpJacobian()
const unsigned int _component
Component of the gradient vector to match.
virtual Real computeQpResidual()
InputParameters validParams< GradientComponent >()
const unsigned int _v_var
Identity of the coupled variable.