MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
accj.h
Go to the documentation of this file.
1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/mbdyn/struct/accj.h,v 1.26 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 /* Giunti di accelerazione imposta */
33 
34 
35 #ifndef ACCJ_H
36 #define ACCJ_H
37 
38 #include "joint.h"
39 #include "drive.h"
40 
41 /* LinearAccelerationJoint - begin */
42 
44 : virtual public Elem, public Joint, public DriveOwner {
45  private:
46  const StructNode* pNode;
49 
50  public:
51  /* Costruttore non banale */
52  LinearAccelerationJoint(unsigned int uL,
53  const DofOwner* pDO,
54  const StructNode* pN,
55  const Vec3& TmpDir,
56  const DriveCaller* pDC,
57  flag fOut);
58 
59  /* Distruttore */
61 
62  /* Tipo di Joint */
63  virtual Joint::Type GetJointType(void) const;
64 
65  /* Contributo al file di restart */
66  virtual std::ostream& Restart(std::ostream& out) const;
67 
68  virtual unsigned int iGetNumDof(void) const;
69  DofOrder::Order GetDofType(unsigned int i) const;
70 
71  void WorkSpaceDim(integer* piNumRows, integer* piNumCols) const;
72 
73 
75  doublereal dCoef,
76  const VectorHandler& XCurr,
77  const VectorHandler& XPrimeCurr);
79  doublereal dCoef,
80  const VectorHandler& XCurr,
81  const VectorHandler& XPrimeCurr);
82 
83  void Output(OutputHandler& OH) const;
84 
85  virtual void SetValue(DataManager *pDM,
86  VectorHandler& /* X */ , VectorHandler& /* Xp */ ,
87  SimulationEntity::Hints *ph = 0);
88 
89  /* funzioni usate nell'assemblaggio iniziale */
90 
91  virtual unsigned int iGetInitialNumDof(void) const;
92  virtual void InitialWorkSpaceDim(integer* piNumRows,
93  integer* piNumCols) const;
94 
95  /* Contributo allo jacobiano durante l'assemblaggio iniziale */
97  const VectorHandler& XCurr);
98  /* Contributo al residuo durante l'assemblaggio iniziale */
100  const VectorHandler& XCurr);
101 
102  /* Dati privati */
103  virtual unsigned int iGetNumPrivData(void) const;
104  virtual unsigned int iGetPrivDataIdx(const char *s) const;
105  virtual doublereal dGetPrivData(unsigned int i) const;
106 
107  /* *******PER IL SOLUTORE PARALLELO******** */
108  /* Fornisce il tipo e la label dei nodi che sono connessi all'elemento
109  utile per l'assemblaggio della matrice di connessione fra i dofs */
110  virtual void GetConnectedNodes(std::vector<const Node *>& connectedNodes) const {
111  connectedNodes.resize(1);
112  connectedNodes[0] = pNode;
113 
114  };
115  /* ************************************************ */
116 };
117 
118 /* LinearAccelerationJoint - end */
119 
120 
121 /* AngularAccelerationJoint - begin */
122 
124 : virtual public Elem, public Joint, public DriveOwner {
125  private:
129 
130  public:
131  /* Costruttore non banale */
132  AngularAccelerationJoint(unsigned int uL,
133  const DofOwner* pDO,
134  const StructNode* pN,
135  const Vec3& TmpDir,
136  const DriveCaller* pDC,
137  flag fOut);
138 
139  /* Distruttore */
141 
142  /* Tipo di Joint */
143  virtual Joint::Type GetJointType(void) const;
144 
145  /* Contributo al file di restart */
146  virtual std::ostream& Restart(std::ostream& out) const;
147 
148  virtual unsigned int iGetNumDof(void) const;
149  DofOrder::Order GetDofType(unsigned int i) const;
150 
151  void WorkSpaceDim(integer* piNumRows, integer* piNumCols) const;
152 
154  doublereal dCoef,
155  const VectorHandler& XCurr,
156  const VectorHandler& XPrimeCurr);
158  doublereal dCoef,
159  const VectorHandler& XCurr,
160  const VectorHandler& XPrimeCurr);
161 
162  void Output(OutputHandler& OH) const;
163 
164  virtual void SetValue(DataManager *pDM,
165  VectorHandler& /* X */ , VectorHandler& /* Xp */ ,
166  SimulationEntity::Hints *ph = 0);
167 
168  /* funzioni usate nell'assemblaggio iniziale */
169 
170  virtual unsigned int iGetInitialNumDof(void) const;
171 
172  virtual void InitialWorkSpaceDim(integer* piNumRows,
173  integer* piNumCols) const;
174 
175  /* Contributo allo jacobiano durante l'assemblaggio iniziale */
177  const VectorHandler& XCurr);
178 
179  /* Contributo al residuo durante l'assemblaggio iniziale */
181  const VectorHandler& XCurr);
182 
183  /* Dati privati */
184  virtual unsigned int iGetNumPrivData(void) const;
185  virtual unsigned int iGetPrivDataIdx(const char *s) const;
186  virtual doublereal dGetPrivData(unsigned int i) const;
187 
188  /* *******PER IL SOLUTORE PARALLELO******** */
189  /* Fornisce il tipo e la label dei nodi che sono connessi all'elemento
190  utile per l'assemblaggio della matrice di connessione fra i dofs */
191  virtual void GetConnectedNodes(std::vector<const Node *>& connectedNodes) const {
192  connectedNodes.resize(1);
193  connectedNodes[0] = pNode;
194 
195  };
196  /* ************************************************ */
197 };
198 
199 /* AngularAccelerationJoint - end */
200 
201 #endif /* ACCJ_H */
202 
DofOrder::Order GetDofType(unsigned int i) const
Definition: accj.cc:311
virtual unsigned int iGetNumPrivData(void) const
Definition: accj.cc:451
virtual std::ostream & Restart(std::ostream &out) const
Definition: accj.cc:299
Type
Definition: joint.h:66
void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: accj.cc:102
virtual void SetValue(DataManager *pDM, VectorHandler &, VectorHandler &, SimulationEntity::Hints *ph=0)
Definition: accj.cc:402
virtual void GetConnectedNodes(std::vector< const Node * > &connectedNodes) const
Definition: accj.h:191
long int flag
Definition: mbdyn.h:43
virtual unsigned int iGetNumPrivData(void) const
Definition: accj.cc:224
Definition: matvec3.h:98
doublereal dF
Definition: accj.h:48
virtual unsigned int iGetPrivDataIdx(const char *s) const
Definition: accj.cc:458
virtual doublereal dGetPrivData(unsigned int i) const
Definition: accj.cc:474
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: accj.cc:195
VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: accj.cc:335
std::vector< Hint * > Hints
Definition: simentity.h:89
const StructNode * pNode
Definition: accj.h:46
virtual Joint::Type GetJointType(void) const
Definition: accj.cc:68
void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: accj.cc:326
virtual Joint::Type GetJointType(void) const
Definition: accj.cc:292
virtual unsigned int iGetNumDof(void) const
Definition: accj.cc:81
VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: accj.cc:111
~LinearAccelerationJoint(void)
Definition: accj.cc:61
virtual doublereal dGetPrivData(unsigned int i) const
Definition: accj.cc:247
const StructNode * pNode
Definition: accj.h:126
virtual unsigned int iGetNumDof(void) const
Definition: accj.cc:305
DofOrder::Order GetDofType(unsigned int i) const
Definition: accj.cc:87
SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: accj.cc:141
SubVectorHandler & InitialAssRes(SubVectorHandler &WorkVec, const VectorHandler &XCurr)
Definition: accj.cc:442
virtual unsigned int iGetInitialNumDof(void) const
Definition: accj.cc:416
~AngularAccelerationJoint(void)
Definition: accj.cc:285
virtual unsigned int iGetInitialNumDof(void) const
Definition: accj.cc:189
virtual void SetValue(DataManager *pDM, VectorHandler &, VectorHandler &, SimulationEntity::Hints *ph=0)
Definition: accj.cc:175
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: accj.cc:422
void Output(OutputHandler &OH) const
Definition: accj.cc:394
Definition: elem.h:75
virtual std::ostream & Restart(std::ostream &out) const
Definition: accj.cc:75
void Output(OutputHandler &OH) const
Definition: accj.cc:167
virtual unsigned int iGetPrivDataIdx(const char *s) const
Definition: accj.cc:231
Definition: joint.h:50
VariableSubMatrixHandler & InitialAssJac(VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
Definition: accj.cc:432
AngularAccelerationJoint(unsigned int uL, const DofOwner *pDO, const StructNode *pN, const Vec3 &TmpDir, const DriveCaller *pDC, flag fOut)
Definition: accj.cc:265
virtual void GetConnectedNodes(std::vector< const Node * > &connectedNodes) const
Definition: accj.h:110
SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: accj.cc:367
double doublereal
Definition: colamd.c:52
LinearAccelerationJoint(unsigned int uL, const DofOwner *pDO, const StructNode *pN, const Vec3 &TmpDir, const DriveCaller *pDC, flag fOut)
Definition: accj.cc:41
SubVectorHandler & InitialAssRes(SubVectorHandler &WorkVec, const VectorHandler &XCurr)
Definition: accj.cc:215
long int integer
Definition: colamd.c:51
VariableSubMatrixHandler & InitialAssJac(VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
Definition: accj.cc:205