28 _lambda(_var ? _var->adSlnLower() : _lambda_dummy),
29 _u_secondary(_secondary_var.adSln()),
30 _u_primary(_primary_var.adSlnNeighbor()),
31 _grad_u_secondary(_secondary_var.adGradSln()),
32 _grad_u_primary(_primary_var.adGradSlnNeighbor())
40 unsigned int test_space_size = 0;
54 mooseAssert(
_var,
"LM variable is null");
56 test_space_size =
_test.size();
61 for (
_i = 0;
_i < test_space_size;
_i++)
70 std::vector<ADReal> residuals;
71 std::size_t test_space_size = 0;
74 std::vector<JType> jacobian_types;
75 std::vector<dof_id_type> dof_indices;
76 Real scaling_factor = 1;
93 mooseAssert(
_var,
"The Lagrange Multiplier should be non-null if this is getting called");
99 test_space_size = dof_indices.size();
101 residuals.resize(test_space_size, 0);
103 for (
_i = 0;
_i < test_space_size;
_i++)
MooseVariableField< Real > & _secondary_var
Reference to the secondary variable.
ADMortarConstraint(const InputParameters ¶meters)
const VariableTestValue & _test_secondary
The shape functions corresponding to the secondary interior primal variable.
void computeResidualAndJacobian() override
Compute this object's contribution to the residual and Jacobian simultaneously.
virtual void haveADObjects(bool have_ad_objects)
Method for setting whether we have any ad objects.
void accumulateTaggedLocalResidual()
Local residual blocks will be appended by adding the current local kernel residual.
unsigned int number() const
Get variable number coming from libMesh.
const std::vector< dof_id_type > & dofIndicesLower() const final
Get dof indices for the current lower dimensional element (this is meaningful when performing mortar ...
const std::vector< Real > & _JxW_msm
The element Jacobian times weights.
virtual ADReal computeQpResidual(Moose::MortarType mortar_type)=0
compute the residual at the quadrature points
virtual void computeResidual() override
Method for computing the residual.
const libMesh::QBase *const & _qrule_msm
The quadrature rule on the mortar segment element.
const VariableTestValue & _test
The shape functions corresponding to the lagrange multiplier variable.
static InputParameters validParams()
virtual const std::vector< dof_id_type > & dofIndicesNeighbor() const =0
Get neighbor DOF indices for currently selected element.
SubProblem & _subproblem
Reference to this kernel's SubProblem.
void addResidualsAndJacobianWithoutConstraints(Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
Add the provided incoming residuals and derivatives for the Jacobian, corresponding to the provided d...
virtual const std::vector< dof_id_type > & dofIndices() const
Get local DoF indices.
unsigned int n_points() const
Assembly & _assembly
Reference to this Kernel's assembly object.
MooseVariable *const _var
Pointer to the lagrange multipler variable. nullptr if none.
void prepareVectorTagNeighbor(Assembly &assembly, unsigned int ivar)
Prepare data for computing element residual the according to active tags for DG and interface kernels...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
DenseVector< Number > _local_re
Holds local residual entries as they are accumulated by this Kernel.
virtual void computeJacobian() override
Method for computing the Jacobian.
static InputParameters validParams()
void prepareVectorTagLower(Assembly &assembly, unsigned int ivar)
Prepare data for computing the residual according to active tags for mortar constraints.
void prepareVectorTag(Assembly &assembly, unsigned int ivar)
Prepare data for computing element residual according to active tags.
const MooseArray< Real > & _coord
Member for handling change of coordinate systems (xyz, rz, spherical)
const VariableTestValue & _test_primary
The shape functions corresponding to the primary interior primal variable.
void scalingFactor(const std::vector< Real > &factor)
Set the scaling factor for this variable.
MooseVariableField< Real > & _primary_var
Reference to the primary variable.