27 _lambda(_var ? _var->slnLower() : _lambda_dummy),
28 _u_secondary(_secondary_var.sln()),
29 _u_primary(_primary_var.slnNeighbor()),
30 _grad_u_secondary(_secondary_var.gradSln()),
31 _grad_u_primary(_primary_var.gradSlnNeighbor()),
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::size_t test_space_size = 0;
73 std::array<JType, 3> jacobian_types;
95 for (
const auto & it : ce)
100 unsigned int ivar = ivariable.
number();
101 unsigned int jvar = jvariable.
number();
121 std::array<size_t, 3> shape_space_sizes{{jvariable.
dofIndices().size(),
124 std::array<const VariablePhiValue *, 3> phis;
125 std::array<const VariablePhiGradient *, 3> grad_phis;
126 std::array<const VectorVariablePhiValue *, 3> vector_phis;
127 std::array<const VectorVariablePhiGradient *, 3> vector_grad_phis;
131 vector_phis = {{&temp_var.
phiFace(), &temp_var.phiFaceNeighbor(), &temp_var.phiLower()}};
133 {&temp_var.gradPhiFace(), &temp_var.gradPhiFaceNeighbor(), &temp_var.gradPhiLower()}};
138 phis = {{&temp_var.
phiFace(), &temp_var.phiFaceNeighbor(), &temp_var.phiLower()}};
140 {&temp_var.gradPhiFace(), &temp_var.gradPhiFaceNeighbor(), &temp_var.gradPhiLower()}};
143 for (MooseIndex(3) type_index = 0; type_index < 3; ++type_index)
145 const auto jacobian_type = jacobian_types[type_index];
157 _phi = phis[type_index];
161 for (
_i = 0;
_i < test_space_size;
_i++)
162 for (
_j = 0;
_j < shape_space_sizes[type_index];
_j++)
MooseVariableField< Real > & _secondary_var
Reference to the secondary variable.
static InputParameters validParams()
const VectorVariablePhiValue * _vector_phi
The current shape functions for vector variables.
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > & couplingEntries()
const VariableTestValue & _test_secondary
The shape functions corresponding to the secondary interior primal variable.
void accumulateTaggedLocalResidual()
Local residual blocks will be appended by adding the current local kernel residual.
const VariablePhiValue * _phi
The current shape functions.
unsigned int number() const
Get variable number coming from libMesh.
virtual Real computeQpJacobian(Moose::ConstraintJacobianType jacobian_type, unsigned int jvar)=0
compute the jacobian at the quadrature points
const VariablePhiGradient * _grad_phi
The current shape function gradients.
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 VectorVariablePhiGradient * _vector_grad_phi
The current shape function gradients for vector variables.
const std::vector< Real > & _JxW_msm
The element Jacobian times weights.
This class provides an interface for common operations on field variables of both FE and FV types wit...
MortarConstraint(const InputParameters ¶meters)
DenseMatrix< Number > _local_ke
Holds local Jacobian entries as they are accumulated by this Kernel.
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 bool isVector() const =0
virtual const std::vector< dof_id_type > & dofIndicesNeighbor() const =0
Get neighbor DOF indices for currently selected element.
virtual const std::vector< dof_id_type > & dofIndices() const
Get local DoF indices.
unsigned int n_points() const
void accumulateTaggedLocalMatrix()
Local Jacobian blocks will be appended by adding the current local kernel Jacobian.
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...
void prepareMatrixTagLower(Assembly &assembly, unsigned int ivar, unsigned int jvar, Moose::ConstraintJacobianType type)
Prepare data for computing the jacobian according to the active tags for mortar.
DenseVector< Number > _local_re
Holds local residual entries as they are accumulated by this Kernel.
virtual void computeJacobian() override
Method for computing the Jacobian.
const FieldVariablePhiValue & phiFace() const override final
Return the variable's shape functions on an element face.
virtual const std::vector< dof_id_type > & dofIndicesLower() const =0
Get dof indices for the current lower dimensional element (this is meaningful when performing mortar ...
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.
virtual Real computeQpResidual(Moose::MortarType mortar_type)=0
compute the residual at the quadrature points
MooseVariableField< Real > & _primary_var
Reference to the primary variable.