MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
inline.h
Go to the documentation of this file.
1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/mbdyn/struct/inline.h,v 1.28 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 #ifndef INLINE_H
33 #define INLINE_H
34 
35 #include <joint.h>
36 
37 /* InLineJoint - begin */
38 
39 class InLineJoint : virtual public Elem, public Joint {
40  private:
43 
44  const Mat3x3 Rv;
45  const Vec3 p;
46 
48 
49  public:
50  /* Costruttore */
51  InLineJoint(unsigned int uL, const DofOwner* pDO,
52  const StructNode* pN1, const StructNode* pN2,
53  const Mat3x3& RvTmp, const Vec3& pTmp, flag fOut);
54 
55  ~InLineJoint(void);
56 
57  /* Tipo di joint */
58  virtual Joint::Type GetJointType(void) const {
59  return J_INLINE;
60  };
61 
62  /* Contributo al file di restart */
63  virtual std::ostream& Restart(std::ostream& out) const;
64 
65  virtual unsigned int iGetNumDof(void) const {
66  return 2;
67  };
68 
69  virtual DofOrder::Order GetDofType(unsigned int i) const {
70  ASSERT(i >= 0 && i < 2);
71  return DofOrder::ALGEBRAIC;
72  };
73 
74  virtual void WorkSpaceDim(integer* piNumRows, integer* piNumCols) const {
75  *piNumRows = 12+2;
76  *piNumCols = 12+2;
77  };
78 
80  doublereal dCoef,
81  const VectorHandler& XCurr,
82  const VectorHandler& XPrimeCurr);
83 
85  doublereal dCoef,
86  const VectorHandler& XCurr,
87  const VectorHandler& XPrimeCurr);
88 
89  DofOrder::Order GetEqType(unsigned int i) const;
90 
91  void OutputPrepare(OutputHandler &OH);
92  virtual void Output(OutputHandler& OH) const;
93 
94 
95  /* funzioni usate nell'assemblaggio iniziale */
96 
97  virtual unsigned int iGetInitialNumDof(void) const {
98  return 4;
99  };
100 
101  virtual void
102  InitialWorkSpaceDim(integer* piNumRows, integer* piNumCols) const {
103  *piNumRows = 24+4;
104  *piNumCols = 24+4;
105  };
106 
107  /* Contributo allo jacobiano durante l'assemblaggio iniziale */
109  const VectorHandler& XCurr);
110 
111  /* Contributo al residuo durante l'assemblaggio iniziale */
113  const VectorHandler& XCurr);
114 
115  /* *******PER IL SOLUTORE PARALLELO******** */
116  /* Fornisce il tipo e la label dei nodi che sono connessi all'elemento
117  utile per l'assemblaggio della matrice di connessione fra i dofs */
118  virtual void GetConnectedNodes(std::vector<const Node *>& connectedNodes) const {
119  connectedNodes.resize(2);
120  connectedNodes[0] = pNode1;
121  connectedNodes[1] = pNode2;
122  };
123  /* ************************************************ */
124 };
125 
126 /* InLineJoint - end */
127 
128 
129 /* InLineWithOffsetJoint - begin */
130 
131 class InLineWithOffsetJoint : virtual public Elem, public Joint {
132  private:
135 
136  const Mat3x3 Rv;
137  const Vec3 p;
138  const Vec3 q;
139 
141 
142  public:
143  /* Costruttore */
144  InLineWithOffsetJoint(unsigned int uL, const DofOwner* pDO,
145  const StructNode* pN1, const StructNode* pN2,
146  const Mat3x3& RvTmp,
147  const Vec3& pTmp, const Vec3& qTmp, flag fOut);
148 
150 
151  /* Tipo di joint */
152  virtual Joint::Type GetJointType(void) const {
153  return J_INLINE;
154  };
155 
156  /* Contributo al file di restart */
157  virtual std::ostream& Restart(std::ostream& out) const;
158 
159  virtual unsigned int iGetNumDof(void) const {
160  return 2;
161  };
162 
163  virtual DofOrder::Order GetDofType(unsigned int i) const {
164  ASSERT(i >= 0 && i < 2);
165  return DofOrder::ALGEBRAIC;
166  };
167 
168  virtual void WorkSpaceDim(integer* piNumRows, integer* piNumCols) const {
169  *piNumRows = 12+2;
170  *piNumCols = 12+2;
171  };
172 
174  doublereal dCoef,
175  const VectorHandler& XCurr,
176  const VectorHandler& XPrimeCurr);
177 
179  doublereal dCoef,
180  const VectorHandler& XCurr,
181  const VectorHandler& XPrimeCurr);
182 
183  DofOrder::Order GetEqType(unsigned int i) const;
184 
185  virtual void Output(OutputHandler& OH) const;
186 
187 
188  /* funzioni usate nell'assemblaggio iniziale */
189 
190  virtual unsigned int iGetInitialNumDof(void) const {
191  return 4;
192  };
193 
194  virtual void InitialWorkSpaceDim(integer* piNumRows, integer* piNumCols) const {
195  *piNumRows = 24+4;
196  *piNumCols = 24+4;
197  };
198 
199  /* Contributo allo jacobiano durante l'assemblaggio iniziale */
201  const VectorHandler& XCurr);
202 
203  /* Contributo al residuo durante l'assemblaggio iniziale */
205  const VectorHandler& XCurr);
206 
207  /* *******PER IL SOLUTORE PARALLELO******** */
208  /* Fornisce il tipo e la label dei nodi che sono connessi all'elemento
209  utile per l'assemblaggio della matrice di connessione fra i dofs */
210  virtual void GetConnectedNodes(std::vector<const Node *>& connectedNodes) const {
211  connectedNodes.resize(2);
212  connectedNodes[0] = pNode1;
213  connectedNodes[1] = pNode2;
214  };
215  /* ************************************************ */
216 };
217 
218 /* InLineWithOffsetJoint - end */
219 
220 #endif /* INLINE_H */
221 
const Vec3 p
Definition: inline.h:137
Type
Definition: joint.h:66
long int flag
Definition: mbdyn.h:43
Definition: matvec3.h:98
virtual void GetConnectedNodes(std::vector< const Node * > &connectedNodes) const
Definition: inline.h:210
virtual void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: inline.h:168
virtual std::ostream & Restart(std::ostream &out) const
Definition: inline.cc:467
SubVectorHandler & InitialAssRes(SubVectorHandler &WorkVec, const VectorHandler &XCurr)
Definition: inline.cc:384
virtual unsigned int iGetNumDof(void) const
Definition: inline.h:159
DofOrder::Order GetEqType(unsigned int i) const
Definition: inline.cc:56
const Vec3 p
Definition: inline.h:45
virtual unsigned int iGetInitialNumDof(void) const
Definition: inline.h:190
virtual void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: inline.h:74
const Vec3 q
Definition: inline.h:138
const StructNode * pNode2
Definition: inline.h:42
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: inline.h:102
const Mat3x3 Rv
Definition: inline.h:136
virtual std::ostream & Restart(std::ostream &out) const
Definition: inline.cc:65
virtual Joint::Type GetJointType(void) const
Definition: inline.h:152
VariableSubMatrixHandler & InitialAssJac(VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
Definition: inline.cc:644
const StructNode * pNode1
Definition: inline.h:133
VariableSubMatrixHandler & InitialAssJac(VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
Definition: inline.cc:230
virtual void Output(OutputHandler &OH) const
Definition: inline.cc:632
virtual Joint::Type GetJointType(void) const
Definition: inline.h:58
~InLineJoint(void)
Definition: inline.cc:49
DofOrder::Order GetEqType(unsigned int i) const
Definition: inline.cc:622
const StructNode * pNode1
Definition: inline.h:41
SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: inline.cc:578
#define ASSERT(expression)
Definition: colamd.c:977
InLineWithOffsetJoint(unsigned int uL, const DofOwner *pDO, const StructNode *pN1, const StructNode *pN2, const Mat3x3 &RvTmp, const Vec3 &pTmp, const Vec3 &qTmp, flag fOut)
Definition: inline.cc:445
SubVectorHandler & InitialAssRes(SubVectorHandler &WorkVec, const VectorHandler &XCurr)
Definition: inline.cc:855
Vec3 F
Definition: inline.h:47
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: inline.h:194
virtual DofOrder::Order GetDofType(unsigned int i) const
Definition: inline.h:69
Definition: elem.h:75
virtual DofOrder::Order GetDofType(unsigned int i) const
Definition: inline.h:163
VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: inline.cc:475
VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: inline.cc:73
SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: inline.cc:150
Definition: joint.h:50
~InLineWithOffsetJoint(void)
Definition: inline.cc:460
double doublereal
Definition: colamd.c:52
void OutputPrepare(OutputHandler &OH)
Definition: inline.cc:192
InLineJoint(unsigned int uL, const DofOwner *pDO, const StructNode *pN1, const StructNode *pN2, const Mat3x3 &RvTmp, const Vec3 &pTmp, flag fOut)
Definition: inline.cc:39
long int integer
Definition: colamd.c:51
const Mat3x3 Rv
Definition: inline.h:44
virtual void Output(OutputHandler &OH) const
Definition: inline.cc:204
const StructNode * pNode2
Definition: inline.h:134
virtual unsigned int iGetNumDof(void) const
Definition: inline.h:65
virtual void GetConnectedNodes(std::vector< const Node * > &connectedNodes) const
Definition: inline.h:118
virtual unsigned int iGetInitialNumDof(void) const
Definition: inline.h:97