MPM-Geomechanics
Material Point Method for simulating geo-materials under large deformation conditions
Loading...
Searching...
No Matches
ContactManager.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: MIT
2
// Copyright (c) 2021-2025 MPM-Geomechanics Development Team
3
4
#ifndef CONTACT_MANAGER_H_
5
#define CONTACT_MANAGER_H_
6
7
#include "Eigen/Core"
8
using
Eigen::Vector3d;
9
10
#include "
Mesh/Node.h
"
11
#include "
Mesh/Mesh.h
"
12
#include "
Body/Body.h
"
13
#include "
Contact.h
"
14
15
#include <unordered_map>
16
#include <vector>
17
using
std::vector;
18
21
class
ContactManager
{
22
public
:
26
ContactManager
(vector<Contact*> contact_List,
double
real_distance_correction_coefficient);
27
30
void
computeContactForces
(
Mesh
* mesh,
double
time_step);
31
35
void
nodalUnitNormal
(
Mesh
* mesh, vector<Body*>* bodies);
36
40
void
contactNodalDetection
(
Mesh
* mesh, vector<Body*>* bodies);
41
46
void
realDistanceCorrection
(
Mesh
* mesh, vector<Body*>* bodies);
47
51
void
nodalMomentumContactUpdate
(
Mesh
* mesh,
double
time_step);
52
55
inline
bool
getRealDistanceCorrectionFlag
()
const
{
return
this->
realDistanceCorrectionActive
; }
56
59
inline
bool
getContactDetectionFlag
()
const
{
return
this->
contactDetection
; };
60
65
void
applyVelocityContactCorrection
(
Mesh
* mesh, vector<Body*>* bodies,
double
dt);
66
67
private
:
68
69
bool
contactDetection
=
false
;
70
vector<Contact*>
contactList
;
71
double
realDistanceCorrectionCoefficient
= 0.0;
72
bool
realDistanceCorrectionActive
=
false
;
73
};
74
75
#endif
/* CONTACT_MANAGER_H_ */
Body.h
Contact.h
Mesh.h
Node.h
ContactManager
Manages Slave-Master contact method data and operations using two velocity fields.
Definition
ContactManager.h:21
ContactManager::nodalUnitNormal
void nodalUnitNormal(Mesh *mesh, vector< Body * > *bodies)
Calculate the nodal normal mass vector .
ContactManager::getRealDistanceCorrectionFlag
bool getRealDistanceCorrectionFlag() const
Return if the real distance correction is active.
Definition
ContactManager.h:55
ContactManager::realDistanceCorrectionCoefficient
double realDistanceCorrectionCoefficient
Real distance correction coefficient .
Definition
ContactManager.h:71
ContactManager::computeContactForces
void computeContactForces(Mesh *mesh, double time_step)
Compute nodal contact for sticking and for non sticking contact.
ContactManager::contactDetection
bool contactDetection
variable for contact detection
Definition
ContactManager.h:69
ContactManager::applyVelocityContactCorrection
void applyVelocityContactCorrection(Mesh *mesh, vector< Body * > *bodies, double dt)
Apply multi field velocity contact correction.
ContactManager::getContactDetectionFlag
bool getContactDetectionFlag() const
Return if contact detection has occurred.
Definition
ContactManager.h:59
ContactManager::contactList
vector< Contact * > contactList
Definition
ContactManager.h:70
ContactManager::realDistanceCorrection
void realDistanceCorrection(Mesh *mesh, vector< Body * > *bodies)
Applies the "real distance correction" method for contact detection. .
ContactManager::nodalMomentumContactUpdate
void nodalMomentumContactUpdate(Mesh *mesh, double time_step)
Update the nodal momentum after contact forces calculation .
ContactManager::realDistanceCorrectionActive
bool realDistanceCorrectionActive
Real distance correction active.
Definition
ContactManager.h:72
ContactManager::ContactManager
ContactManager(vector< Contact * > contact_List, double real_distance_correction_coefficient)
Constructor.
ContactManager::contactNodalDetection
void contactNodalDetection(Mesh *mesh, vector< Body * > *bodies)
Check if nodes are in contact.
Mesh
Class representing a rectangular grid mesh.
Definition
Mesh.h:29
inc
ContactManager.h
Generated by
1.9.8