https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
20namespace libMesh
21{
22class Node;
23class Elem;
24}
25
30{
31public:
32 PenetrationInfo(const Elem * elem,
33 const Elem * side,
34 unsigned int side_num,
35 RealVectorValue norm,
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;
75 RealVectorValue _normal;
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;
95 RealVectorValue _contact_force;
96 RealVectorValue _contact_force_old;
97
100
101 unsigned int _locked_this_step;
108};
109
110// Used for Restart
111template <>
112void dataStore(std::ostream & stream, PenetrationInfo *& pinfo, void * context);
113template <>
114void dataLoad(std::istream & stream, PenetrationInfo *& pinfo, void * context);
void dataLoad(std::istream &stream, PenetrationInfo *&pinfo, void *context)
void dataStore(std::ostream &stream, PenetrationInfo *&pinfo, void *context)
Data structure used to hold penetration information.
std::vector< const Node * > _off_edge_nodes
const Elem * _side
MECH_STATUS_ENUM _mech_status
RealVectorValue _contact_force_old
unsigned int _locked_this_step
std::vector< RealGradient > _d2xyzdxideta
MECH_STATUS_ENUM _mech_status_old
Point _closest_point_on_face_ref
RealVectorValue _contact_force
std::vector< RealGradient > _dxyzdeta
std::vector< RealGradient > _dxyzdxi
unsigned int _starting_side_num
std::vector< std::vector< Real > > _side_phi
const Elem * _elem
const Elem * _starting_elem
bool isCaptured() const
std::vector< std::vector< RealGradient > > _side_grad_phi
Point _incremental_slip_prev_iter
Point _starting_closest_point_ref
unsigned int _side_num
RealVectorValue _lagrange_multiplier_slip
RealVectorValue _normal
unsigned int _stick_locked_this_step
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...