MechanicalFemPhysics
The GeMA Mechanical FEM Physics Plugin
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"
29 #include <gmGaussAccessor.h>
30 
31 class GMP_MECHANICAL_PHYSICS_API_EXPORT GmpMechanicalContact
32 {
33 public:
34  //constructors
36 
37  //destructor
38  virtual ~GmpMechanicalContact(void);
39 
40  // Fills the node coordinates at the element border
41  virtual void fillBorderNodeCoordinates(const GmElement* e, GmValueAccessor* nodeAc, GmMatrix& X, int border, int d, bool transposed = false) const;
42  //
43 
44  // Translate edges in nodes coordinates
45  virtual void edgeToNodes(const GmContactBoundaryCondition* cbc, int bcIndex, int nbc, int d, GmValueAccessor* nodeAc, QList<GmMatrix>& surfaces,
46  QList<GmVector>& nodesSurf) const;
47 
48  // Fills the possible nodes in contact pair
49  virtual void nodeToSurfaceSearch(QList<GmMatrix>& surfMaster, QList<GmMatrix>& surfSlave, QList<GmVector> nodesSurf1, QList<GmVector> nodesSurf2, QList<int>& nodesSlave, QList<GmMatrix>& nodesMaster) const;
50  //
51 
52  // Fills actualized displacements vector for use in global coordinates actualized in each step
53  virtual void coordinatesGlobal(GmValueAccessor* nodeAcc, GmValueAccessor*uAcc, QList<double>& slaveCoordinates, QList<double>& masterCoordinates, QList<int>& nodesSlave,
54  QList<GmMatrix>& nodesMaster);
55  //
56 
57  // Fills the impenetration vector for surfaces in contact
58  virtual void calVectors(QList<int>& nodesSlave, QList<GmMatrix>& nodesMaster, GmValueAccessor* nodeAcc, GmValueAccessor*uAcc, GmVector& lengthBorder,
59  GmVector& xi_c, GmVector& impVec, GmVector& slipVec, bool& hasContact);
60  //
61 
62  // Fills the global force vector with contact contribution
63  virtual void contactForce(GmValueAccessor* nodeAcc, GmValueAccessor*uAcc, QList<int> nodesSlave, QList<GmMatrix> nodesMaster, GmVector lengthBorder, GmVector xi_c, GmVector impVec,
64  GmVector slipVec, double Kn, double Ks, double muAc, QList<GmMatrix>& Fc);
65  //
66 
67  // Fills the global tangent matrix with contact contribution
68  virtual void contactMatrix(GmValueAccessor* nodeAcc, GmValueAccessor*uAcc, QList<int> nodesSlave, QList<GmMatrix> nodesMaster, GmVector lengthBorder, GmVector xi_c, GmVector impVec,
69  GmVector slipVec, double Kn, double Ks, double muAc, QList<GmMatrix>& Kc);
70  //
71 
72  // Fills dofMap nodes to fill global tangent matrix
73  virtual void contactNodes(GmValueAccessor* nodeAcc, GmValueAccessor*uAcc, QList<int> nodesSlave, QList<GmMatrix> nodesMaster, GmVector impVec, QList<int>& nodesInContact, QList<GmVector>& dofMatrix);
74  //
75 
76  // Write contact matrix to fill global tangent matrix
77  virtual void translateMatrix(GmVector impVec, QList<int> nodesSlave, QList<GmMatrix> nodesMaster, QList<int> nodesInContact, QList<GmMatrix> Kc, GmMatrix& Kcc, QList<GmVector>& dofMatrix);
78  //
79 
80  // Write contact forces to fill global vector internal forces
81  virtual void translateContactForce(GmVector impVec, QList<int> nodesSlave, QList<GmMatrix> nodesMaster, QList<int> nodesInContact, QList<GmMatrix> Fc, GmMatrix& Fcc, QList<GmVector>& dofMatrix);
82  //
83 };
84 #endif
Definition: gmpMechanicalContact.h:31
Declaration of usefull configuration definitions for the plugin library.
arma::vec GmVector
arma::mat GmMatrix