17#include "libmesh/numeric_vector.h"
18#include "libmesh/sparse_matrix.h"
26 params.
set<
bool>(
"use_displaced_mesh") =
true;
30 "component", component,
"The force component constraint that this object is supplying");
33 "The displacements appropriate for the simulation geometry and coordinate system");
39 _component(getParam<
MooseEnum>(
"component")),
40 _mesh_dimension(_mesh.dimension()),
41 _residual_copy(_sys.residualGhosted())
51 mooseError(
"The number of displacement variables does not match the mesh dimension!");
82 std::vector<dof_id_type> primary_cols;
83 std::vector<Number> primary_values;
86 mooseAssert(primary_cols.size() == primary_values.size(),
87 "The size of the dof container and value container are different");
91 for (MooseIndex(primary_cols) i = 0; i < primary_cols.size(); ++i)
97 "The node " <<
_current_node->id() <<
" should map to a lagrange multiplier");
102 "nearest node not a node on the current primary element");
115 case Moose::ConstraintType::Secondary:
118 case Moose::ConstraintType::Primary:
137 case Moose::ConstraintJacobianType::SecondarySecondary:
140 case Moose::ConstraintJacobianType::SecondaryPrimary:
146 case Moose::ConstraintJacobianType::PrimarySecondary:
151 "The connected dof index is not found in the _dof_number_to_value container. "
152 "This must mean that insufficient sparsity was allocated");
172 "We overrode commputeSecondaryValue so computeQpSecondaryValue should never get called");
registerMooseObject("ContactTestApp", RANFSTieNode)
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
unsigned int coupledComponents(const std::string &var_name) const
virtual unsigned int coupled(const std::string &var_name, unsigned int comp=0) const
const std::string & type() const
void mooseError(Args &&... args) const
void scalingFactor(const std::vector< Real > &factor)
const Node * nearestNode(dof_id_type node_id)
PenetrationLocator & _penetration_locator
const Node *const & _current_node
const Elem *const & _current_primary
std::vector< dof_id_type > _connected_dof_indices
const SparseMatrix< Number > * _jacobian
static InputParameters validParams()
VariablePhiValue _phi_secondary
NearestNodeLocator & _nearest_node
const MooseEnum _component
std::vector< MooseVariable * > _var_objects
NumericVector< Number > & _residual_copy
const Node * _nearest_node
void computeSecondaryValue(NumericVector< Number > &solution) override
dof_id_type _primary_index
std::vector< unsigned int > _vars
std::unordered_map< dof_id_type, Real > _node_to_lm
virtual Real computeQpSecondaryValue() override
bool shouldApply() override
void residualSetup() override
static InputParameters validParams()
RANFSTieNode(const InputParameters ¶meters)
Real _lagrange_multiplier
std::unordered_map< dof_id_type, Number > _dof_number_to_value
bool overwriteSecondaryResidual() override
const unsigned int _mesh_dimension
virtual Real computeQpResidual(Moose::ConstraintType type) override
virtual Real computeQpJacobian(Moose::ConstraintJacobianType type) override
const bool & currentlyComputingJacobian() const
virtual void get_row(numeric_index_type i, std::vector< numeric_index_type > &indices, std::vector< T > &values) const=0
const unsigned int invalid_uint