17 template <
typename T,
bool is_ad>
23 "penalty",
"The penalty that penalizes jump between primary and neighbor variables.");
24 params.
addParam<MaterialPropertyName>(
25 "jump_prop_name",
"the name of the material property that calculates the jump.");
27 "A penalty-based interface condition that forces" 28 "the continuity of variables and the flux equivalence across an interface.");
32 template <
typename T,
bool is_ad>
36 _penalty(this->template getParam<
Real>(
"penalty")),
37 _jump(isParamValid(
"jump_prop_name")
38 ? &this->template getGenericMaterialProperty<T, is_ad>(
"jump_prop_name")
43 template <
typename T,
bool is_ad>
52 jump_value = (*_jump)[_qp];
54 jump_value = _u[_qp] - _neighbor_value[_qp];
59 r = _test[_i][_qp] * _penalty * jump_value;
63 r = _test_neighbor[_i][_qp] * -_penalty * jump_value;
70 template <
typename T,
bool is_ad>
79 jac = _test[_i][_qp] * _penalty * _phi[_j][_qp];
83 jac = _test[_i][_qp] * _penalty * -_phi_neighbor[_j][_qp];
87 jac = _test_neighbor[_i][_qp] * -_penalty * _phi[_j][_qp];
91 jac = _test_neighbor[_i][_qp] * -_penalty * -_phi_neighbor[_j][_qp];
GenericReal< is_ad > computeQpResidual(Moose::DGResidualType type) override
Compute residuals at quadrature points.
Moose::GenericType< Real, is_ad > GenericReal
Real computeQpJacobian(Moose::DGJacobianType type) override
Compute jacobians at quadrature points.
Interface kernel for interfacing diffusion between two variables on adjacent blocks.
static InputParameters validParams()
typename std::conditional< is_ad, typename ADType< T >::type, T >::type GenericType
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
PenaltyInterfaceDiffusionTempl(const InputParameters ¶meters)
registerMooseObject("MooseApp", PenaltyInterfaceDiffusion)