https://mooseframework.inl.gov
Loading...
Searching...
No Matches
InterfaceKernelBase.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 "MooseArray.h"
18#include "ElementIDInterface.h"
19
29{
30public:
32
34
36 virtual const MooseVariableFEBase & neighborVariable() const = 0;
37
39 virtual void computeElementOffDiagJacobian(unsigned int jvar) = 0;
40
42 virtual void computeNeighborOffDiagJacobian(unsigned int jvar) = 0;
43
44 void prepareShapes(unsigned int var_num) override final;
45
46protected:
47 bool usesFaceCoupledValues() const override { return true; }
48
50 virtual Real computeQpJacobian(Moose::DGJacobianType /*type*/) { return 0; }
51
53 virtual Real computeQpOffDiagJacobian(Moose::DGJacobianType /*type*/, unsigned int /*jvar*/)
54 {
55 return 0;
56 }
57
59 const Real & getNeighborElemVolume();
60
62 const Elem * const & _current_elem;
63
66
68 const Elem * const & _neighbor_elem;
69
72
74 const unsigned int & _current_side;
75
77 const Elem * const & _current_side_elem;
78
81
84
86 unsigned int _qp;
87
90
92 const QBase * const & _qrule;
93
96
99
101 unsigned int _i, _j;
102
107
111 std::vector<AuxVariableName> _save_in_strings;
112
115
117 std::vector<MooseVariableFEBase *> _primary_save_in_residual_variables;
118
121
123 std::vector<MooseVariableFEBase *> _secondary_save_in_residual_variables;
124
129
133 std::vector<AuxVariableName> _diag_save_in_strings;
134
137
139 std::vector<MooseVariableFEBase *> _primary_save_in_jacobian_variables;
140
143
145 std::vector<MooseVariableFEBase *> _secondary_save_in_jacobian_variables;
146};
/class BoundaryRestrictable /brief Provides functionality for limiting the object to certain boundary...
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.
std::vector< MooseVariableFEBase * > _secondary_save_in_jacobian_variables
The aux variables to save the diagonal Jacobian contributions of the secondary variables to.
static InputParameters validParams()
std::vector< AuxVariableName > _save_in_strings
The names of the aux variables that will be used to save-in residuals (includes both primary and seco...
void prepareShapes(unsigned int var_num) override final
Prepare shape functions.
const MooseArray< Real > & _coord
Coordinate transformation value; relevant in axisymmetric simulations for example.
const QBase *const & _qrule
Quadrature rule.
const unsigned int & _current_side
Current side.
bool _has_secondary_jacobians_saved_in
Whether there are secondary jacobian aux variables.
virtual const MooseVariableFEBase & neighborVariable() const =0
The neighbor variable number that this interface kernel operates on.
virtual Real computeQpJacobian(Moose::DGJacobianType)
Compute jacobians at quadrature points.
bool _has_primary_residuals_saved_in
Whether there are primary residual aux variables.
const MooseArray< Point > & _q_point
Array that holds element quadrature point coordinates.
const Moose::CoordinateSystemType & _coord_sys
Coordinate system.
bool _has_secondary_residuals_saved_in
Whether there are secondary residual aux variables.
const Real & _neighbor_elem_volume
The neighboring element volume.
const Real & _current_side_volume
The volume (or length) of the current side.
std::vector< MooseVariableFEBase * > _secondary_save_in_residual_variables
The aux variables to save the secondary contributions to.
MultiMooseEnum _diag_save_in_var_side
MultiMooseEnum specifying whether jacobian save-in aux variables correspond to primary or secondary s...
const Real & getNeighborElemVolume()
The volume of the current neighbor.
const Real & _current_elem_volume
The volume (or length) of the current element.
unsigned int _qp
Current quadrature point.
std::vector< AuxVariableName > _diag_save_in_strings
The names of the aux variables that will be used to save-in jacobians (includes both primary and seco...
bool usesFaceCoupledValues() const override
Whether this object evaluates coupled variables on element faces, so that it must request coupled AD ...
const MooseArray< Real > & _JxW
Elemtn Jacobian/quadrature weight.
virtual void computeElementOffDiagJacobian(unsigned int jvar)=0
Selects the correct Jacobian type and routine to call for the primary variable jacobian.
const Elem *const & _current_elem
Pointer reference to the current element.
unsigned int _i
Index for test and trial functions.
const Elem *const & _current_side_elem
Current side element.
MultiMooseEnum _save_in_var_side
MultiMooseEnum specifying whether residual save-in aux variables correspond to primary or secondary s...
std::vector< MooseVariableFEBase * > _primary_save_in_jacobian_variables
The aux variables to save the diagonal Jacobian contributions of the primary variables to.
std::vector< MooseVariableFEBase * > _primary_save_in_residual_variables
The aux variables to save the primary residual contributions to.
const Elem *const & _neighbor_elem
The neighboring element.
bool _has_primary_jacobians_saved_in
Whether there are primary jacobian aux variables.
virtual void computeNeighborOffDiagJacobian(unsigned int jvar)=0
Selects the correct Jacobian type and routine to call for the secondary variable jacobian.
virtual Real computeQpOffDiagJacobian(Moose::DGJacobianType, unsigned int)
compute off-diagonal jacobian components at quadrature points
forward declarations
Definition MooseArray.h:18
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
This class provides an interface for common operations on field variables of both FE and FV types wit...
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type.
Intermediate base class that ties together all the interfaces for getting MooseVariables with the Moo...
This is a base class for objects that can provide residual contributions for both local and neighbor ...
This interface is designed for DGKernel, InternalSideUserObject, InterfaceUserObject,...
CoordinateSystemType
Definition MooseTypes.h:864
DGJacobianType
Definition MooseTypes.h:804