21 "PenaltyEqualValueConstraint enforces solution continuity between secondary and "
22 "primary sides of a mortar interface using a penalty approach (no Lagrange multipliers "
27 "Penalty value used to impose a generalized force capturing the mortar constraint equation");
35 _penalty_value(this->template getParam<Real>(
"penalty_value"))
48 -(_u_primary[_qp] - _u_secondary[_qp]) * _penalty_value * _test_secondary[_i][_qp];
56 (_u_primary[_qp] - _u_secondary[_qp]) * _penalty_value * _test_primary[_i][_qp];
71 mooseError(
"ADPenaltyEqualValueConstraint does not implement manual Jacobian calculation.");
81 switch (jacobian_type)
83 case JType::SecondarySecondary:
84 if (jvar == _secondary_var.number())
85 return (*_phi)[_j][_qp] * _penalty_value * _test_secondary[_i][_qp];
88 case JType::SecondaryPrimary:
89 if (jvar == _primary_var.number())
90 return -(*_phi)[_j][_qp] * _penalty_value * _test_secondary[_i][_qp];
93 case JType::PrimarySecondary:
94 if (jvar == _secondary_var.number())
95 return -(*_phi)[_j][_qp] * _penalty_value * _test_primary[_i][_qp];
98 case JType::PrimaryPrimary:
99 if (jvar == _primary_var.number())
100 return (*_phi)[_j][_qp] * _penalty_value * _test_primary[_i][_qp];
DualNumber< Real, DNDerivativeType, true > ADReal
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Moose::GenericType< Real, is_ad > GenericReal
registerMooseObject("MooseApp", PenaltyEqualValueConstraint)
typename std::conditional< is_ad, ADMortarConstraint, MortarConstraint >::type MortarConstraintTempl
Constrain the value of a variable to be the same on both sides of an interface using a generalized fo...
GenericReal< is_ad > computeQpResidual(Moose::MortarType mortar_type) final
PenaltyEqualValueConstraintTempl(const InputParameters ¶meters)
static InputParameters validParams()
GenericReal< is_ad > computeQpJacobian(Moose::ConstraintJacobianType jacobian_type, unsigned int jvar)