https://mooseframework.inl.gov
Loading...
Searching...
No Matches
DiracKernel.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// MOOSE includes
13#include "DiracKernelInfo.h"
15#include "DiracKernelBase.h"
16
17// forward declarations
18template <typename>
20
23
31template <typename T>
33{
34public:
36
38
42 virtual void computeResidual() override;
43
47 virtual void computeJacobian() override;
48
52 virtual Real computeQpOffDiagJacobian(unsigned int jvar);
53
57 virtual void computeOffDiagJacobian(unsigned int jvar) override;
58
59 virtual const MooseVariableField<T> & variable() const override { return _var; }
60
65 virtual void addPoints() override = 0;
66
67protected:
71 virtual Real computeQpResidual() = 0;
72
76 virtual Real computeQpJacobian();
77
80
81 // shape functions
82
87
88 // test functions
89
94
99};
DiracKernelBase is the base class for all DiracKernel type classes.
A DiracKernel is used when you need to add contributions to the residual by means of multiplying some...
Definition DiracKernel.h:33
const OutputTools< T >::VariablePhiGradient & _grad_phi
Gradients of shape functions at QPs.
Definition DiracKernel.h:86
virtual void computeResidual() override
Computes the residual for the current element.
Definition DiracKernel.C:61
static InputParameters validParams()
Definition DiracKernel.C:24
virtual Real computeQpResidual()=0
This is the virtual that derived classes should override for computing the residual.
virtual Real computeQpJacobian()
This is the virtual that derived classes should override for computing the Jacobian.
virtual void computeOffDiagJacobian(unsigned int jvar) override
Computes the off-diagonal Jacobian for variable jvar.
const OutputTools< T >::VariableTestGradient & _grad_test
Gradients of test functions at QPs.
Definition DiracKernel.h:93
MooseVariableField< T > & _var
Variable this kernel acts on.
Definition DiracKernel.h:79
const OutputTools< T >::VariableValue & _u
Holds the solution at current quadrature points.
Definition DiracKernel.h:96
virtual void addPoints() override=0
This is where the DiracKernel should call addPoint() for each point it needs to have a value distribu...
const OutputTools< T >::VariableGradient & _grad_u
Holds the solution gradient at the current quadrature points.
Definition DiracKernel.h:98
const OutputTools< T >::VariablePhiValue & _phi
Values of shape functions at QPs.
Definition DiracKernel.h:84
virtual void computeJacobian() override
Computes the jacobian for the current element.
Definition DiracKernel.C:88
const OutputTools< T >::VariableTestValue & _test
Values of test functions at QPs.
Definition DiracKernel.h:91
virtual const MooseVariableField< T > & variable() const override
Returns the variable that this object operates on.
Definition DiracKernel.h:59
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
This gets called by computeOffDiagJacobian() at each quadrature point.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
forward declarations
Definition MooseArray.h:18
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.