https://mooseframework.inl.gov
PenetrationInfo.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 "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 Elem * elem,
33  const Elem * side,
34  unsigned int side_num,
36  Real norm_distance,
37  Real tangential_distance,
38  const Point & closest_point,
39  const Point & closest_point_ref,
40  const Point & closest_point_on_face_ref,
41  std::vector<const Node *> off_edge_nodes,
42  const std::vector<std::vector<Real>> & side_phi,
43  const std::vector<std::vector<RealGradient>> & side_grad_phi,
44  const std::vector<RealGradient> & dxyzdxi,
45  const std::vector<RealGradient> & dxyzdeta,
46  const std::vector<RealGradient> & d2xyzdxideta);
47 
48  // Not currently supported due to double-delete memory corruption bug
49  // PenetrationInfo(const PenetrationInfo & p);
50 
52 
54 
56  {
57  MS_NO_CONTACT = 0, // out of contact
58  MS_STICKING, // sticking (glued or frictional)
59  MS_SLIPPING, // slipping with zero frictional resistance
60  MS_SLIPPING_FRICTION, // slipping with nonzero frictional resistance
61  MS_CONTACT // In contact, but unknown yet whether slipping or sticking.
62  };
63 
64  bool isCaptured() const { return _mech_status != MS_NO_CONTACT; }
65  void capture()
66  {
69  }
71 
72  const Elem * _elem;
73  const Elem * _side;
74  unsigned int _side_num;
76  Real _distance; // Positive distance means the node has penetrated
81  std::vector<const Node *> _off_edge_nodes;
82  std::vector<std::vector<Real>> _side_phi;
83  std::vector<std::vector<RealGradient>> _side_grad_phi;
84  std::vector<RealGradient> _dxyzdxi;
85  std::vector<RealGradient> _dxyzdeta;
86  std::vector<RealGradient> _d2xyzdxideta;
87  const Elem * _starting_elem;
88  unsigned int _starting_side_num;
97 
100 
101  unsigned int _locked_this_step;
108 };
109 
110 // Used for Restart
111 template <>
112 void dataStore(std::ostream & stream, PenetrationInfo *& pinfo, void * context);
113 template <>
114 void dataLoad(std::istream & stream, PenetrationInfo *& pinfo, void * context);
std::vector< RealGradient > _d2xyzdxideta
RealVectorValue _normal
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
auto norm(const T &a) -> decltype(std::abs(a))
RealVectorValue _contact_force
MECH_STATUS_ENUM _mech_status
std::vector< const Node * > _off_edge_nodes
Point _starting_closest_point_ref
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< RealGradient > _dxyzdeta
MECH_STATUS_ENUM _mech_status_old
RealVectorValue _lagrange_multiplier_slip
void dataStore(std::ostream &stream, PenetrationInfo *&pinfo, void *context)