www.mooseframework.org
PenetrationInfo.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #ifndef PENETRATIONINFO_H
16 #define PENETRATIONINFO_H
17 
18 // MOOSE includes
19 #include "Moose.h"
20 #include "DataIO.h"
21 
22 #include "libmesh/vector_value.h"
23 #include "libmesh/point.h"
24 
25 // libMesh forward declarations
26 namespace libMesh
27 {
28 class Node;
29 class Elem;
30 }
31 
36 {
37 public:
38  PenetrationInfo(const Node * node,
39  const Elem * elem,
40  const Elem * side,
41  unsigned int side_num,
42  RealVectorValue norm,
43  Real norm_distance,
44  Real tangential_distance,
45  const Point & closest_point,
46  const Point & closest_point_ref,
47  const Point & closest_point_on_face_ref,
48  std::vector<const Node *> off_edge_nodes,
49  const std::vector<std::vector<Real>> & side_phi,
50  const std::vector<std::vector<RealGradient>> & side_grad_phi,
51  const std::vector<RealGradient> & dxyzdxi,
52  const std::vector<RealGradient> & dxyzdeta,
53  const std::vector<RealGradient> & d2xyzdxideta);
54 
55  // Not currently supported due to double-delete memory corruption bug
56  // PenetrationInfo(const PenetrationInfo & p);
57 
59 
60  ~PenetrationInfo();
61 
63  {
64  MS_NO_CONTACT = 0, // out of contact
65  MS_STICKING, // sticking (glued or frictional)
66  MS_SLIPPING, // slipping with zero frictional resistance
67  MS_SLIPPING_FRICTION, // slipping with nonzero frictional resistance
68  MS_CONTACT // In contact, but unknown yet whether slipping or sticking.
69  };
70 
71  bool isCaptured() const { return _mech_status != MS_NO_CONTACT; }
72  void capture()
73  {
74  if (_mech_status == MS_NO_CONTACT)
75  _mech_status = MS_CONTACT;
76  }
77  void release() { _mech_status = MS_NO_CONTACT; }
78 
79  const Node * _node;
80  const Elem * _elem;
81  const Elem * _side;
82  unsigned int _side_num;
84  Real _distance; // Positive distance means the node has penetrated
89  std::vector<const Node *> _off_edge_nodes;
90  std::vector<std::vector<Real>> _side_phi;
91  std::vector<std::vector<RealGradient>> _side_grad_phi;
92  std::vector<RealGradient> _dxyzdxi;
93  std::vector<RealGradient> _dxyzdeta;
94  std::vector<RealGradient> _d2xyzdxideta;
95  const Elem * _starting_elem;
96  unsigned int _starting_side_num;
105 
108 
109  unsigned int _locked_this_step;
115  Real _slip_tol;
116 };
117 
118 // Used for Restart
119 template <>
120 void dataStore(std::ostream & stream, PenetrationInfo *& pinfo, void * context);
121 template <>
122 void dataLoad(std::istream & stream, PenetrationInfo *& pinfo, void * context);
123 
124 #endif // PENETRATIONINFO_H
std::vector< RealGradient > _d2xyzdxideta
VectorValue< Real > RealVectorValue
Definition: Assembly.h:40
RealVectorValue _normal
Data structure used to hold penetration information.
const Elem * _starting_elem
Point _closest_point_on_face_ref
bool isCaptured() const
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
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