https://mooseframework.inl.gov
RANFSNormalMechanicalContact.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 // MOOSE includes
13 #include "NodeFaceConstraint.h"
14 #include "MooseEnum.h"
15 
16 #include "libmesh/coupling_matrix.h"
17 
18 #include <vector>
19 #include <unordered_map>
20 
21 class PenetrationInfo;
22 
23 namespace libMesh
24 {
25 template <typename>
26 class NumericVector;
27 }
28 
30 {
31 public:
33 
35 
36  bool shouldApply() override;
37  void residualSetup() override;
38  void timestepSetup() override;
39  void initialSetup() override;
40  bool overwriteSecondaryResidual() override;
41  void computeSecondaryValue(NumericVector<Number> & solution) override;
42 
43 protected:
44  virtual Real computeQpSecondaryValue() override;
45 
48 
50  const unsigned int _mesh_dimension;
52 
53  unsigned int _largest_component;
54  std::vector<unsigned int> _vars;
55  std::vector<MooseVariable *> _var_objects;
56  std::unordered_map<dof_id_type, Real> _node_to_contact_lm;
57  std::unordered_map<dof_id_type, Real> _node_to_tied_lm;
58  std::unordered_map<dof_id_type, std::vector<const Elem *>> _node_to_primary_elem_sequence;
62  std::unordered_map<dof_id_type, const Node *> _ping_pong_secondary_node_to_primary_node;
64  bool _tie_nodes;
65  unsigned int _primary_index;
67  const Node * _nearest_node;
68  std::vector<std::unordered_map<dof_id_type, Number>> _dof_number_to_value;
69  CouplingMatrix _disp_coupling;
71 };
std::vector< MooseVariable * > _var_objects
NumericVector< Number > & _residual_copy
virtual Real computeQpResidual(Moose::ConstraintType type) override
ConstraintType
std::unordered_map< dof_id_type, std::vector< const Elem * > > _node_to_primary_elem_sequence
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
std::unordered_map< dof_id_type, Real > _node_to_contact_lm
void computeSecondaryValue(NumericVector< Number > &solution) override
std::vector< std::unordered_map< dof_id_type, Number > > _dof_number_to_value
virtual Real computeQpJacobian(Moose::ConstraintJacobianType type) override
const std::string & type() const
RANFSNormalMechanicalContact(const InputParameters &parameters)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::unordered_map< dof_id_type, const Node * > _ping_pong_secondary_node_to_primary_node
ConstraintJacobianType
const InputParameters & parameters() const
std::unordered_map< dof_id_type, Real > _node_to_tied_lm
virtual Real computeQpSecondaryValue() override