MechanicalFemPhysics
The GeMA Mechanical FEM Physics Plugin
Loading...
Searching...
No Matches
inc
gmpMechanicalContact.h
Go to the documentation of this file.
1
/************************************************************************
2
**
3
** Copyright (C) 2014 by Carlos Augusto Teixera Mendes
4
** All rights reserved.
5
**
6
** This file is part of the "GeMA" software. It's use should respect
7
** the terms in the license agreement that can be found together
8
** with this source code.
9
** It is provided AS IS, with NO WARRANTY OF ANY KIND,
10
** INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR
11
** A PARTICULAR PURPOSE.
12
**
13
************************************************************************/
14
24
#ifndef _GEMA_PLUGIN_MECHANICAL_CONTACT_H_
25
#define _GEMA_PLUGIN_MECHANICAL_CONTACT_H_
26
27
#include "
gmpMechanicalConfig.h
"
28
#include <
gmContactBoundaryConditionAccessor.h
>
29
#include <
gmGaussAccessor.h
>
30
31
class
GMP_MECHANICAL_PHYSICS_API_EXPORT
GmpMechanicalContact
32
{
33
public
:
34
35
// Fills the node coordinates at the element border
36
static
void
fillBorderNodeCoordinates(
const
GmElement
* e,
GmValueAccessor
* nodeAc,
GmMatrix
& X,
int
border,
int
d,
bool
transposed =
false
);
37
//
38
39
// Translate edges in nodes coordinates
40
static
void
edgeToNodes(
const
GmContactBoundaryCondition
* cbc,
int
bcIndex,
int
nbc,
int
d,
GmValueAccessor
* nodeAc,
QVector<GmMatrix>
& surfaces,
41
QVector<GmVector>
& nodesSurf);
42
43
// Fills the possible nodes in contact pair
44
static
void
nodeToSurfaceSearch(
const
QVector<GmMatrix>
& surfMaster,
const
QVector<GmMatrix>
& surfSlave,
const
QVector<GmVector>
& nodesSurf1,
const
QVector<GmVector>
& nodesSurf2,
QVector<int>
& nodesSlave,
QVector<GmMatrix>
& nodesMaster);
45
//
46
47
// Fills actualized displacements vector for use in global coordinates actualized in each step
48
static
void
coordinatesGlobal(
GmValueAccessor
* nodeAcc,
GmValueAccessor
*uAcc,
QVector<double>
& slaveCoordinates,
QVector<double>
& masterCoordinates,
const
QVector<int>
& nodesSlave,
49
const
QVector<GmMatrix>
& nodesMaster);
50
//
51
52
// Fills the impenetration vector for surfaces in contact
53
static
void
calVectors(
const
QVector<int>
& nodesSlave,
const
QVector<GmMatrix>
& nodesMaster,
GmValueAccessor
* nodeAcc,
GmValueAccessor
*uAcc,
GmVector
& lengthBorder,
54
GmVector
& xi_c,
GmVector
& impVec,
GmVector
& slipVec,
bool
& hasContact);
55
//
56
57
// Fills the global force vector with contact contribution
58
static
void
contactForce(
GmValueAccessor
* nodeAcc,
GmValueAccessor
*uAcc,
const
QVector<int>
& nodesSlave,
const
QVector<GmMatrix>
& nodesMaster,
const
GmVector
& lengthBorder,
const
GmVector
& xi_c,
const
GmVector
& impVec,
59
const
GmVector
& slipVec,
double
Kn,
double
Ks,
double
muAc,
QVector<GmMatrix>
& Fc);
60
//
61
62
// Fills the global tangent matrix with contact contribution
63
static
void
contactMatrix(
GmValueAccessor
* nodeAcc,
GmValueAccessor
*uAcc,
const
QVector<int>
& nodesSlave,
const
QVector<GmMatrix>
& nodesMaster,
const
GmVector
& lengthBorder,
const
GmVector
& xi_c,
const
GmVector
& impVec,
64
const
GmVector
& slipVec,
double
Kn,
double
Ks,
double
muAc,
QVector<GmMatrix>
& Kc);
65
//
66
67
// Fills dofMap nodes to fill global tangent matrix
68
static
void
contactNodes(
GmValueAccessor
* nodeAcc,
GmValueAccessor
*uAcc,
const
QVector<int>
& nodesSlave,
const
QVector<GmMatrix>
& nodesMaster,
const
GmVector
& impVec,
QVector<int>
& nodesInContact,
QVector<GmVector>
& dofMatrix);
69
//
70
71
// Write contact matrix to fill global tangent matrix
72
static
void
translateMatrix(
const
GmVector
& impVec,
const
QVector<int>
& nodesSlave,
const
QVector<GmMatrix>
& nodesMaster,
const
QVector<int>
& nodesInContact,
const
QVector<GmMatrix>
& Kc,
GmMatrix
& Kcc,
const
QVector<GmVector>
& dofMatrix);
73
//
74
75
// Write contact forces to fill global vector internal forces
76
static
void
translateContactForce(
const
GmVector
& impVec,
const
QVector<int>
& nodesSlave,
const
QVector<GmMatrix>
& nodesMaster,
const
QVector<int>
& nodesInContact,
const
QVector<GmMatrix>
& Fc,
GmMatrix
& Fcc,
const
QVector<GmVector>
& dofMatrix);
77
//
78
};
79
#endif
GmContactBoundaryCondition
GmElement
GmValueAccessor
GmpMechanicalContact
Definition
gmpMechanicalContact.h:32
gmContactBoundaryConditionAccessor.h
gmGaussAccessor.h
GmMatrix
arma::mat GmMatrix
GmVector
arma::vec GmVector
gmpMechanicalConfig.h
Declaration of useful configuration definitions for the plugin library.
QVector
Generated on Mon Aug 3 2026 09:56:24 for MechanicalFemPhysics by
1.12.0