www.mooseframework.org
KernelGrad.h
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 
10 #pragma once
11 
12 // local includes
13 #include "Kernel.h"
14 
15 // Forward Declarations
16 class KernelGrad;
17 
18 template <>
20 
27 class KernelGrad : public Kernel
28 {
29 public:
37 
38  virtual void computeResidual() override;
39 
40  virtual void computeJacobian() override;
41 
42  virtual void computeOffDiagJacobian(MooseVariableFEBase & jvar) override;
43 
45 
46 protected:
50  virtual RealGradient precomputeQpResidual() = 0;
51 
55  virtual RealGradient precomputeQpJacobian();
56 
57  virtual Real computeQpResidual() override;
58 };
59 
The KernelGrad class is responsible for calculating the residuals in form:
Definition: KernelGrad.h:27
virtual void computeResidual() override
Compute this Kernel&#39;s contribution to the residual.
Definition: KernelGrad.C:25
virtual RealGradient precomputeQpResidual()=0
Called before forming the residual for an element.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual Real computeQpResidual() override
Compute this Kernel&#39;s contribution to the residual at the current quadrature point.
Definition: KernelGrad.C:98
virtual void computeOffDiagJacobian(MooseVariableFEBase &jvar) override
Computes d-residual / d-jvar... storing the result in Ke.
Definition: Kernel.C:138
virtual void computeJacobian() override
Compute this Kernel&#39;s contribution to the diagonal Jacobian entries.
Definition: KernelGrad.C:50
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:65
virtual RealGradient precomputeQpJacobian()
Called before forming the jacobian for an element.
Definition: KernelGrad.C:104
InputParameters validParams< KernelGrad >()
Definition: KernelGrad.C:16
Definition: Kernel.h:20
virtual void computeOffDiagJacobian(MooseVariableFEBase &jvar) override
Computes d-residual / d-jvar... storing the result in Ke.
Definition: KernelGrad.C:81
KernelGrad(const InputParameters &parameters)
Factory constructor initializes all internal references needed for residual computation.
Definition: KernelGrad.C:22