https://mooseframework.inl.gov
Loading...
Searching...
No Matches
VectorKernel.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 "KernelBase.h"
14
15class VectorKernel : public KernelBase, public MooseVariableInterface<RealVectorValue>
16{
17public:
19
21
23 virtual void computeResidual() override;
24
26 virtual void computeJacobian() override;
27
29 virtual void computeOffDiagJacobian(unsigned int jvar) override;
30
35 virtual void computeOffDiagJacobianScalar(unsigned int jvar) override;
36
37 virtual const VectorMooseVariable & variable() const override { return _var; }
38
39protected:
43 virtual Real computeQpResidual() = 0;
44
48 virtual Real computeQpJacobian() { return 0; }
49
54 virtual Real computeQpOffDiagJacobian(unsigned int /*jvar*/) { return 0; }
55
59 virtual Real computeQpOffDiagJacobianScalar(unsigned int /*jvar*/) { return 0; }
60
63
66
69
72
75
78
81};
OutputTools< RealVectorValue >::VariablePhiValue VectorVariablePhiValue
Definition MooseTypes.h:370
OutputTools< RealVectorValue >::VariableTestValue VectorVariableTestValue
Definition MooseTypes.h:375
OutputTools< RealVectorValue >::VariableTestGradient VectorVariableTestGradient
Definition MooseTypes.h:376
OutputTools< RealVectorValue >::VariableGradient VectorVariableGradient
Definition MooseTypes.h:366
OutputTools< RealVectorValue >::VariableValue VectorVariableValue
Definition MooseTypes.h:365
OutputTools< RealVectorValue >::VariablePhiGradient VectorVariablePhiGradient
Definition MooseTypes.h:371
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
This is the common base class for the three main kernel types implemented in MOOSE,...
Definition KernelBase.h:29
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
Class for stuff related to variables.
Interface for objects that need to get values of MooseVariables.
const VectorVariableTestValue & _test
the current test function
static InputParameters validParams()
virtual void computeOffDiagJacobianScalar(unsigned int jvar) override
Computes jacobian block with respect to a scalar variable.
virtual Real computeQpOffDiagJacobianScalar(unsigned int)
For coupling scalar variables.
virtual const VectorMooseVariable & variable() const override
Returns the variable that this object operates on.
const VectorVariablePhiGradient & _grad_phi
gradient of the shape function
virtual void computeJacobian() override
Compute this VectorKernel's contribution to the diagonal Jacobian entries.
const VectorVariablePhiValue & _phi
the current shape functions
const VectorVariableGradient & _grad_u
Holds the solution gradient at current quadrature points.
virtual Real computeQpOffDiagJacobian(unsigned int)
This is the virtual that derived classes should override for computing an off-diagonal Jacobian compo...
virtual void computeOffDiagJacobian(unsigned int jvar) override
Computes d-residual / d-jvar... storing the result in Ke.
virtual Real computeQpJacobian()
Compute this Kernel's contribution to the Jacobian at the current quadrature point.
const VectorMooseVariable & _var
This is a regular kernel so we cast to a regular MooseVariable.
const VectorVariableValue & _u
Holds the solution at current quadrature points.
virtual Real computeQpResidual()=0
Compute this Kernel's contribution to the residual at the current quadrature point.
const VectorVariableTestGradient & _grad_test
gradient of the test function
virtual void computeResidual() override
Compute this VectorKernel's contribution to the residual.