https://mooseframework.inl.gov
GradField.h
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 
10 #pragma once
11 
12 #include "VectorKernel.h"
13 
17 class GradField : public VectorKernel
18 {
19 public:
21 
23 
24 protected:
25  virtual Real computeQpResidual() override;
26  virtual Real computeQpOffDiagJacobian(unsigned jvar) override;
27 
30  unsigned int _p_var_num;
31 
33  const VariableValue & _p;
34 
37 
40 
43 };
MooseVariable & _p_var
coupled scalar variable
Definition: GradField.h:29
Class for stuff related to variables.
Definition: Adaptivity.h:31
const VectorVariableTestDivergence & _div_test
div of the test function
Definition: GradField.h:39
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const VariableValue & _p
value of the coupled scalar variable
Definition: GradField.h:33
static InputParameters validParams()
Definition: GradField.C:16
const VariablePhiValue & _p_phi
shape function of the coupled scalar variable
Definition: GradField.h:36
GradField(const InputParameters &parameters)
Definition: GradField.C:26
Real _coeff
scalar coefficient
Definition: GradField.h:42
OutputTools< RealVectorValue >::VariableTestDivergence VectorVariableTestDivergence
Definition: MooseTypes.h:345
virtual Real computeQpResidual() override
Compute this Kernel&#39;s contribution to the residual at the current quadrature point.
Definition: GradField.C:38
OutputTools< Real >::VariableValue VariableValue
Definition: MooseTypes.h:314
forward declarations
Weak form contribution corresponding to -k*grad(p)
Definition: GradField.h:17
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const InputParameters & parameters() const
Get the parameters of the object.
unsigned int _p_var_num
Definition: GradField.h:30
virtual Real computeQpOffDiagJacobian(unsigned jvar) override
This is the virtual that derived classes should override for computing an off-diagonal Jacobian compo...
Definition: GradField.C:44