MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
point_contact.h
Go to the documentation of this file.
1 /*
2  * MBDyn (C) is a multibody analysis code.
3  * http://www.mbdyn.org
4  *
5  * Copyright (C) 1996-2017
6  *
7  * Pierangelo Masarati <masarati@aero.polimi.it>
8  * Paolo Mantegazza <mantegazza@aero.polimi.it>
9  *
10  * Dipartimento di Ingegneria Aerospaziale - Politecnico di Milano
11  * via La Masa, 34 - 20156 Milano, Italy
12  * http://www.aero.polimi.it
13  *
14  * Changing this copyright notice is forbidden.
15  *
16  * This program is free software; you can redistribute it and/or modify
17  * it under the terms of the GNU General Public License as published by
18  * the Free Software Foundation (version 2 of the License).
19  *
20  *
21  * This program is distributed in the hope that it will be useful,
22  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24  * GNU General Public License for more details.
25  *
26  * You should have received a copy of the GNU General Public License
27  * along with this program; if not, write to the Free Software
28  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29  */
30 
31 /* Point to surface contact */
32 
33 
34 #ifndef POINT_CONTACT_H
35 #define POINT_CONTACT_H
36 
37 #include "joint.h"
38 
39 
40 /* PointSurfaceContact - begin */
41 
43 virtual public Elem, public Joint{
44 private:
45 protected:
46  /* Punto di contatto */
47  const StructNode* pNode1;
48 
49  /* Superificie */
50  const StructNode* pSup;
51 
52  /* Posizione e orientazione della superficie */
54 
55  /* Distanza tra punto e superficie */
57 
58  /* Elastic "stiffness" */
60 
61  /* Output --> forza applicata sul punto */
63 
65  /* Output --> reazioni sulla superficie --> forza + momento di trasporto */
68 
70 
71  void AssMat(FullSubMatrixHandler& WM, doublereal dCoef); // costruzione Jacobiano locale
72  void AssVec(SubVectorHandler& WorkVec, doublereal dCoef); // costruzione residuo locale
73 
74 public:
75  /* Costruttore non banale */
76  PointSurfaceContact(unsigned int uL,
77  const DofOwner* pDO,
78  const StructNode* pN1,
79  const StructNode* pNs,
80  const Vec3& SDir, const doublereal Ek,
81  flag fOut);
82 
83  /* Distruttore */
84  virtual ~PointSurfaceContact(void);
85 
86  /* Tipo di joint */
87  virtual Joint::Type GetJointType(void) const {
88  return POINT_SURFACE_CONTACT;
89  };
90 
91  /* Contributo al file di Restart */
92  virtual std::ostream& Restart(std::ostream& out) const;
93 
94  virtual void Output(OutputHandler& OH) const;
95 
96  virtual unsigned int iGetNumDof(void) const {
97  return 0;
98  };
99 
100 /* virtual DofOrder::Order GetDofType(unsigned int i) const {
101  std::cout << "GetDofType 1" << std::endl;
102  ASSERT(i >= 0 && i < iGetNumDof());
103  std::cout << "GetDofType 2 " << std::endl;
104  return DofOrder::ALGEBRAIC;
105  };
106 
107  virtual DofOrder::Order GetEqType(unsigned int i) const {
108  std::cout << "GetEqType 1" << std::endl;
109  ASSERT(i >= 0 && i < iGetNumDof());
110  std::cout << "GetEqType 2" << std::endl;
111  return DofOrder::ALGEBRAIC;
112  };*/
113 
114  virtual void WorkSpaceDim(integer* piNumRows,
115  integer* piNumCols) const {
116  *piNumRows = 9;
117  *piNumCols = 9;
118  };
119 
120  /* assemblaggio jacobiano */
121  virtual VariableSubMatrixHandler&
123  doublereal dCoef,
124  const VectorHandler& XCurr,
125  const VectorHandler& XPrimeCurr);
126 
127  /* assemblaggio residuo */
128  virtual SubVectorHandler&
129  AssRes(SubVectorHandler& WorkVec,
130  doublereal dCoef,
131  const VectorHandler& XCurr,
132  const VectorHandler& XPrimeCurr);
133 
134  virtual unsigned int iGetInitialNumDof(void) const {
135  return 0;
136  };
137 
138  virtual void InitialWorkSpaceDim(integer* piNumRows,
139  integer* piNumCols) const {
140  *piNumRows = 9;
141  *piNumCols = 9;
142  };
143 
144 
145 
146  /* Contributo allo jacobiano durante l'assemblaggio iniziale */
147  virtual VariableSubMatrixHandler&
149  const VectorHandler& XCurr);
150 
151 
152  /* Contributo al residuo durante l'assemblaggio iniziale */
153  virtual SubVectorHandler&
155  const VectorHandler& XCurr);
156 
157 
158  /* Dati privati (aggiungere magari le reazioni vincolari) */
159  /*virtual unsigned int iGetNumPrivData(void) const{};
160  virtual unsigned int iGetPrivDataIdx(const char *s) const{};
161  virtual doublereal dGetPrivData(unsigned int i = 0) const{};*/
162 
163 
164  /* *******PER IL SOLUTORE PARALLELO******** */
165  /* Fornisce il tipo e la label dei nodi che sono connessi all'elemento
166  utile per l'assemblaggio della matrice di connessione fra i dofs */
167 /* virtual void GetConnectedNodes(std::vector<const Node *>& connectedNodes) const {
168  connectedNodes.resize(2);
169  connectedNodes[0] = pNode1;
170  connectedNodes[1] = pNode2;
171  };
172 */ /* ************************************************ */
173 };
174 
175 /* PointSurfaceContact - end */
176 
177 #endif /* POINT_CONTACT_H */
Type
Definition: joint.h:66
virtual VariableSubMatrixHandler & InitialAssJac(VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
long int flag
Definition: mbdyn.h:43
Definition: matvec3.h:98
virtual SubVectorHandler & InitialAssRes(SubVectorHandler &WorkVec, const VectorHandler &XCurr)
virtual Joint::Type GetJointType(void) const
Definition: point_contact.h:87
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
void AssVec(SubVectorHandler &WorkVec, doublereal dCoef)
virtual unsigned int iGetNumDof(void) const
Definition: point_contact.h:96
const StructNode * pSup
Definition: point_contact.h:50
virtual VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
const StructNode * pNode1
Definition: point_contact.h:47
doublereal ElasticStiffness
Definition: point_contact.h:59
Definition: elem.h:75
virtual std::ostream & Restart(std::ostream &out) const
virtual unsigned int iGetInitialNumDof(void) const
PointSurfaceContact(unsigned int uL, const DofOwner *pDO, const StructNode *pN1, const StructNode *pNs, const Vec3 &SDir, const doublereal Ek, flag fOut)
virtual SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
virtual ~PointSurfaceContact(void)
Definition: joint.h:50
void AssMat(FullSubMatrixHandler &WM, doublereal dCoef)
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51
virtual void Output(OutputHandler &OH) const
virtual void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const