MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
inplcntj.h
Go to the documentation of this file.
1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/mbdyn/struct/inplcntj.h,v 1.24 2017/01/12 14:46:43 masarati Exp $ */
2 /*
3  * MBDyn (C) is a multibody analysis code.
4  * http://www.mbdyn.org
5  *
6  * Copyright (C) 1996-2017
7  *
8  * Pierangelo Masarati <masarati@aero.polimi.it>
9  * Paolo Mantegazza <mantegazza@aero.polimi.it>
10  *
11  * Dipartimento di Ingegneria Aerospaziale - Politecnico di Milano
12  * via La Masa, 34 - 20156 Milano, Italy
13  * http://www.aero.polimi.it
14  *
15  * Changing this copyright notice is forbidden.
16  *
17  * This program is free software; you can redistribute it and/or modify
18  * it under the terms of the GNU General Public License as published by
19  * the Free Software Foundation (version 2 of the License).
20  *
21  *
22  * This program is distributed in the hope that it will be useful,
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25  * GNU General Public License for more details.
26  *
27  * You should have received a copy of the GNU General Public License
28  * along with this program; if not, write to the Free Software
29  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30  */
31 
32 /* Vincolo di contatto in un piano */
33 
34 #ifndef INPLCNTJ_H
35 #define INPLCNTJ_H
36 
37 #include "joint.h"
38 
39 /* InPlaneContact - begin */
40 
41 /* Vincolo di contatto nel piano:
42  * analogo al vincolo di giacenza nel piano per quanto riguarda la struttura,
43  * tuttavia in questo caso i due corpi non sono obbligati ad essere
44  * in contatto. La loro distanza deve essere positiva nella direzione
45  * del vettore v o nulla. Il prodotto della distanza per la reazione vincolare
46  * deve essere nullo sempre. Questo implica che la reazione puo' essere
47  * presente solo quando i due corpi sono in contatto.
48  * Valutare la possibilita' di introdurre anche una forza di attrito per
49  * strisciamento (anche nel caso del semplice contatto) */
50 
51 class InPlaneContactJoint : public Joint {
52  private:
58 
59  public:
60  /* Costruttore banale */
61  InPlaneContactJoint(unsigned int uL, const DofOwner* pDO);
62 
63  /* Costruttore non banale */
64  InPlaneContactJoint(unsigned int uL, const DofOwner* pDO,
65  const StructNode* pN1, const StructNode* pN2,
66  const Vec3& vTmp, const Vec3& pTmp);
67 
69 
70  /* Tipo di Joint */
71  virtual Joint::Type GetJointType(void) const
72  { return Joint::INPLANECONTACT; };
73 
74  /* Contributo al file di restart */
75  virtual std::ostream& Restart(std::ostream& out) const;
76 
77  virtual unsigned int iGetNumDof(void) const {
78  return 1;
79  };
80 
81  virtual DofOrder::Order GetDofType(unsigned int i) const {
82  ASSERT(i >= 0 && i < 1);
83  return DofOrder::ALGEBRAIC;
84  };
85 
86  virtual void WorkSpaceDim(integer* piNumRows, integer* piNumCols) const {
87  *piNumRows = 13;
88  *piNumCols = 13;
89  };
90 
92  doublereal dCoef,
93  const VectorHandler& XCurr,
94  const VectorHandler& XPrimeCurr);
96  doublereal dCoef,
97  const VectorHandler& XCurr,
98  const VectorHandler& XPrimeCurr);
99 
100  virtual void Output(OutputHandler& OH) const;
101 
102 
103  /* funzioni usate nell'assemblaggio iniziale */
104 
105  virtual unsigned int iGetInitialNumDof(void) const { return 2; };
106  virtual void InitialWorkSpaceDim(integer* piNumRows,
107  integer* piNumCols) const
108  { *piNumRows = 26; *piNumCols = 26; };
109 
110  /* Contributo allo jacobiano durante l'assemblaggio iniziale */
112  const VectorHandler& XCurr);
113 
114  /* Contributo al residuo durante l'assemblaggio iniziale */
116  const VectorHandler& XCurr);
117 
118  /* Setta il valore iniziale delle proprie variabili */
119  virtual void SetInitialValue(VectorHandler& X);
120 
121  /* *******PER IL SOLUTORE PARALLELO******** */
122  /* Fornisce il tipo e la label dei nodi che sono connessi all'elemento
123  utile per l'assemblaggio della matrice di connessione fra i dofs */
124  virtual void GetConnectedNodes(std::vector<const Node *>& connectedNodes) const {
125  connectedNodes.resize(2);
126  connectedNodes[0] = pNode1;
127  connectedNodes[1] = pNode2;
128  };
129  /* ************************************************ */
130 };
131 
132 /* InPlaneContactJoint - end */
133 
134 #endif
virtual void GetConnectedNodes(std::vector< const Node * > &connectedNodes) const
Definition: inplcntj.h:124
virtual unsigned int iGetNumDof(void) const
Definition: inplcntj.h:77
Type
Definition: joint.h:66
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: inplcntj.h:106
Definition: matvec3.h:98
virtual Joint::Type GetJointType(void) const
Definition: inplcntj.h:71
SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
virtual void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: inplcntj.h:86
virtual void SetInitialValue(VectorHandler &X)
InPlaneContactJoint(unsigned int uL, const DofOwner *pDO)
const StructNode * pNode1
Definition: inplcntj.h:53
virtual DofOrder::Order GetDofType(unsigned int i) const
Definition: inplcntj.h:81
SubVectorHandler & InitialAssRes(SubVectorHandler &WorkVec, const VectorHandler &XCurr)
VariableSubMatrixHandler & InitialAssJac(VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
#define ASSERT(expression)
Definition: colamd.c:977
virtual unsigned int iGetInitialNumDof(void) const
Definition: inplcntj.h:105
doublereal dF
Definition: inplcntj.h:57
const StructNode * pNode2
Definition: inplcntj.h:54
virtual std::ostream & Restart(std::ostream &out) const
Definition: joint.h:50
VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51
virtual void Output(OutputHandler &OH) const