https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ADInterfaceKernel.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 "InterfaceKernelBase.h"
14
19template <typename T>
21{
22public:
24
26
28 const MooseVariableFE<T> & variable() const override { return _var; }
29
31 const MooseVariableFE<T> & neighborVariable() const override { return _neighbor_var; }
32
33private:
39
46
53
55 virtual void computeElementOffDiagJacobian(unsigned int jvar) override final;
56
58 virtual void computeNeighborOffDiagJacobian(unsigned int jvar) override final;
59
61 void computeResidual() override final;
62
64 void computeJacobian() override final;
65
66protected:
68 virtual ADReal computeQpResidual(Moose::DGResidualType type) = 0;
69
73 virtual void initQpResidual(Moose::DGResidualType /* type */) {}
74
77
80
83
86
89
92
95
98
101
104
107
110
113
116
119
123
126 DenseMatrix<Number> _local_kxx;
127
128private:
130};
131
ADInterfaceKernelTempl< RealVectorValue > ADVectorInterfaceKernel
ADInterfaceKernelTempl< Real > ADInterfaceKernel
DualNumber< Real, DNDerivativeType, true > ADReal
typename OutputTools< typename Moose::ADType< T >::type >::VariableValue ADTemplateVariableValue
Definition MooseTypes.h:653
typename OutputTools< typename Moose::ADType< T >::type >::VariableTestGradient ADTemplateVariableTestGradient
Definition MooseTypes.h:681
typename OutputTools< typename Moose::ADType< T >::type >::VariableGradient ADTemplateVariableGradient
Definition MooseTypes.h:656
ADInterfaceKernel and ADVectorInterfaceKernel is responsible for interfacing physics across subdomain...
void computeOffDiagElemNeighJacobian(Moose::DGJacobianType type, unsigned int jvar)
Using the passed DGJacobian type, selects the correct test function and trial function spaces and jac...
const MooseArray< Point > & _normals
Normal vectors at the quadrature points.
void computeElemNeighResidual(Moose::DGResidualType type)
Using the passed DGResidual type, selects the correct test function space and residual block,...
const MooseArray< ADReal > & _ad_coord
The ad version of coord.
const ADTemplateVariableGradient< T > & _grad_u
Holds the current solution gradient at the current quadrature point on the face.
Moose::DGResidualType resid_type
const ADTemplateVariableGradient< T > & _grad_neighbor_value
Coupled neighbor variable gradient.
virtual void computeNeighborOffDiagJacobian(unsigned int jvar) override final
Selects the correct Jacobian type and routine to call for the secondary variable jacobian.
const OutputTools< T >::VariablePhiValue & _phi_neighbor
Side neighbor shape function.
const MooseVariableFE< T > & variable() const override
The primary variable that this interface kernel operates on.
virtual void initQpResidual(Moose::DGResidualType)
Put necessary evaluations depending on qp but independent on test functions here.
const OutputTools< T >::VariableTestValue & _test_neighbor
Side neighbor test function.
const OutputTools< T >::VariableTestValue & _test
Side shape function.
const MooseArray< ADPoint > & _ad_q_point
The ad version of q_point.
void computeJacobian() override final
Computes the jacobian for the current side.
void computeResidual() override final
Computes the residual for the current side.
DenseMatrix< Number > _local_kxx
Holds residual entries as they are accumulated by this InterfaceKernel This variable is temporarily r...
void computeElemNeighJacobian(Moose::DGJacobianType type)
Using the passed DGJacobian type, selects the correct test function and trial function spaces and jac...
const MooseArray< ADReal > & _ad_JxW
The ad version of JxW.
const ADTemplateVariableTestGradient< T > & _grad_test
Gradient of side shape function.
const OutputTools< T >::VariableTestGradient & _grad_test_neighbor
Gradient of side neighbor shape function.
static InputParameters validParams()
MooseVariableFE< T > & _var
The primary side MooseVariable.
const MooseVariableFE< T > & neighborVariable() const override
The neighbor variable number that this interface kernel operates on.
virtual void computeElementOffDiagJacobian(unsigned int jvar) override final
Selects the correct Jacobian type and routine to call for the primary variable jacobian.
const MooseVariableFE< T > & _neighbor_var
Coupled neighbor variable.
const ADTemplateVariableValue< T > & _neighbor_value
Coupled neighbor variable value.
const ADTemplateVariableValue< T > & _u
Holds the current solution at the current quadrature point on the face.
const OutputTools< T >::VariablePhiValue & _phi
shape function
virtual ADReal computeQpResidual(Moose::DGResidualType type)=0
Compute residuals at quadrature points.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
InterfaceKernelBase is the base class for all InterfaceKernel type classes.
forward declarations
Definition MooseArray.h:18
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
const std::string & type() const
Get the type of this class.
Definition MooseBase.h:93
Class for stuff related to variables.
Enhances MooseVariableInterface interface provide values from neighbor elements.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
DGResidualType
Definition MooseTypes.h:798
DGJacobianType
Definition MooseTypes.h:804