https://mooseframework.inl.gov
KernelGrad.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 // local includes
13 #include "Kernel.h"
14 
21 class KernelGrad : public Kernel
22 {
23 public:
25 
33 
34  virtual void computeResidual() override;
35 
36  virtual void computeJacobian() override;
37 
38  virtual void computeOffDiagJacobian(unsigned int jvar) override;
39 
40 protected:
44  virtual RealGradient precomputeQpResidual() = 0;
45 
50 
51  virtual Real computeQpResidual() override;
52 };
The KernelGrad class is responsible for calculating the residuals in form:
Definition: KernelGrad.h:21
virtual void computeResidual() override
Compute this Kernel's contribution to the residual.
Definition: KernelGrad.C:24
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's contribution to the residual at the current quadrature point.
Definition: KernelGrad.C:94
virtual void computeJacobian() override
Compute this Kernel's contribution to the diagonal Jacobian entries.
Definition: KernelGrad.C:42
virtual RealGradient precomputeQpJacobian()
Called before forming the jacobian for an element.
Definition: KernelGrad.C:100
static InputParameters validParams()
Definition: KernelGrad.C:16
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Definition: Kernel.h:15
const InputParameters & parameters() const
Get the parameters of the object.
KernelGrad(const InputParameters &parameters)
Factory constructor initializes all internal references needed for residual computation.
Definition: KernelGrad.C:21
virtual void computeOffDiagJacobian(unsigned int jvar) override
Computes d-residual / d-jvar... storing the result in Ke.
Definition: KernelGrad.C:70