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;
77 case MType::Secondary:
80 {JType::SecondarySecondary, JType::SecondaryPrimary, JType::SecondaryLower}};
85 jacobian_types = {{JType::PrimarySecondary, JType::PrimaryPrimary, JType::PrimaryLower}};
90 jacobian_types = {{JType::LowerSecondary, JType::LowerPrimary, JType::LowerLower}};
95 for (
const auto & it : ce)
100 unsigned int ivar = ivariable.
number();
101 unsigned int jvar = jvariable.
number();
105 case MType::Secondary:
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++)
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > & couplingEntries()
virtual const std::vector< dof_id_type > & dofIndices() const
Get local DoF indices.
unsigned int number() const
Get variable number coming from libMesh.
Class for stuff related to variables.
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 FieldVariablePhiValue & phiFace() const override final
Return the variable's shape functions on an element face.
This class provides an interface for common operations on field variables of both FE and FV types wit...
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 ...
virtual bool isVector() const =0
virtual const std::vector< dof_id_type > & dofIndicesNeighbor() const =0
Get neighbor DOF indices for currently selected element.
MooseVariableField< Real > & _primary_var
Reference to the primary variable.
MooseVariable *const _var
Pointer to the lagrange multipler variable. nullptr if none.
const VariableTestValue & _test_secondary
The shape functions corresponding to the secondary interior primal variable.
const MooseArray< Real > & _coord
Member for handling change of coordinate systems (xyz, rz, spherical)
static InputParameters validParams()
MooseVariableField< Real > & _secondary_var
Reference to the secondary variable.
const VariableTestValue & _test
The shape functions corresponding to the lagrange multiplier variable.
const VariableTestValue & _test_primary
The shape functions corresponding to the primary interior primal variable.
const VariablePhiGradient * _grad_phi
The current shape function gradients.
virtual Real computeQpResidual(Moose::MortarType mortar_type)=0
compute the residual at the quadrature points
const VariablePhiValue * _phi
The current shape functions.
const VectorVariablePhiGradient * _vector_grad_phi
The current shape function gradients for vector variables.
static InputParameters validParams()
const VectorVariablePhiValue * _vector_phi
The current shape functions for vector variables.
virtual Real computeQpJacobian(Moose::ConstraintJacobianType jacobian_type, unsigned int jvar)=0
compute the jacobian at the quadrature points
virtual void computeJacobian() override
Method for computing the Jacobian.
virtual void computeResidual() override
Method for computing the residual.
MortarConstraint(const InputParameters ¶meters)
const libMesh::QBase *const & _qrule_msm
The quadrature rule on the mortar segment element.
const std::vector< Real > & _JxW_msm
The element Jacobian times weights.
Assembly & _assembly
Reference to this Kernel's assembly object.
DenseMatrix< Number > _local_ke
Holds local Jacobian entries as they are accumulated by this Kernel.
void accumulateTaggedLocalMatrix()
Local Jacobian blocks will be appended by adding the current local kernel Jacobian.
void prepareVectorTagLower(Assembly &assembly, unsigned int ivar)
Prepare data for computing the residual according to active tags for mortar constraints.
void accumulateTaggedLocalResidual()
Local residual blocks will be appended by adding the current local kernel residual.
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.
void prepareVectorTagNeighbor(Assembly &assembly, unsigned int ivar)
Prepare data for computing element residual the according to active tags for DG and interface kernels...
void prepareVectorTag(Assembly &assembly, unsigned int ivar)
Prepare data for computing element residual according to active tags.
DenseVector< Number > _local_re
Holds local residual entries as they are accumulated by this Kernel.
unsigned int n_points() const