25 _u_primary(_primary_var.slnNeighbor()),
26 _u_secondary(_var.dofValues()),
27 _grad_phi_primary(_assembly.gradPhiNeighbor(_primary_var)),
28 _grad_test_primary(_var.gradPhiNeighbor()),
29 _grad_u_primary(_primary_var.gradSlnNeighbor())
121 std::set<dof_id_type> unique_dof_indices;
124 mooseAssert(node_to_elem_pair !=
_node_to_elem_map.end(),
"Missing entry in node to elem map");
125 const std::vector<dof_id_type> & elems = node_to_elem_pair->second;
128 for (
const auto & cur_elem : elems)
130 std::vector<dof_id_type> dof_indices;
134 for (
const auto & dof : dof_indices)
135 unique_dof_indices.insert(dof);
138 for (
const auto & dof : unique_dof_indices)
163 mooseError(
"Derived classes must implement computeQpJacobian.");
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
virtual Elem * elemPtr(const dof_id_type i)
virtual void getDofIndices(const Elem *, std::vector< dof_id_type > &) const
unsigned int number() const
Get variable number coming from libMesh.
This class provides an interface for common operations on field variables of both FE and FV types wit...
virtual const dof_id_type & nodalDofIndex() const =0
A NodeElemConstraintBase is used when you need to create constraints between a secondary node and a p...
const Node *const & _current_node
current node being processed
DenseMatrix< Number > _Kee
stiffness matrix holding secondary-secondary jacobian
const VariablePhiValue & _phi_primary
Side shape function.
VariableTestValue _test_secondary
Shape function on the secondary side. This will always only have one entry and that entry will always...
VariablePhiValue _phi_secondary
Shape function on the secondary side.
DenseMatrix< Number > _Kne
stiffness matrix holding primary-secondary jacobian
static InputParameters validParams()
const VariableTestValue & _test_primary
Side test function.
MooseVariable & _var
secondary node variable
const std::unordered_map< dof_id_type, std::vector< dof_id_type > > & _node_to_elem_map
MooseMesh map of current nodes to the connected elements.
MooseVariable & _primary_var
Primary side variable.
std::vector< dof_id_type > _connected_dof_indices
dofs connected to the secondary node
virtual void computeOffDiagJacobian(unsigned int jvar) override
Computes d-residual / d-jvar...
virtual Real computeQpJacobian(Moose::ConstraintJacobianType type)
This is the virtual method that derived classes should override for computing the Jacobian.
void getConnectedDofIndices(unsigned int var_num)
Gets the indices for all dofs connected to the constraint.
static InputParameters validParams()
virtual void computeResidual() override
Computes the residual Nodal residual.
NodeElemConstraint(const InputParameters ¶meters)
virtual Real computeQpOffDiagJacobian(Moose::ConstraintJacobianType, unsigned int)
This is the virtual method that derived classes should override for computing the off-diag Jacobian.
virtual void computeJacobian() override
Computes the jacobian for the current element.
virtual Real computeQpResidual(Moose::ConstraintType type)=0
This is the virtual method that derived classes should override for computing the residual.
MooseMesh & _mesh
Reference to this Kernel's mesh object.
Assembly & _assembly
Reference to this Kernel's assembly object.
SystemBase & _sys
Reference to the EquationSystem object.
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
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 accumulateTaggedLocalResidual()
Local residual blocks will be appended by adding the current local kernel residual.
void prepareMatrixTagNeighbor(Assembly &assembly, unsigned int ivar, unsigned int jvar, Moose::DGJacobianType type)
Prepare data for computing element jacobian according to the active tags for DG and interface kernels...
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.
void resize(const unsigned int new_m, const unsigned int new_n)