MPM-Geomechanics
Material Point Method for simulating geo-materials under large deformation conditions
Loading...
Searching...
No Matches
Contact.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_H_
5
#define CONTACT_H_
6
#include <string>
7
using namespace
std;
8
11
class
Contact
{
12
13
public
:
14
21
22
Contact
(
int
id
,
double
friction,
int
master_id,
int
slave_id,
string
normal_type);
23
26
virtual
~Contact
();
27
28
// getters
29
int
getId
()
const
{
return
id
; }
30
double
getFrictionCoefficient
()
const
{
return
frictionCoefficient
; }
31
int
getMasterId
()
const
{
return
masterId
; }
32
int
getSlaveId
()
const
{
return
slaveId
; }
33
const
string
&
getNormalType
()
const
{
return
normalType
; }
34
35
// setters
36
void
setId
(
int
new_id) {
id
= new_id; }
37
void
setFrictionCoefficient
(
double
mu) {
frictionCoefficient
= mu; }
38
void
setMasterId
(
int
new_master_id) {
masterId
= new_master_id; }
39
void
setSlaveId
(
int
new_slave_id) {
slaveId
= new_slave_id; }
40
void
setNormalType
(
const
string
& type) {
normalType
= type; }
41
42
private
:
43
44
int
id
= 0;
45
double
frictionCoefficient
= 0.0;
46
int
masterId
= 0;
//<! Master body id
47
int
slaveId
= 1;
//<! Slave body id
48
string
normalType
=
"master"
;
49
};
50
51
#endif
/* CONTACT_H_ */
Contact
Represents a frictional contact between bodies.
Definition
Contact.h:11
Contact::~Contact
virtual ~Contact()
Default destructor.
Contact::getSlaveId
int getSlaveId() const
Definition
Contact.h:32
Contact::masterId
int masterId
Definition
Contact.h:46
Contact::setFrictionCoefficient
void setFrictionCoefficient(double mu)
Definition
Contact.h:37
Contact::setSlaveId
void setSlaveId(int new_slave_id)
Definition
Contact.h:39
Contact::normalType
string normalType
Normal type: "master", "slave" or "collinear".
Definition
Contact.h:48
Contact::setId
void setId(int new_id)
Definition
Contact.h:36
Contact::frictionCoefficient
double frictionCoefficient
Friction coefficient .
Definition
Contact.h:45
Contact::getId
int getId() const
Definition
Contact.h:29
Contact::id
int id
Definition
Contact.h:44
Contact::getNormalType
const string & getNormalType() const
Definition
Contact.h:33
Contact::setNormalType
void setNormalType(const string &type)
Definition
Contact.h:40
Contact::Contact
Contact(int id, double friction, int master_id, int slave_id, string normal_type)
Constructor.
Contact::setMasterId
void setMasterId(int new_master_id)
Definition
Contact.h:38
Contact::getMasterId
int getMasterId() const
Definition
Contact.h:31
Contact::slaveId
int slaveId
Definition
Contact.h:47
Contact::getFrictionCoefficient
double getFrictionCoefficient() const
Definition
Contact.h:30
inc
Contact.h
Generated by
1.9.8