Line data Source code
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 "DGKernelBase.h" 13 : 14 : class ADDGKernel : public DGKernelBase, public NeighborMooseVariableInterface<Real> 15 : { 16 : public: 17 : static InputParameters validParams(); 18 : 19 : ADDGKernel(const InputParameters & parameters); 20 : 21 : private: 22 : void computeElemNeighResidual(Moose::DGResidualType type) override final; 23 : void computeElemNeighJacobian(Moose::DGJacobianType type) override final; 24 : void computeOffDiagElemNeighJacobian(Moose::DGJacobianType type, 25 : const MooseVariableFEBase & jvar) override final; 26 : void computeJacobian() override final; 27 : void computeOffDiagJacobian(unsigned int jvar) override final; 28 : 29 : protected: 30 44864 : const MooseVariableFEBase & variable() const override { return _var; } 31 : 32 : /// Compute this Kernel's contribution to the residual at the current quadrature point 33 : virtual ADReal computeQpResidual(Moose::DGResidualType type) = 0; 34 : 35 : /// Variable this kernel operates on 36 : MooseVariable & _var; 37 : /// Shape functions 38 : const VariablePhiValue & _phi; 39 : /// Gradient of shape function 40 : const VariablePhiGradient & _grad_phi; 41 : /// test functions 42 : const VariableTestValue & _test; 43 : /// Gradient of side shape function 44 : const VariableTestGradient & _grad_test; 45 : /// Side shape function 46 : const VariablePhiValue & _phi_neighbor; 47 : /// Gradient of side shape function 48 : const VariablePhiGradient & _grad_phi_neighbor; 49 : /// Side test function 50 : const VariableTestValue & _test_neighbor; 51 : /// Gradient of side shape function 52 : const VariableTestGradient & _grad_test_neighbor; 53 : 54 : /// Holds the solution at current quadrature points 55 : const ADVariableValue & _u; 56 : 57 : /// Holds the solution gradient at the current quadrature points 58 : const ADVariableGradient & _grad_u; 59 : 60 : /// Holds the current solution at the current quadrature point 61 : const ADVariableValue & _u_neighbor; 62 : 63 : /// Holds the current solution gradient at the current quadrature point 64 : const ADVariableGradient & _grad_u_neighbor; 65 : };