www.mooseframework.org
InterfaceKernel.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 "InterfaceKernelBase.h"
14 
15 #define TemplateVariableValue typename OutputTools<T>::VariableValue
16 #define TemplateVariableGradient typename OutputTools<T>::VariableGradient
17 #define TemplateVariablePhiValue typename OutputTools<T>::VariablePhiValue
18 #define TemplateVariablePhiGradient typename OutputTools<T>::VariablePhiGradient
19 #define TemplateVariableTestValue typename OutputTools<T>::VariableTestValue
20 #define TemplateVariableTestGradient typename OutputTools<T>::VariableTestGradient
21 
22 // Forward Declarations
23 template <typename T>
25 
28 
29 template <>
31 
32 template <>
34 
39 template <typename T>
41 {
42 public:
44 
46  virtual MooseVariableFE<T> & variable() const override { return _var; }
47 
49  virtual const MooseVariableFE<T> & neighborVariable() const override { return _neighbor_var; }
50 
56 
63 
70  unsigned int jvar) override;
71 
73  virtual void computeElementOffDiagJacobian(unsigned int jvar) override;
74 
76  virtual void computeNeighborOffDiagJacobian(unsigned int jvar) override;
77 
79  virtual void computeResidual() override;
80 
82  virtual void computeJacobian() override;
83 
86 
87 protected:
90 
93 
95  const TemplateVariableValue & _u;
96 
98  const TemplateVariableGradient & _grad_u;
99 
101  const TemplateVariablePhiValue & _phi;
102 
104  const TemplateVariablePhiGradient & _grad_phi;
105 
107  const TemplateVariableTestValue & _test;
108 
110  const TemplateVariableTestGradient & _grad_test;
111 
114 
116  const TemplateVariableValue & _neighbor_value;
117 
119  const TemplateVariableGradient & _grad_neighbor_value;
120 
122  const TemplateVariablePhiValue & _phi_neighbor;
123 
125  const TemplateVariablePhiGradient & _grad_phi_neighbor;
126 
128  const TemplateVariableTestValue & _test_neighbor;
129 
131  const TemplateVariableTestGradient & _grad_test_neighbor;
132 
135  DenseMatrix<Number> _local_kxx;
136 };
virtual void computeElemNeighJacobian(Moose::DGJacobianType type) override
Using the passed DGJacobian type, selects the correct test function and trial function spaces and jac...
const TemplateVariableValue & _neighbor_value
Coupled neighbor variable value.
virtual void computeElemNeighResidual(Moose::DGResidualType type) override
Using the passed DGResidual type, selects the correct test function space and residual block...
MooseVariableFE< T > & _neighbor_var
Coupled neighbor variable.
const TemplateVariableValue & _u
Holds the current solution at the current quadrature point on the face.
InterfaceKernel and VectorInterfaceKernel is responsible for interfacing physics across subdomains...
InterfaceKernelTempl(const InputParameters &parameters)
InputParameters validParams< InterfaceKernel >()
const MooseArray< Point > & _normals
Normal vectors at the quadrature points.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const TemplateVariableTestGradient & _grad_test
Gradient of side shape function.
InputParameters validParams< VectorInterfaceKernel >()
const TemplateVariablePhiValue & _phi
shape function
DGResidualType
Definition: MooseTypes.h:509
const TemplateVariableTestGradient & _grad_test_neighbor
Gradient of side neighbor shape function.
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:53
Enhances MooseVariableInterface interface provide values from neighbor elements.
virtual void computeElementOffDiagJacobian(unsigned int jvar) override
Selects the correct Jacobian type and routine to call for the master variable jacobian.
virtual void computeOffDiagElemNeighJacobian(Moose::DGJacobianType type, unsigned int jvar) override
Using the passed DGJacobian type, selects the correct test function and trial function spaces and jac...
virtual MooseVariableFE< T > & variable() const override
The master variable that this interface kernel operates on.
virtual const MooseVariableFE< T > & neighborVariable() const override
The neighbor variable number that this interface kernel operates on.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:65
virtual void computeJacobian() override
Computes the jacobian for the current side.
const TemplateVariableTestValue & _test
Side shape function.
const TemplateVariablePhiGradient & _grad_phi_neighbor
Gradient of side neighbor shape function.
DGJacobianType
Definition: MooseTypes.h:515
InterfaceKernelTempl< RealVectorValue > VectorInterfaceKernel
const TemplateVariableGradient & _grad_u
Holds the current solution gradient at the current quadrature point on the face.
DenseMatrix< Number > _local_kxx
Holds residual entries as they are accumulated by this InterfaceKernel This variable is temporarily r...
InterfaceKernelTempl< Real > InterfaceKernel
InterfaceKernelBase is the base class for all InterfaceKernel type classes.
const TemplateVariablePhiGradient & _grad_phi
Shape function gradient.
MooseVariableFE< T > & _var
The master side MooseVariable.
virtual void computeResidual() override
Computes the residual for the current side.
const TemplateVariableTestValue & _test_neighbor
Side neighbor test function.
const TemplateVariablePhiValue & _phi_neighbor
Side neighbor shape function.
virtual void computeNeighborOffDiagJacobian(unsigned int jvar) override
Selects the correct Jacobian type and routine to call for the slave variable jacobian.
const TemplateVariableGradient & _grad_neighbor_value
Coupled neighbor variable gradient.
virtual Real computeQpResidual(Moose::DGResidualType type)=0
Compute residuals at quadrature points.