www.mooseframework.org
KernelValue.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 
21 class KernelValue : 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 Real precomputeQpResidual() = 0;
45 
49  virtual Real precomputeQpJacobian();
50 
51  virtual Real computeQpResidual() final;
52 };
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual void computeOffDiagJacobian(unsigned int jvar) override
Computes d-residual / d-jvar... storing the result in Ke.
Definition: KernelValue.C:76
The KernelValue class is responsible for calculating the residuals in form:
Definition: KernelValue.h:21
KernelValue(const InputParameters &parameters)
Factory constructor initializes all internal references needed for residual computation.
Definition: KernelValue.C:21
virtual void computeJacobian() override
Compute this Kernel's contribution to the diagonal Jacobian entries.
Definition: KernelValue.C:47
virtual Real precomputeQpJacobian()
Called before forming the jacobian for an element.
Definition: KernelValue.C:104
virtual void computeResidual() override
Compute this Kernel's contribution to the residual.
Definition: KernelValue.C:24
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.
virtual Real computeQpResidual() final
Compute this Kernel's contribution to the residual at the current quadrature point.
Definition: KernelValue.C:98
virtual Real precomputeQpResidual()=0
Called before forming the residual for an element.
static InputParameters validParams()
Definition: KernelValue.C:16