www.mooseframework.org
PenetrationInfo.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 "Moose.h"
14 #include "DataIO.h"
15 
16 #include "libmesh/vector_value.h"
17 #include "libmesh/point.h"
18 
19 // libMesh forward declarations
20 namespace libMesh
21 {
22 class Node;
23 class Elem;
24 }
25 
30 {
31 public:
32  PenetrationInfo(const Node * node,
33  const Elem * elem,
34  const Elem * side,
35  unsigned int side_num,
36  RealVectorValue norm,
37  Real norm_distance,
38  Real tangential_distance,
39  const Point & closest_point,
40  const Point & closest_point_ref,
41  const Point & closest_point_on_face_ref,
42  std::vector<const Node *> off_edge_nodes,
43  const std::vector<std::vector<Real>> & side_phi,
44  const std::vector<std::vector<RealGradient>> & side_grad_phi,
45  const std::vector<RealGradient> & dxyzdxi,
46  const std::vector<RealGradient> & dxyzdeta,
47  const std::vector<RealGradient> & d2xyzdxideta);
48 
49  // Not currently supported due to double-delete memory corruption bug
50  // PenetrationInfo(const PenetrationInfo & p);
51 
53 
55 
57  {
58  MS_NO_CONTACT = 0, // out of contact
59  MS_STICKING, // sticking (glued or frictional)
60  MS_SLIPPING, // slipping with zero frictional resistance
61  MS_SLIPPING_FRICTION, // slipping with nonzero frictional resistance
62  MS_CONTACT // In contact, but unknown yet whether slipping or sticking.
63  };
64 
65  bool isCaptured() const { return _mech_status != MS_NO_CONTACT; }
66  void capture()
67  {
70  }
72 
73  const Node * _node;
74  const Elem * _elem;
75  const Elem * _side;
76  unsigned int _side_num;
78  Real _distance; // Positive distance means the node has penetrated
83  std::vector<const Node *> _off_edge_nodes;
84  std::vector<std::vector<Real>> _side_phi;
85  std::vector<std::vector<RealGradient>> _side_grad_phi;
86  std::vector<RealGradient> _dxyzdxi;
87  std::vector<RealGradient> _dxyzdeta;
88  std::vector<RealGradient> _d2xyzdxideta;
89  const Elem * _starting_elem;
90  unsigned int _starting_side_num;
99 
102 
103  unsigned int _locked_this_step;
109  Real _slip_tol;
110 };
111 
112 // Used for Restart
113 template <>
114 void dataStore(std::ostream & stream, PenetrationInfo *& pinfo, void * context);
115 template <>
116 void dataLoad(std::istream & stream, PenetrationInfo *& pinfo, void * context);
117 
std::vector< RealGradient > _d2xyzdxideta
RealVectorValue _normal
VectorValue< Real > RealVectorValue
Definition: Assembly.h:31
Data structure used to hold penetration information.
const Elem * _starting_elem
Point _closest_point_on_face_ref
void dataLoad(std::istream &stream, PenetrationInfo *&pinfo, void *context)
unsigned int _stick_locked_this_step
std::vector< std::vector< RealGradient > > _side_grad_phi
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
std::vector< std::vector< Real > > _side_phi
RealVectorValue _contact_force_old
Point _incremental_slip_prev_iter
unsigned int _locked_this_step
const Elem * _elem
unsigned int _starting_side_num
bool isCaptured() const
unsigned int _side_num
std::vector< RealGradient > _dxyzdxi
const Elem * _side
RealVectorValue _contact_force
MECH_STATUS_ENUM _mech_status
std::vector< const Node * > _off_edge_nodes
Point _starting_closest_point_ref
std::vector< RealGradient > _dxyzdeta
MECH_STATUS_ENUM _mech_status_old
RealVectorValue _lagrange_multiplier_slip
void dataStore(std::ostream &stream, PenetrationInfo *&pinfo, void *context)
const Node * _node