17template <
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.");
32template <
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")
43template <
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;
70template <
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];
Moose::GenericType< Real, is_ad > GenericReal
registerMooseObject("MooseApp", PenaltyInterfaceDiffusion)
static InputParameters validParams()
Interface kernel for interfacing diffusion between two variables on adjacent blocks.
Real computeQpJacobian(Moose::DGJacobianType type) override
Compute jacobians at quadrature points.
static InputParameters validParams()
GenericReal< is_ad > computeQpResidual(Moose::DGResidualType type) override
Compute residuals at quadrature points.
PenaltyInterfaceDiffusionTempl(const InputParameters ¶meters)
typename std::conditional< is_ad, typename ADType< T >::type, T >::type GenericType