MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
beam2.cc
Go to the documentation of this file.
1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/mbdyn/struct/beam2.cc,v 1.95 2017/06/13 08:39:18 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 /*
33  * Trave a volumi finiti, con predisposizione per forze di inerzia consistenti
34  * e legame cositutivo piezoelettico
35  */
36 
37 #include "mbconfig.h" /* This goes first in every *.c,*.cc file */
38 
39 #include <limits>
40 #include <cfloat>
41 #include <limits>
42 
43 #include "dataman.h"
44 #include "constltp.h"
45 #include "shapefnc.h"
46 #include "beam.h"
47 #include "beam2.h"
48 #include "pzbeam2.h"
49 #include "Rot.hh"
50 
51 /*
52  * Nota: non e' ancora stato implementato il contributo
53  * della ViscoElasticBeam2 all'assemblaggio iniziale
54  */
55 
56 /*
57  * Nota: la parte viscoelastica va rivista in accordo con la piu'
58  * recente formulazione delle derivate delle deformazioni nel sistema
59  * materiale
60  */
61 
62 /* Beam2 - begin */
63 
64 /* Costruttore normale */
65 Beam2::Beam2(unsigned int uL,
66  const StructNode* pN1,
67  const StructNode* pN2,
68  const Vec3& F1,
69  const Vec3& F2,
70  const Mat3x3& R1,
71  const Mat3x3& R2,
72  const Mat3x3& r,
73  const ConstitutiveLaw6D* pd,
75  flag fOut)
76 : Elem(uL, fOut),
77 ElemGravityOwner(uL, fOut),
78 InitialAssemblyElem(uL, fOut),
79 od(ood),
80 #ifdef USE_NETCDF
81 Var_X(0),
82 Var_Phi(0),
83 Var_F(0),
84 Var_M(0),
85 Var_Nu(0),
86 Var_K(0),
87 Var_NuP(0),
88 Var_KP(0),
89 #endif /* USE_NETCDF */
90 bFirstRes(false),
91 bFirstIDRes(true)
92 {
93  /* Validazione dati */
94  ASSERT(pN1 != NULL);
96  ASSERT(pN2 != NULL);
98 
99  pNode[NODE1] = pN1;
100  pNode[NODE2] = pN2;
101  const_cast<Vec3&>(f[NODE1]) = F1;
102  const_cast<Vec3&>(f[NODE2]) = F2;
103  const_cast<Mat3x3&>(RNode[NODE1]) = R1;
104  const_cast<Mat3x3&>(RNode[NODE2]) = R2;
105  RPrev = RRef = R = (Mat3x3&)r;
106 
107  pD = NULL;
111 
112  Omega = Zero3;
113  Az = Zero6;
114  AzRef = Zero6;
115  AzLoc = Zero6;
116  DefLoc = Zero6;
117  DefLocRef = Zero6;
118  DefLocPrev = Zero6;
119  p = Zero3;
120  g = Zero3;
121  L0 = Zero3;
122  L = Zero3;
123 
124  DsDxi();
125 
126  Vec3 xTmp[NUMNODES];
127 
128  for (unsigned int i = 0; i < NUMNODES; i++) {
129  xTmp[i] = pNode[i]->GetXCurr() + pNode[i]->GetRCurr()*f[i];
130  }
131 
132  /* Aggiorna le grandezze della trave nel punto di valutazione */
133  p = InterpState(xTmp[NODE1], xTmp[NODE2]);
134 }
135 
136 
138 {
139  ASSERT(pD != NULL);
140  if (pD != NULL) {
141  SAFEDELETE(pD);
142  }
143 }
144 
145 /* Accesso ai dati privati */
146 unsigned int
148 {
149  return Beam::iNumPrivData;
150 }
151 
152 unsigned int
153 Beam2::iGetPrivDataIdx(const char *s) const
154 {
156  if (dynamic_cast<const ViscoElasticBeam2 *>(this)) {
157  type = ConstLawType::VISCOUS;
158  }
159 
160  return Beam::iGetPrivDataIdx_int(s, type);
161 }
162 
164 Beam2::dGetPrivData(unsigned int i) const
165 {
166  ASSERT(i > 0 && i <= iGetNumPrivData());
167 
168  switch (i) {
169  case 1:
170  case 2:
171  case 3:
172  case 4:
173  case 5:
174  case 6:
175  return DefLoc.dGet(i);
176 
177  case 7:
178  case 8:
179  case 9:
180  case 10:
181  case 11:
182  case 12:
183  return AzLoc.dGet(i - 7);
184 
185  case 13:
186  case 14:
187  case 15:
188  return p.dGet(i - 12);
189 
190  case 16:
191  case 17:
192  case 18:
193  return RotManip::VecRot(R).dGet(i - 15);
194 
195  case 19:
196  case 20:
197  case 21:
198  return Omega.dGet(i - 18);
199 
200  default:
201  silent_cerr("Beam2(" << GetLabel() << "): "
202  "illegal private data " << i << std::endl);
204  }
205 }
206 
207 Vec3
208 Beam2::InterpState(const Vec3& v1, const Vec3& v2)
209 {
210  doublereal* pv1 = (doublereal*)v1.pGetVec();
211  doublereal* pv2 = (doublereal*)v2.pGetVec();
212  return Vec3(pv1[0]*dN2[0] + pv2[0]*dN2[1],
213  pv1[1]*dN2[0] + pv2[1]*dN2[1],
214  pv1[2]*dN2[0] + pv2[2]*dN2[1]);
215 }
216 
217 
218 Vec3
219 Beam2::InterpDeriv(const Vec3& v1, const Vec3& v2)
220 {
221  doublereal* pv1 = (doublereal*)v1.pGetVec();
222  doublereal* pv2 = (doublereal*)v2.pGetVec();
223  return Vec3((pv1[0]*dN2P[0] + pv2[0]*dN2P[1])*dsdxi,
224  (pv1[1]*dN2P[0] + pv2[1]*dN2P[1])*dsdxi,
225  (pv1[2]*dN2P[0] + pv2[2]*dN2P[1])*dsdxi);
226 }
227 
228 
229 void
231 {
232  /* Calcola il ds/dxi e le deformazioni iniziali */
233  Vec3 xNod[NUMNODES];
234  Mat3x3 RNod[NUMNODES];
235  Vec3 xTmp[NUMNODES];
236  for (unsigned int i = 0; i < NUMNODES; i++) {
237  xNod[i] = pNode[i]->GetXCurr();
238  RNod[i] = pNode[i]->GetRCurr();
239  xTmp[i] = xNod[i] + RNod[i]*f[i];
240  }
241 
242  dsdxi = 1.;
243 
244  Vec3 xGrad = InterpDeriv(xTmp[NODE1], xTmp[NODE2]);
245  doublereal d = xGrad.Dot();
246  if (d > std::numeric_limits<doublereal>::epsilon()) {
247  dsdxi = 1./std::sqrt(d);
248  } else {
249  silent_cerr("warning, Beam2(" << GetLabel() << ") "
250  "has singular metric; aborting..." << std::endl);
251 
253  }
254 
255  /* Calcola le deformazioni iniziali */
256  L0 = R.MulTV(InterpDeriv(xTmp[NODE1], xTmp[NODE2]));
257  pD->Update(Zero6);
258  DRef = MultRMRt(pD->GetFDE(), R);
259 }
260 
261 
262 /* Calcola la velocita' angolare delle sezioni a partire da quelle dei nodi */
263 void
265 {
266  /* Modo consistente: */
267  Mat3x3 RNod[NUMNODES];
268  Vec3 w[NUMNODES];
269  for (unsigned int i = 0; i < NUMNODES; i++) {
270  RNod[i] = pNode[i]->GetRCurr()*RNode[i];
271  w[i] = pNode[i]->GetWCurr();
272  }
273 
274  /*
275  * Calcolo i parametri di rotazione della rotazione relativa
276  * tra inizio e fine e li dimezzo nell'ipotesi che siano limitati
277  */
278  Vec3 gTmp(CGR_Rot::Param, RNod[NODE2].MulTM(RNod[NODE1]));
279 
280  /*
281  * Le derivate dei parametri di rotazione si ricavano da omega
282  */
283  Vec3 g1P(Mat3x3(CGR_Rot::MatGm1, gTmp*(-.5))*w[NODE1]);
284  Vec3 g2P(Mat3x3(CGR_Rot::MatGm1, gTmp*.5)*w[NODE2]);
285 
286  Vec3 gPTmp(g1P*dN2[NODE1] + g2P*dN2[NODE2]);
287  Omega = Mat3x3(CGR_Rot::MatG, gTmp)*gPTmp;
288 
289 #if 0
290  /* Modo brutale: interpolo le velocita' dei nodi */
292  + pNode[NODE2]->GetWCurr()*dN2[NODE2];
293 #endif /* 0 */
294 }
295 
296 
297 /* Contributo al file di restart */
298 std::ostream&
299 Beam2::Restart(std::ostream& out) const
300 {
301  return Restart_(out)<< ';' << std::endl;
302 }
303 
304 std::ostream&
305 Beam2::Restart_(std::ostream& out) const
306 {
307  out << " beam2: " << GetLabel();
308  for (unsigned int i = 0; i < NUMNODES; i++) {
309  out << ", " << pNode[i]->GetLabel() << ", reference, node, ",
310  f[i].Write(out, ", ");
311  }
312  out << ", reference, global,"
313  << "1, ", (R.GetVec(1)).Write(out, ", ") << ", "
314  << "2, ", (R.GetVec(2)).Write(out, ", ") << ", ",
315  pD->pGetConstLaw()->Restart(out);
316 
317  return out;
318 }
319 
320 void
322 {
323  RPrev = R;
324  DefLocPrev = DefLoc;
326 }
327 
328 /* Assembla la matrice */
329 void
331  FullSubMatrixHandler& /* WMB */ ,
332  doublereal dCoef,
333  const VectorHandler& /* XCurr */ ,
334  const VectorHandler& /* XPrimeCurr */ )
335 {
336  DEBUGCOUTFNAME("Beam2::AssStiffnessMat");
337 
338  /*
339  * La matrice arriva gia' dimensionata
340  * e con gli indici di righe e colonne a posto
341  */
342 
343  /* offset nel riferimento globale */
344  Vec3 fTmp[NUMNODES];
345  for (unsigned int i = 0; i < NUMNODES; i++) {
346  fTmp[i] = pNode[i]->GetRCurr()*f[i];
347  }
348 
349  Mat6x6 AzTmp[NUMNODES];
350 
351  for (unsigned int i = 0; i < NUMNODES; i++) {
352  /* Delta - deformazioni */
353  AzTmp[i] = Mat6x6(mb_deye<Mat3x3>(dN2P[i]*dsdxi*dCoef),
354  Zero3x3,
355  Mat3x3(MatCross, L*(dN2[i]*dCoef) -fTmp[i]*(dN2P[i]*dsdxi*dCoef)),
356  mb_deye<Mat3x3>(dN2P[i]*dsdxi*dCoef));
357 
358  /* Delta - azioni interne */
359  AzTmp[i] = DRef*AzTmp[i];
360 
361  /* Correggo per la rotazione da locale a globale */
362  AzTmp[i].SubMat12(Mat3x3(MatCross, Az.GetVec1()*(dN2[i]*dCoef)));
363  AzTmp[i].SubMat22(Mat3x3(MatCross, Az.GetVec2()*(dN2[i]*dCoef)));
364  }
365 
366  Vec3 bTmp[NUMNODES];
367 
368  bTmp[NODE1] = p - pNode[NODE1]->GetXCurr();
369  bTmp[NODE2] = p - pNode[NODE2]->GetXCurr();
370 
371  for (unsigned int i = 0; i < NUMNODES; i++) {
372  /* Equazione all'indietro: */
373  WMA.Sub(1, 6*i + 1, AzTmp[i].GetMat11());
374  WMA.Sub(1, 6*i + 4, AzTmp[i].GetMat12());
375 
376  WMA.Sub(3 + 1, 6*i + 1,
377  AzTmp[i].GetMat21()
378  - Mat3x3(MatCross, Az.GetVec1()*(dCoef*dN2[i]))
379  + bTmp[NODE1].Cross(AzTmp[i].GetMat11()));
380  WMA.Sub(3 + 1, 6*i + 4,
381  AzTmp[i].GetMat22()
382  - Mat3x3(MatCrossCross, Az.GetVec1()*(-dCoef*dN2[i]), fTmp[i])
383  + bTmp[NODE1].Cross(AzTmp[i].GetMat12()));
384 
385  /* Equazione in avanti: */
386  WMA.Add(6 + 1, 6*i + 1, AzTmp[i].GetMat11());
387  WMA.Add(6 + 1, 6*i + 4, AzTmp[i].GetMat12());
388 
389  WMA.Add(9 + 1, 6*i + 1,
390  AzTmp[i].GetMat21()
391  - Mat3x3(MatCross, Az.GetVec1()*(dCoef*dN2[i]))
392  + bTmp[NODE2].Cross(AzTmp[i].GetMat11()));
393  WMA.Add(9 + 1, 6*i + 4,
394  AzTmp[i].GetMat22()
395  + Mat3x3(MatCrossCross, Az.GetVec1()*(dCoef*dN2[i]), fTmp[i])
396  + bTmp[NODE2].Cross(AzTmp[i].GetMat12()));
397  }
398 
399  /* correzione alle equazioni */
400  Mat3x3 FTmp(MatCross, Az.GetVec1()*dCoef);
401  WMA.Sub(3 + 1, 1, FTmp);
402  WMA.Add(9 + 1, 6 + 1, FTmp);
403 };
404 
405 
406 /* Assembla il residuo */
407 void
409  doublereal /* dCoef */ ,
410  const VectorHandler& /* XCurr */ ,
411  const VectorHandler& /* XPrimeCurr */ )
412 {
413  DEBUGCOUTFNAME("Beam2::AssStiffnessVec");
414 
415  /*
416  * Riceve il vettore gia' dimensionato e con gli indici a posto
417  * per scrivere il residuo delle equazioni di equilibrio dei tre nodi
418  */
419 
420  /*
421  * Per la trattazione teorica, il riferimento e' il file ul-travi.tex
422  * (ora e' superato)
423  */
424 
425  if (bFirstRes) {
426  bFirstRes = false; /* AfterPredict ha gia' calcolato tutto */
427 
428  } else {
429  Vec3 gNod[NUMNODES];
430  Vec3 xTmp[NUMNODES];
431 
432  for (unsigned int i = 0; i < NUMNODES; i++) {
433  gNod[i] = pNode[i]->GetgCurr();
434  xTmp[i] = pNode[i]->GetXCurr() + pNode[i]->GetRCurr()*f[i];
435  }
436 
437  Mat3x3 RDelta;
438  Vec3 gGrad;
439 
440  /*
441  * Aggiorna le grandezze della trave nel punto di valutazione
442  */
443 
444  /* Posizione */
445  p = InterpState(xTmp[NODE1], xTmp[NODE2]);
446 
447  /* Matrici di rotazione */
448  g = InterpState(gNod[NODE1], gNod[NODE2]);
449  RDelta = Mat3x3(CGR_Rot::MatR, g);
450  R = RDelta*RRef;
451 
452  /* Derivate della posizione */
453  L = InterpDeriv(xTmp[NODE1], xTmp[NODE2]);
454 
455  /* Derivate dei parametri di rotazione */
456  gGrad = InterpDeriv(gNod[NODE1], gNod[NODE2]);
457 
458  /*
459  * Calcola le deformazioni nel sistema locale
460  * nei punti di valutazione
461  */
462  DefLoc = Vec6(R.MulTV(L) - L0,
463  R.MulTV(Mat3x3(CGR_Rot::MatG, g)*gGrad) + DefLocRef.GetVec2());
464 
465  /* Calcola le azioni interne */
466  pD->Update(DefLoc);
467  AzLoc = pD->GetF();
468 
469  /* corregge le azioni interne locali (piezo, ecc) */
471 
472  /* Porta le azioni interne nel sistema globale */
473  Az = MultRV(AzLoc, R);
474  }
475 
476  WorkVec.Add(1, Az.GetVec1());
477  WorkVec.Add(4, (p - pNode[NODE1]->GetXCurr()).Cross(Az.GetVec1()) + Az.GetVec2());
478  WorkVec.Sub(7, Az.GetVec1());
479  WorkVec.Sub(10, Az.GetVec2() + (p - pNode[NODE2]->GetXCurr()).Cross(Az.GetVec1()));
480 }
481 
482 
483 /* assemblaggio jacobiano */
486  doublereal dCoef,
487  const VectorHandler& XCurr,
488  const VectorHandler& XPrimeCurr)
489 {
490  DEBUGCOUTFNAME("Beam2::AssJac => AssStiffnessMat");
491 
492  integer iNode1FirstMomIndex = pNode[NODE1]->iGetFirstMomentumIndex();
493  integer iNode1FirstPosIndex = pNode[NODE1]->iGetFirstPositionIndex();
494  integer iNode2FirstMomIndex = pNode[NODE2]->iGetFirstMomentumIndex();
495  integer iNode2FirstPosIndex = pNode[NODE2]->iGetFirstPositionIndex();
496 
497  FullSubMatrixHandler& WM = WorkMat.SetFull();
498 
499  /* Dimensiona la matrice, la azzera e pone gli indici corretti */
500  WM.ResizeReset(12, 12);
501 
502  for (int iCnt = 1; iCnt <= 6; iCnt++) {
503  WM.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
504  WM.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
505  WM.PutRowIndex(6 + iCnt, iNode2FirstMomIndex + iCnt);
506  WM.PutColIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
507  }
508 
509  AssStiffnessMat(WM, WM, dCoef, XCurr, XPrimeCurr);
510 
511  return WorkMat;
512 }
513 
514 
515 /* assemblaggio residuo */
518  doublereal dCoef,
519  const VectorHandler& XCurr,
520  const VectorHandler& XPrimeCurr)
521 {
522  DEBUGCOUTFNAME("Beam2::AssRes => AssStiffnessVec");
523 
524  integer iNode1FirstMomIndex = pNode[NODE1]->iGetFirstMomentumIndex();
525  integer iNode2FirstMomIndex = pNode[NODE2]->iGetFirstMomentumIndex();
526 
527  /* Dimensiona il vettore, lo azzera e pone gli indici corretti */
528  WorkVec.ResizeReset(12);
529 
530  for (unsigned int iCnt = 1; iCnt <= 6; iCnt++) {
531  WorkVec.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
532  WorkVec.PutRowIndex(6 + iCnt, iNode2FirstMomIndex + iCnt);
533  }
534 
535  AssStiffnessVec(WorkVec, dCoef, XCurr, XPrimeCurr);
536 
537  return WorkVec;
538 }
539 
540 
541 /* Settings iniziali, prima della prima soluzione */
542 void
544  VectorHandler& /* X */ , VectorHandler& /* XP */ ,
546 {
547  /* Aggiorna le grandezze della trave nei punti di valutazione */
548  RRef = R;
549  LRef = L;
550  DefLocRef = DefLoc;
551  AzRef = Az;
552 
553  /*
554  * Aggiorna il legame costitutivo di riferimento
555  * (la deformazione e' gia' stata aggiornata dall'ultimo residuo)
556  */
557  DRef = MultRMRt(pD->GetFDE(), RRef);
558 
559  bFirstRes = true;
560 }
561 
562 
563 /* Prepara i parametri di riferimento dopo la predizione */
564 void
566 {
567  /*
568  * Calcola le deformazioni, aggiorna il legame costitutivo
569  * e crea la FDE
570  */
571 
572  /* Recupera i dati dei nodi */
573  Vec3 gNod[NUMNODES];
574  Vec3 xTmp[NUMNODES];
575 
576  for (unsigned int i = 0; i < NUMNODES; i++) {
577  gNod[i] = pNode[i]->GetgRef();
578  xTmp[i] = pNode[i]->GetXCurr() + pNode[i]->GetRRef()*f[i];
579  }
580 
581  Mat3x3 RDelta;
582  Vec3 gGrad;
583 
584  /* Aggiorna le grandezze della trave nel punto di valutazione */
585 
586  /* Posizione */
587  p = InterpState(xTmp[NODE1], xTmp[NODE2]);
588 
589  /* Matrici di rotazione */
590  g = InterpState(gNod[NODE1], gNod[NODE2]);
591  RDelta = Mat3x3(CGR_Rot::MatR, g);
592  R = RRef = RDelta*RPrev;
593 
594  /* Derivate della posizione */
595  L = LRef = InterpDeriv(xTmp[NODE1], xTmp[NODE2]);
596 
597  /* Derivate dei parametri di rotazione */
598  gGrad = InterpDeriv(gNod[NODE1], gNod[NODE2]);
599 
600  /*
601  * Calcola le deformazioni nel sistema locale
602  * nei punti di valutazione
603  */
604  DefLoc = DefLocRef = Vec6(R.MulTV(L) - L0,
606 
607  /* Calcola le azioni interne */
608  pD->Update(DefLoc);
609  AzLoc = pD->GetF();
610 
611  /* corregge le azioni interne locali (piezo, ecc) */
613 
614  /* Porta le azioni interne nel sistema globale */
615  Az = AzRef = MultRV(AzLoc, R);
616 
617  /* Aggiorna il legame costitutivo di riferimento */
618  DRef = MultRMRt(pD->GetFDE(), RRef);
619 
620  bFirstRes = true;
621 }
622 
623 
624 void
626 {
627  if (bToBeOutput()) {
628 #ifdef USE_NETCDF
631 
632  const char *type = 0;
633  switch (GetBeamType()) {
634  case Beam::ELASTIC:
635  type = "elastic";
636  break;
637 
638  case Beam::VISCOELASTIC:
639  type = "viscoelastic";
640  break;
641 
643  type = "piezoelectric elastic";
644  break;
645 
647  type = "piezoelectric viscoelastic";
648  break;
649 
650  default:
651  type = "unknown";
652  break;
653  }
654 
655  std::ostringstream os;
656  os << "elem.beam." << GetLabel();
657 
658  (void)OH.CreateVar(os.str(), type);
659 
660  os << '.';
661  std::string name(os.str());
662 
664 
665  if (uOutputFlags & Beam::OUTPUT_EP_X) {
666  Var_X = OH.CreateVar<Vec3>(name + "X", "m",
667  "evaluation point global position vector (X, Y, Z)");
668  }
669 
670  if (uOutputFlags & Beam::OUTPUT_EP_R) {
671  Var_Phi = OH.CreateRotationVar(name, "", od,
672  " evaluation point global orientation matrix");
673  }
674 
675  if (uOutputFlags & Beam::OUTPUT_EP_F) {
676  Var_F = OH.CreateVar<Vec3>(name + "F", "N",
677  "evaluation point internal force in local frame (F_X, F_Y, F_Z)");
678  }
679 
680  if (uOutputFlags & Beam::OUTPUT_EP_M) {
681  Var_M = OH.CreateVar<Vec3>(name + "M", "Nm",
682  "evaluation point internal force in local frame (M_X, M_Y, M_Z)");
683  }
684 
685  if (uOutputFlags & Beam::OUTPUT_EP_NU) {
686  Var_Nu = OH.CreateVar<Vec3>(name + "nu", "-",
687  "evaluation point linear strain in local frame (nu_X, nu_Y, nu_Z)");
688  }
689 
690  if (uOutputFlags & Beam::OUTPUT_EP_K) {
691  Var_K = OH.CreateVar<Vec3>(name + "k", "1/m",
692  "evaluation point angular strain in local frame (K_X, K_Y, K_Z)");
693  }
694 
695  if (uOutputFlags & Beam::OUTPUT_EP_NUP) {
696  Var_NuP = OH.CreateVar<Vec3>(name + "nuP", "1/s",
697  "evaluation point linear strain rate in local frame (nuP_X, nuP_Y, nuP_Z)");
698  }
699 
700  if (uOutputFlags & Beam::OUTPUT_EP_KP) {
701  Var_KP = OH.CreateVar<Vec3>(name + "kP", "1/ms",
702  "evaluation point angular strain rate in local frame (KP_X, KP_Y, KP_Z)");
703  }
704  }
705 #endif // USE_NETCDF
706  }
707 }
708 
709 /* output; si assume che ogni tipo di elemento sappia, attraverso
710  * l'OutputHandler, dove scrivere il proprio output */
711 void
713 {
714  if (bToBeOutput()) {
715 #ifdef USE_NETCDF
717  if (Var_X) {
718  Var_X->put_rec(p.pGetVec(), OH.GetCurrentStep());
719  }
720 
721  if (Var_Phi) {
722  Vec3 E;
723  switch (od) {
724  case EULER_123:
726  break;
727 
728  case EULER_313:
730  break;
731 
732  case EULER_321:
734  break;
735 
736  case ORIENTATION_VECTOR:
737  E = RotManip::VecRot(R);
738  break;
739 
740  case ORIENTATION_MATRIX:
741  break;
742 
743  default:
744  /* impossible */
746  break;
747  }
748 
749  switch (od) {
750  case EULER_123:
751  case EULER_313:
752  case EULER_321:
753  case ORIENTATION_VECTOR:
754  Var_Phi->put_rec(E.pGetVec(), OH.GetCurrentStep());
755  break;
756 
757  case ORIENTATION_MATRIX:
758  Var_Phi->put_rec(R.pGetMat(), OH.GetCurrentStep());
759  break;
760 
761  default:
762  /* impossible */
763  break;
764  }
765  }
766 
767  if (Var_F) {
768  Var_F->put_rec(AzLoc.GetVec1().pGetVec(), OH.GetCurrentStep());
769  }
770 
771  if (Var_M) {
772  Var_M->put_rec(AzLoc.GetVec2().pGetVec(), OH.GetCurrentStep());
773  }
774 
775  if (Var_Nu) {
776  Var_Nu->put_rec(DefLoc.GetVec1().pGetVec(), OH.GetCurrentStep());
777  }
778 
779  if (Var_K) {
780  Var_K->put_rec(DefLoc.GetVec2().pGetVec(), OH.GetCurrentStep());
781  }
782 
783  if (Var_NuP) {
784  Var_NuP->put_rec(DefPrimeLoc.GetVec1().pGetVec(), OH.GetCurrentStep());
785  }
786 
787  if (Var_KP) {
788  Var_KP->put_rec(DefPrimeLoc.GetVec2().pGetVec(), OH.GetCurrentStep());
789  }
790  }
791 #endif /* USE_NETCDF */
792 
793  if (OH.UseText(OutputHandler::BEAMS)) {
794  OH.Beams() << std::setw(8) << GetLabel()
795  << " " << AzLoc.GetVec1()
796  << " " << AzLoc.GetVec2()
797  << std::endl;
798  }
799  }
800 }
801 
802 /* Contributo allo jacobiano durante l'assemblaggio iniziale */
805  const VectorHandler& XCurr)
806 {
807  DEBUGCOUTFNAME("Beam2::InitialAssJac => AssStiffnessMat");
808 
809  /* Dimensiona la matrice, la azzera e pone gli indici corretti */
810  FullSubMatrixHandler& WM = WorkMat.SetFull();
811  WM.ResizeReset(12, 12);
812 
813  integer iNode1FirstPosIndex = pNode[NODE1]->iGetFirstPositionIndex();
814  integer iNode2FirstPosIndex = pNode[NODE2]->iGetFirstPositionIndex();
815 
816  for (int iCnt = 1; iCnt <= 6; iCnt++) {
817  WM.PutRowIndex(iCnt, iNode1FirstPosIndex + iCnt);
818  WM.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
819  WM.PutRowIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
820  WM.PutColIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
821  }
822 
823  AssStiffnessMat(WM, WM, 1., XCurr, XCurr);
824  return WorkMat;
825 }
826 
827 
828 /* Contributo al residuo durante l'assemblaggio iniziale */
831  const VectorHandler& XCurr)
832 {
833  DEBUGCOUTFNAME("Beam2::InitialAssRes => AssStiffnessVec");
834 
835  /* Dimensiona il vettore, lo azzera e pone gli indici corretti */
836  WorkVec.ResizeReset(12);
837 
838  integer iNode1FirstPosIndex = pNode[NODE1]->iGetFirstPositionIndex();
839  integer iNode2FirstPosIndex = pNode[NODE2]->iGetFirstPositionIndex();
840 
841  for (int iCnt = 1; iCnt <= 6; iCnt++) {
842  WorkVec.PutRowIndex(iCnt, iNode1FirstPosIndex + iCnt);
843  WorkVec.PutRowIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
844  }
845 
846  AssStiffnessVec(WorkVec, 1., XCurr, XCurr);
847  return WorkVec;
848 }
849 
850 
851 const StructNode*
852 Beam2::pGetNode(unsigned int i) const
853 {
854  ASSERT(i >= 1 && i <= 2);
855  switch (i) {
856  case 1:
857  case 2:
858  return pNode[i-1];
859  default:
861  }
862 }
863 
864 
865 /* inverse dynamics capable element */
866 bool
868 {
869  return true;
870 }
871 
872 
873 /* Inverse Dynamics Jacobian matrix assembly */
876  const VectorHandler& XCurr)
877 {
878  // silent_cout("Beam2::IDAssJac()" << std::endl);
879 
880  DEBUGCOUT("Entering Beam2::[InverseDynamics]AssJac()" << std::endl);
881 
882 #if 0
883  // iOrder not available
885  || (iOrder == InverseDynamics::POSITION && bIsErgonomy()));
886 #endif
887 
888  return AssJac(WorkMat, 1., XCurr, XCurr);
889 }
890 
891 /* Inverse Dynamics Residual Assembly */
894  const VectorHandler& XCurr,
895  const VectorHandler& XPrimeCurr,
896  const VectorHandler& /* XPrimePrimeCurr */ ,
897  InverseDynamics::Order iOrder)
898 {
899  // silent_cout("Beam2::IDAssRes(" << iOrder << ")" << std::endl);
900 
901  DEBUGCOUT("Entering Beam2::[InverseDynamics]AssRes()" << std::endl);
902 
904  || (iOrder == InverseDynamics::POSITION && bIsErgonomy()));
905 
906  // if (iOrder == InverseDynamics::POSITION) {
907  // ASSERT(bIsErgonomy());
908 
909  if (bFirstIDRes) {
910  // prepare for new step
911  AfterPredict(const_cast<VectorHandler&>(XCurr),
912  const_cast<VectorHandler&>(XPrimeCurr));
913 
914  bFirstIDRes = false;
915  bFirstRes = true;
916  }
917  // }
918 
919  return AssRes(WorkVec, 1., XCurr, XPrimeCurr);
920 }
921 
922 /* Inverse Dynamics update */
923 void
925 {
926  NO_OP;
927 }
928 
929 /* Inverse Dynamics after convergence */
930 void
932  const VectorHandler& XP, const VectorHandler& XPP)
933 {
934  AfterConvergence(X, XP);
935  bFirstIDRes = true;
936 }
937 
938 
939 /* Beam2 - end */
940 
941 
942 /* ViscoElasticBeam2 - begin */
943 
944 /* Costruttore normale */
946  const StructNode* pN1,
947  const StructNode* pN2,
948  const Vec3& F1,
949  const Vec3& F2,
950  const Mat3x3& R1,
951  const Mat3x3& R2,
952  const Mat3x3& r,
953  const ConstitutiveLaw6D* pd,
955  flag fOut)
956 : Elem(uL, fOut),
957 Beam2(uL, pN1, pN2, F1, F2, R1, R2, r, pd, ood, fOut)
958 {
959  LPrimeRef = LPrime = Zero3;
960  gPrime = Zero3;
961 
963 
964  /* Nota: DsDxi() viene chiamata dal costruttore di Beam */
965  Beam2::Omega0();
966 
967  OmegaRef = Omega;
969 }
970 
971 void
973  const VectorHandler& XP)
974 {
975  RPrev = R;
976  DefLocPrev = DefLoc;
978 }
979 
980 
981 /* Assembla la matrice */
982 void
985  doublereal dCoef,
986  const VectorHandler& /* XCurr */ ,
987  const VectorHandler& /* XPrimeCurr */ )
988 {
989  DEBUGCOUTFNAME("ViscoElasticBeam2::AssStiffnessMat");
990 
991  /*
992  * La matrice arriva gia' dimensionata
993  * e con gli indici di righe e colonne a posto
994  */
995 
996  /* offset nel riferimento globale */
997  Vec3 fTmp[NUMNODES];
998  for (unsigned int i = 0; i < NUMNODES; i++) {
999  fTmp[i] = pNode[i]->GetRCurr()*f[i];
1000  }
1001 
1002  Mat6x6 AzTmp[NUMNODES];
1003  Mat6x6 AzPrimeTmp[NUMNODES];
1004 
1005  for (unsigned int i = 0; i < NUMNODES; i++) {
1006  /* Delta - deformazioni */
1007  AzTmp[i] = AzPrimeTmp[i] = Mat6x6(mb_deye<Mat3x3>(dN2P[i]*dsdxi),
1008  Zero3x3,
1009  Mat3x3(MatCross, L*dN2[i] - fTmp[i]*(dN2P[i]*dsdxi)),
1010  mb_deye<Mat3x3>(dN2P[i]*dsdxi));
1011 
1012  AzTmp[i] = DRef*AzTmp[i]*dCoef;
1013 
1014  AzTmp[i] += ERef*Mat6x6(Mat3x3(MatCross, Omega*(-dN2P[i]*dsdxi*dCoef)),
1015  Zero3x3,
1016  (Mat3x3(MatCross, LPrime) - Mat3x3(MatCrossCross, Omega, L))*(dN2[i]*dCoef)
1017  + Mat3x3(MatCrossCross, Omega, fTmp[i]*(dN2P[i]*dsdxi*dCoef))
1018  + Mat3x3(MatCross, fTmp[i].Cross(pNode[i]->GetWCurr()*(dN2P[i]*dsdxi*dCoef))),
1019  Mat3x3(MatCross, Omega*(-dN2P[i]*dsdxi*dCoef)));
1020 
1021  AzPrimeTmp[i] = ERef*AzPrimeTmp[i];
1022 
1023  /* Correggo per la rotazione da locale a globale */
1024  AzTmp[i].SubMat12(Mat3x3(MatCross, Az.GetVec1()*(dN2[i]*dCoef)));
1025  AzTmp[i].SubMat22(Mat3x3(MatCross, Az.GetVec2()*(dN2[i]*dCoef)));
1026  }
1027 
1028  Vec3 bTmp[NUMNODES];
1029 
1030  bTmp[NODE1] = p-pNode[NODE1]->GetXCurr();
1031  bTmp[NODE2] = p-pNode[NODE2]->GetXCurr();
1032 
1033  for (unsigned int i = 0; i < NUMNODES; i++) {
1034  /* Equazione all'indietro: */
1035  WMA.Sub(1, 6*i + 1, AzTmp[i].GetMat11());
1036  WMA.Sub(1, 6*i + 4, AzTmp[i].GetMat12());
1037 
1038  WMA.Sub(4, 6*i + 1,
1039  AzTmp[i].GetMat21()
1040  - Mat3x3(MatCross, Az.GetVec1()*(dCoef*dN2[i]))
1041  + bTmp[NODE1].Cross(AzTmp[i].GetMat11()));
1042  WMA.Sub(4, 6*i + 4,
1043  AzTmp[i].GetMat22()
1044  - Mat3x3(MatCrossCross, Az.GetVec1()*(-dCoef*dN2[i]), fTmp[i])
1045  + bTmp[NODE1].Cross(AzTmp[i].GetMat12()));
1046 
1047  /* Equazione in avanti: */
1048  WMA.Add(7, 6*i + 1, AzTmp[i].GetMat11());
1049  WMA.Add(7, 6*i + 4, AzTmp[i].GetMat12());
1050 
1051  WMA.Add(10, 6*i + 1,
1052  AzTmp[i].GetMat21()
1053  - Mat3x3(MatCross, Az.GetVec1()*(dCoef*dN2[i]))
1054  + bTmp[NODE2].Cross(AzTmp[i].GetMat11()));
1055  WMA.Add(10, 6*i + 4,
1056  AzTmp[i].GetMat22()
1057  + Mat3x3(MatCrossCross, Az.GetVec1()*(dCoef*dN2[i]), fTmp[i])
1058  + bTmp[NODE2].Cross(AzTmp[i].GetMat12()));
1059 
1060  /* Equazione viscosa all'indietro: */
1061  WMB.Sub(1, 6*i + 1, AzPrimeTmp[i].GetMat11());
1062  WMB.Sub(1, 6*i + 4, AzPrimeTmp[i].GetMat12());
1063 
1064  WMB.Sub(4, 6*i + 1,
1065  AzPrimeTmp[i].GetMat21()
1066  + bTmp[NODE1].Cross(AzPrimeTmp[i].GetMat11()));
1067  WMB.Sub(4, 6*i + 4,
1068  AzPrimeTmp[i].GetMat22()
1069  + bTmp[NODE1].Cross(AzPrimeTmp[i].GetMat12()));
1070 
1071  /* Equazione viscosa in avanti: */
1072  WMB.Add(7, 6*i + 1, AzPrimeTmp[i].GetMat11());
1073  WMB.Add(7, 6*i + 4, AzPrimeTmp[i].GetMat12());
1074 
1075  WMB.Add(10, 6*i + 1,
1076  AzPrimeTmp[i].GetMat21()
1077  + bTmp[NODE2].Cross(AzPrimeTmp[i].GetMat11()));
1078  WMB.Add(10, 6*i + 4,
1079  AzPrimeTmp[i].GetMat22()
1080  + bTmp[NODE2].Cross(AzPrimeTmp[i].GetMat12()));
1081  }
1082 
1083  /* correzione alle equazioni */
1084  Mat3x3 FTmp(MatCross, Az.GetVec1()*dCoef);
1085  WMA.Sub(4, 1, FTmp);
1086  WMA.Add(10, 7, FTmp);
1087 };
1088 
1089 
1090 /* Assembla il residuo */
1091 void
1093  doublereal /* dCoef */ ,
1094  const VectorHandler& /* XCurr */ ,
1095  const VectorHandler& /* XPrimeCurr */ )
1096 {
1097  DEBUGCOUTFNAME("ViscoElasticBeam2::AssStiffnessVec");
1098 
1099  /*
1100  * Riceve il vettore gia' dimensionato e con gli indici a posto
1101  * per scrivere il residuo delle equazioni di equilibrio dei due nodi
1102  */
1103 
1104  /*
1105  * Per la trattazione teorica, il riferimento e' il file ul-travi.tex
1106  * (ora e' superato)
1107  */
1108 
1109  if (bFirstRes) {
1110  bFirstRes = false; /* AfterPredict ha gia' calcolato tutto */
1111 
1112  } else {
1113  Vec3 gNod[NUMNODES];
1114  Vec3 xTmp[NUMNODES];
1115 
1116  Vec3 gPrimeNod[NUMNODES];
1117  Vec3 xPrimeTmp[NUMNODES];
1118 
1119  for (unsigned int i = 0; i < NUMNODES; i++) {
1120  gNod[i] = pNode[i]->GetgCurr();
1121  Vec3 fTmp = pNode[i]->GetRCurr()*f[i];
1122  xTmp[i] = pNode[i]->GetXCurr() + fTmp;
1123  gPrimeNod[i] = pNode[i]->GetgPCurr();
1124  xPrimeTmp[i] = pNode[i]->GetVCurr()
1125  + pNode[i]->GetWCurr().Cross(fTmp);
1126  }
1127 
1128  Mat3x3 RDelta;
1129  Vec3 gGrad;
1130  Vec3 gPrimeGrad;
1131 
1132  /*
1133  * Aggiorna le grandezze della trave nel punto di valutazione
1134  */
1135 
1136  /* Posizione */
1137  p = InterpState(xTmp[NODE1], xTmp[NODE2]);
1138 
1139  /* Matrici di rotazione */
1140  g = InterpState(gNod[NODE1], gNod[NODE2]);
1141  RDelta = Mat3x3(CGR_Rot::MatR, g);
1142  R = RDelta*RRef;
1143 
1144  /* Velocita' angolare della sezione */
1145  gPrime = InterpState(gPrimeNod[NODE1], gPrimeNod[NODE2]);
1146  Omega = Mat3x3(CGR_Rot::MatG, g)*gPrime + RDelta*OmegaRef;
1147 
1148  /* Derivate della posizione */
1149  L = InterpDeriv(xTmp[NODE1], xTmp[NODE2]);
1150 
1151  /* Derivate della velocita' */
1152  LPrime = InterpDeriv(xPrimeTmp[NODE1], xPrimeTmp[NODE2]);
1153 
1154  /* Derivate dei parametri di rotazione */
1155  gGrad = InterpDeriv(gNod[NODE1], gNod[NODE2]);
1156 
1157  /*
1158  * Derivate delle derivate spaziali dei parametri di rotazione
1159  */
1160  gPrimeGrad = InterpDeriv(gPrimeNod[NODE1], gPrimeNod[NODE2]);
1161 
1162  /*
1163  * Calcola le deformazioni nel sistema locale nel punto
1164  * di valutazione
1165  */
1166  DefLoc = Vec6(R.MulTV(L) - L0,
1167  R.MulTV(Mat3x3(CGR_Rot::MatG, g)*gGrad) + DefLocRef.GetVec2());
1168 
1169  /*
1170  * Calcola le velocita' di deformazione nel sistema locale
1171  * nel punto di valutazione
1172  */
1174  R.MulTV(Mat3x3(CGR_Rot::MatG, g)*gPrimeGrad
1175  + (Mat3x3(CGR_Rot::MatG, g)*gGrad).Cross(Omega))
1176  + DefPrimeLocRef.GetVec2());
1177 
1178  /* Calcola le azioni interne */
1179  pD->Update(DefLoc, DefPrimeLoc);
1180  AzLoc = pD->GetF();
1181 
1182  /* corregge le azioni interne locali (piezo, ecc) */
1184 
1185  /* Porta le azioni interne nel sistema globale */
1186  Az = MultRV(AzLoc, R);
1187  }
1188 
1189  WorkVec.Add(1, Az.GetVec1());
1190  WorkVec.Add(4, (p - pNode[NODE1]->GetXCurr()).Cross(Az.GetVec1()) + Az.GetVec2());
1191  WorkVec.Sub(7, Az.GetVec1());
1192  WorkVec.Sub(10, Az.GetVec2() + (p - pNode[NODE2]->GetXCurr()).Cross(Az.GetVec1()));
1193 }
1194 
1195 
1196 /* Settings iniziali, prima della prima soluzione */
1197 void
1199  VectorHandler& X, VectorHandler& XP,
1201 {
1202  Beam2::SetValue(pDM, X, XP, ph);
1203 
1204  /* Aggiorna le grandezze della trave nei punti di valutazione */
1205  OmegaRef = Omega;
1206  LPrimeRef = LPrime;
1208 
1209  /*
1210  * Aggiorna il legame costitutivo di riferimento
1211  * (la deformazione e' gia' stata aggiornata dall'ultimo residuo)
1212  */
1213  ERef = MultRMRt(pD->GetFDEPrime(), RRef);
1214 
1215  ASSERT(bFirstRes == true);
1216 }
1217 
1218 
1219 /* Prepara i parametri di riferimento dopo la predizione */
1220 void
1222  VectorHandler& /* XP */ )
1223 {
1224  /*
1225  * Calcola le deformazioni, aggiorna il legame costitutivo
1226  * e crea la FDE
1227  */
1228 
1229  /* Recupera i dati dei nodi */
1230  Vec3 gNod[NUMNODES];
1231  Vec3 xTmp[NUMNODES];
1232 
1233  Vec3 gPrimeNod[NUMNODES];
1234  Vec3 xPrimeTmp[NUMNODES];
1235 
1236  for (unsigned int i = 0; i < NUMNODES; i++) {
1237  gNod[i] = pNode[i]->GetgRef();
1238  Vec3 fTmp = pNode[i]->GetRRef()*f[i];
1239  xTmp[i] = pNode[i]->GetXCurr() + fTmp;
1240  gPrimeNod[i] = pNode[i]->GetgPRef();
1241  xPrimeTmp[i] = pNode[i]->GetVCurr()
1242  + pNode[i]->GetWRef().Cross(fTmp);
1243  }
1244 
1245  Mat3x3 RDelta;
1246  Vec3 gGrad;
1247  Vec3 gPrimeGrad;
1248 
1249  /* Aggiorna le grandezze della trave nel punto di valutazione */
1250  /* Posizione */
1251  p = InterpState(xTmp[NODE1], xTmp[NODE2]);
1252 
1253  /* Matrici di rotazione */
1254  g = InterpState(gNod[NODE1], gNod[NODE2]);
1255  RDelta = Mat3x3(CGR_Rot::MatR, g);
1256  R = RRef = RDelta*RPrev;
1257 
1258  /* Velocita' angolare della sezione */
1259  gPrime = InterpState(gPrimeNod[NODE1], gPrimeNod[NODE2]);
1261 
1262  /* Derivate della posizione */
1263  L = LRef = InterpDeriv(xTmp[NODE1], xTmp[NODE2]);
1264 
1265  /* Derivate della velocita' */
1266  LPrime = LPrimeRef = InterpDeriv(xPrimeTmp[NODE1], xPrimeTmp[NODE2]);
1267 
1268  /* Derivate dei parametri di rotazione */
1269  gGrad = InterpDeriv(gNod[NODE1], gNod[NODE2]);
1270 
1271  /* Derivate delle derivate spaziali dei parametri di rotazione */
1272  gPrimeGrad = InterpDeriv(gPrimeNod[NODE1], gPrimeNod[NODE2]);
1273 
1274  /*
1275  * Calcola le deformazioni nel sistema locale nel punto di valutazione
1276  */
1277  DefLoc = DefLocRef = Vec6(R.MulTV(L) - L0,
1278  R.MulTV(Mat3x3(CGR_Rot::MatG, g)*gGrad) + DefLocPrev.GetVec2());
1279 
1280  /*
1281  * Calcola le velocita' di deformazione nel sistema locale
1282  * nel punto di valutazione
1283  */
1285  R.MulTV(Mat3x3(CGR_Rot::MatG, g)*gPrimeGrad
1286  + (Mat3x3(CGR_Rot::MatG, g)*gGrad).Cross(Omega)));
1287 
1288  /* Calcola le azioni interne */
1289  pD->Update(DefLoc, DefPrimeLoc);
1290  AzLoc = pD->GetF();
1291 
1292  /* corregge le azioni interne locali (piezo, ecc) */
1294 
1295  /* Porta le azioni interne nel sistema globale */
1296  Az = AzRef = MultRV(AzLoc, R);
1297 
1298  /* Aggiorna il legame costitutivo */
1299  DRef = MultRMRt(pD->GetFDE(), R);
1300  ERef = MultRMRt(pD->GetFDEPrime(), R);
1301 
1302  bFirstRes = true;
1303 }
1304 
1305 doublereal
1306 ViscoElasticBeam2::dGetPrivData(unsigned int i) const
1307 {
1308  ASSERT(i > 0 && i <= iGetNumPrivData());
1309 
1310  switch (i) {
1311  case 22:
1312  case 23:
1313  case 24:
1314  case 25:
1315  case 26:
1316  case 27:
1317  return DefPrimeLoc.dGet(i - 21);
1318 
1319  default:
1320  return Beam2::dGetPrivData(i);
1321  }
1322 }
1323 
1324 /* ViscoElasticBeam - end */
1325 
1326 
1327 /* Legge una trave */
1328 Elem*
1329 ReadBeam2(DataManager* pDM, MBDynParser& HP, unsigned int uLabel)
1330 {
1331  DEBUGCOUTFNAME("ReadBeam2");
1332 
1333  /* Nodo 1 */
1334  const StructNode* pNode1 = pDM->ReadNode<const StructNode, Node::STRUCTURAL>(HP);
1335 
1336  Mat3x3 R1(pNode1->GetRCurr());
1337  if (HP.IsKeyWord("position")) {
1338  /* just eat it! */
1339  NO_OP;
1340  }
1341  Vec3 f1(HP.GetPosRel(ReferenceFrame(pNode1)));
1342  Mat3x3 Rn1(Eye3);
1343  if (HP.IsKeyWord("orientation") || HP.IsKeyWord("rot")) {
1344  Rn1 = HP.GetRotRel(ReferenceFrame(pNode1));
1345  }
1346 
1347  DEBUGLCOUT(MYDEBUG_INPUT, "node 1 offset (node reference frame): "
1348  << f1 << std::endl << "(global frame): "
1349  << pNode1->GetXCurr() + pNode1->GetRCurr()*f1 << std::endl);
1350 
1351  /* Nodo 2 */
1352  const StructNode* pNode2 = pDM->ReadNode<const StructNode, Node::STRUCTURAL>(HP);
1353 
1354  Mat3x3 R2(pNode2->GetRCurr());
1355  if (HP.IsKeyWord("position")) {
1356  /* just eat it! */
1357  NO_OP;
1358  }
1359  Vec3 f2(HP.GetPosRel(ReferenceFrame(pNode2)));
1360  Mat3x3 Rn2(Eye3);
1361  if (HP.IsKeyWord("orientation") || HP.IsKeyWord("rot")) {
1362  Rn2 = HP.GetRotRel(ReferenceFrame(pNode2));
1363  }
1364 
1365  DEBUGLCOUT(MYDEBUG_INPUT, "node 2 offset (node reference frame): "
1366  << f2 << std::endl << "(global frame): "
1367  << pNode2->GetXCurr() + pNode2->GetRCurr()*f2 << std::endl);
1368 
1369  /* Matrice R */
1370  Mat3x3 R;
1371  flag f(0);
1372  if (HP.IsKeyWord("from" "nodes") || HP.IsKeyWord("node")) {
1373  f = flag(1);
1374  } else {
1375  R = HP.GetRotAbs(::AbsRefFrame);
1376  }
1377 
1378  /* Legame costitutivo */
1380  ConstitutiveLaw6D* pD = HP.GetConstLaw6D(CLType);
1381 
1382  if (pD->iGetNumDof() != 0) {
1383  silent_cerr("line " << HP.GetLineData()
1384  << ": Beam2(" << uLabel << ") does not support "
1385  "dynamic constitutive laws yet"
1386  << std::endl);
1388  }
1389 
1390  Beam::Type Type;
1391  if (CLType == ConstLawType::ELASTIC) {
1392  Type = Beam::ELASTIC;
1393  } else {
1394  Type = Beam::VISCOELASTIC;
1395  }
1396 
1397 #ifdef DEBUG
1398  Mat6x6 MTmp(pD->GetFDE());
1399  Mat3x3 D11(MTmp.GetMat11());
1400  Mat3x3 D12(MTmp.GetMat12());
1401  Mat3x3 D21(MTmp.GetMat21());
1402  Mat3x3 D22(MTmp.GetMat22());
1403 
1405  "First point matrix D11: " << std::endl << D11 << std::endl
1406  << "First point matrix D12: " << std::endl << D12 << std::endl
1407  << "First point matrix D21: " << std::endl << D21 << std::endl
1408  << "First point matrix D22: " << std::endl << D22 << std::endl);
1409 #endif /* DEBUG */
1410 
1411  flag fPiezo(0);
1412  Mat3xN PiezoMat[2];
1413  integer iNumElec = 0;
1414  const ScalarDifferentialNode** pvElecDofs = 0;
1415  if (HP.IsKeyWord("piezoelectric" "actuator")) {
1416  fPiezo = flag(1);
1418  "Piezoelectric actuator beam is expected"
1419  << std::endl);
1420 
1421  iNumElec = HP.GetInt();
1423  "piezo actuator " << uLabel
1424  << " has " << iNumElec
1425  << " electrodes" << std::endl);
1426  if (iNumElec <= 0) {
1427  silent_cerr("Beam2(" << uLabel << "): "
1428  "illegal number of electric nodes "
1429  << iNumElec
1430  << " at line " << HP.GetLineData()
1431  << std::endl);
1433  }
1434 
1435  SAFENEWARR(pvElecDofs, const ScalarDifferentialNode *, iNumElec);
1436 
1437  for (integer i = 0; i < iNumElec; i++) {
1438  pvElecDofs[i] = pDM->ReadNode<const ScalarDifferentialNode, Node::ABSTRACT>(HP);
1439  }
1440 
1441  PiezoMat[0].Resize(iNumElec);
1442  PiezoMat[1].Resize(iNumElec);
1443 
1444  /* leggere le matrici (6xN sez. 1, 6xN sez. 2) */
1445  HP.GetMat6xN(PiezoMat[0], PiezoMat[1], iNumElec);
1446 
1447 #if 0
1448  DEBUGLCOUT(MYDEBUG_INPUT, "Piezo matrix I:" << std::endl
1449  << PiezoMat[0][0] << PiezoMat[1][0]);
1450 #endif /* 0 */
1451  }
1452 
1454  unsigned uFlags = Beam::OUTPUT_NONE;
1455  ReadOptionalBeamCustomOutput(pDM, HP, uLabel, Type, uFlags, od);
1456 
1457  flag fOut = pDM->fReadOutput(HP, Elem::BEAM);
1458  if (fOut) {
1459  fOut |= uFlags;
1460  }
1461 
1462  /* Se necessario, interpola i parametri di rotazione delle sezioni */
1463  if (f) {
1464  Mat3x3 RR2 = R2*Rn2;
1465  Vec3 g(Vec3(CGR_Rot::Param, RR2.MulTM(R1*Rn1))/2);
1466  R = RR2*Mat3x3(CGR_Rot::MatR, g);
1467  }
1468 
1469  std::ostream& out = pDM->GetLogFile();
1470  out << "beam2: " << uLabel
1471  << " " << pNode1->GetLabel()
1472  << " ", f1.Write(out, " ")
1473  << " " << pNode2->GetLabel()
1474  << " ", f2.Write(out, " ")
1475  << std::endl;
1476 
1477  Elem* pEl = NULL;
1478 
1479  if (CLType == ConstLawType::ELASTIC) {
1480  if (fPiezo == 0) {
1482  Beam2,
1483  Beam2(uLabel,
1484  pNode1, pNode2,
1485  f1, f2,
1486  Rn1, Rn2,
1487  R,
1488  pD,
1489  od,
1490  fOut));
1491  } else {
1494  PiezoActuatorBeam2(uLabel,
1495  pNode1, pNode2,
1496  f1, f2,
1497  Rn1, Rn2,
1498  R,
1499  pD,
1500  iNumElec,
1501  pvElecDofs,
1502  PiezoMat[0], PiezoMat[1],
1503  od,
1504  fOut));
1505  }
1506 
1507  } else /* At least one is VISCOUS or VISCOELASTIC */ {
1508  if (fPiezo == 0) {
1511  ViscoElasticBeam2(uLabel,
1512  pNode1, pNode2,
1513  f1, f2,
1514  Rn1, Rn2,
1515  R,
1516  pD,
1517  od,
1518  fOut));
1519  } else {
1522  PiezoActuatorVEBeam2(uLabel,
1523  pNode1, pNode2,
1524  f1, f2,
1525  Rn1, Rn2,
1526  R,
1527  pD,
1528  iNumElec,
1529  pvElecDofs,
1530  PiezoMat[0], PiezoMat[1],
1531  od,
1532  fOut));
1533  }
1534  }
1535 
1536  // add here inverse dynamics
1537  bool bIsErgonomy(false);
1538  bool bIsRightHandSide(true);
1539 
1540  if (HP.IsKeyWord("inverse" "dynamics")) {
1541  if (HP.IsKeyWord("torque")) {
1542  silent_cerr("Beam2(" << uLabel << "): \"torque\" meaningless in this context "
1543  "at line " << HP.GetLineData() << std::endl);
1545  }
1546 
1547  if (HP.IsKeyWord("prescribed" "motion")) {
1548  silent_cerr("Beam2(" << uLabel << "): \"prescribed motion\" meaningless in this context "
1549  "at line " << HP.GetLineData() << std::endl);
1551  }
1552 
1553  if (HP.IsKeyWord("right" "hand" "side")) {
1554  bIsRightHandSide = HP.GetYesNoOrBool(bIsRightHandSide);
1555  }
1556 
1557  if (HP.IsKeyWord("ergonomy")) {
1558  bIsErgonomy = HP.GetYesNoOrBool(bIsErgonomy);
1559  if (bIsErgonomy) {
1560  ConstLawType::Type type = pD->GetConstLawType();
1561  if (type != ConstLawType::ELASTIC) {
1562  silent_cerr("Beam2(" << uLabel << "): invalid constitutive law type (must be ELASTIC)" << std::endl);
1564  }
1565 
1566  if (bIsRightHandSide) {
1567  silent_cerr("warning, Beam2(" << uLabel << ") is both \"ergonomy\" and \"right hand side\"" << std::endl);
1568  }
1569  }
1570  }
1571  }
1572 
1573  // set flags for inverse dynamics
1574  if (pDM->bIsInverseDynamics() && pEl->bInverseDynamics()) {
1575  unsigned flags = 0;
1576  if (bIsRightHandSide) {
1578  }
1579  if (bIsErgonomy) {
1580  flags |= InverseDynamics::ERGONOMY;
1581  }
1582  pEl->SetInverseDynamicsFlags(flags);
1583  }
1584 
1585  /* Se non c'e' il punto e virgola finale */
1586  if (HP.IsArg()) {
1587  silent_cerr("semicolon expected at line "
1588  << HP.GetLineData() << std::endl);
1590  }
1591 
1592  return pEl;
1593 } /* End of ReadBeam2() */
ViscoElasticBeam2(unsigned int uL, const StructNode *pN1, const StructNode *pN2, const Vec3 &F1, const Vec3 &F2, const Mat3x3 &R1, const Mat3x3 &R2, const Mat3x3 &r, const ConstitutiveLaw6D *pd, OrientationDescription ood, flag fOut)
Definition: beam2.cc:945
flag fReadOutput(MBDynParser &HP, const T &t) const
Definition: dataman.h:1064
const MatGm1_Manip MatGm1
Definition: matvec3.cc:647
virtual unsigned int iGetPrivDataIdx(const char *s) const
Definition: beam2.cc:153
virtual bool bInverseDynamics(void) const
Definition: elem.cc:65
Mat3x3 GetRotRel(const ReferenceFrame &rf)
Definition: mbpar.cc:1795
Vec3 LPrimeRef
Definition: beam2.h:370
Mat3x3 MultRMRt(const Mat3x3 &m, const Mat3x3 &R)
Definition: matvec3.cc:1162
void Update(const VectorHandler &XCurr, InverseDynamics::Order iOrder=InverseDynamics::INVERSE_DYNAMICS)
Definition: beam2.cc:924
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
Mat3x3 RRef
Definition: beam2.h:93
Vec3 Omega
Definition: beam2.h:103
Vec6 Az
Definition: beam2.h:107
Vec3 OmegaRef
Definition: beam2.h:104
const Vec3 Zero3(0., 0., 0.)
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
const Param_Manip Param
Definition: matvec3.cc:644
std::ostream & Write(std::ostream &out, const char *sFill=" ") const
Definition: matvec3.cc:738
Vec3 MultRV(const Vec3 &v, const Mat3x3 &R)
Definition: matvec3.cc:1144
long int flag
Definition: mbdyn.h:43
virtual const Mat3x3 & GetRRef(void) const
Definition: strnode.h:1006
virtual bool bToBeOutput(void) const
Definition: output.cc:890
ConstitutiveLaw< T, Tder > * pGetConstLaw(void) const
Definition: constltp.h:278
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
virtual void DsDxi(void)
Definition: beam2.cc:230
Definition: matvec3.h:98
virtual doublereal dGetPrivData(unsigned int i) const
Definition: beam2.cc:1306
#define DEBUGCOUTFNAME(fname)
Definition: myassert.h:256
virtual void ResizeReset(integer)
Definition: vh.cc:55
virtual integer GetInt(integer iDefval=0)
Definition: parser.cc:1050
const Vec3 & GetVec2(void) const
Definition: matvec6.h:76
const MatCross_Manip MatCross
Definition: matvec3.cc:639
bool UseNetCDF(int out) const
Definition: output.cc:491
Mat3x3 RPrev
Definition: beam2.h:94
virtual const Vec3 & GetgCurr(void) const
Definition: strnode.h:982
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
Mat3x3 GetRotAbs(const ReferenceFrame &rf)
Definition: mbpar.cc:1857
virtual Node::Type GetNodeType(void) const
Definition: strnode.cc:145
Vec3 L
Definition: beam2.h:120
void SetValue(DataManager *pDM, VectorHandler &, VectorHandler &, SimulationEntity::Hints *ph=0)
Definition: beam2.cc:543
doublereal Dot(const Vec3 &v) const
Definition: matvec3.h:243
bool bIsErgonomy(void) const
Definition: elem.cc:83
void Add(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:209
Vec3 L0
Definition: beam2.h:119
ConstitutiveLawOwner< Vec6, Mat6x6 > ConstitutiveLaw6DOwner
Definition: constltp.h:380
std::ostream & Write(std::ostream &out, const FullMatrixHandler &m, const char *s, const char *s2)
Definition: fullmh.cc:376
Definition: beam2.h:50
virtual void GetMat6xN(Mat3xN &m1, Mat3xN &m2, integer iNumCols)
Definition: mbpar.cc:2743
const StructNode * pNode[NUMNODES]
Definition: beam2.h:83
virtual const Tder & GetFDE(void) const
Definition: constltp.h:129
virtual VariableSubMatrixHandler & InitialAssJac(VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
Definition: beam2.cc:804
virtual void Sub(integer iRow, const Vec3 &v)
Definition: vh.cc:78
const Tder & GetFDE(void) const
Definition: constltp.h:298
const Mat3x3 Eye3(1., 0., 0., 0., 1., 0., 0., 0., 1.)
OrientationDescription
Definition: matvec3.h:1597
Mat3x3 RNode[NUMNODES]
Definition: beam2.h:88
virtual const Vec3 & GetWRef(void) const
Definition: strnode.h:1024
Mat3x3 mb_deye< Mat3x3 >(const doublereal d)
Definition: matvec3.h:1584
#define NO_OP
Definition: myassert.h:74
std::vector< Hint * > Hints
Definition: simentity.h:89
Vec6 DefLoc
Definition: beam2.h:110
OrientationDescription od
Definition: beam2.h:69
void SetInverseDynamicsFlags(unsigned uIDF)
Definition: elem.cc:71
static const unsigned int iNumPrivData
Definition: beam.h:100
Vec3 GetVec(unsigned short int i) const
Definition: matvec3.h:893
Vec3 VecRot(const Mat3x3 &Phi)
Definition: Rot.cc:136
virtual bool GetYesNoOrBool(bool bDefval=false)
Definition: parser.cc:1038
Vec3 LRef
Definition: beam2.h:122
virtual Beam::Type GetBeamType(void) const
Definition: beam2.h:207
Vec3 MulTV(const Vec3 &v) const
Definition: matvec3.cc:482
virtual Vec3 InterpState(const Vec3 &v1, const Vec3 &v2)
Definition: beam2.cc:208
virtual SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: beam2.cc:517
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
const Mat3x3 Zero3x3(0., 0., 0., 0., 0., 0., 0., 0., 0.)
virtual SubVectorHandler & InitialAssRes(SubVectorHandler &WorkVec, const VectorHandler &XCurr)
Definition: beam2.cc:830
Vec6 AzRef
Definition: beam2.h:108
Mat6x6 ERef
Definition: beam2.h:376
bool bFirstRes
Definition: beam2.h:127
virtual bool bInverseDynamics(void) const
Definition: beam2.cc:867
Mat3x3 R
Definition: beam2.h:92
const ReferenceFrame AbsRefFrame(0, Vec3(0., 0., 0), Mat3x3(1., 0., 0., 0., 1., 0., 0., 0., 1.), Vec3(0., 0., 0), Vec3(0., 0., 0), EULER_123)
Definition: matvec6.h:37
const Vec3 & GetVec1(void) const
Definition: matvec6.h:72
ConstitutiveLaw6DOwner * pD
Definition: beam2.h:97
Vec3 MatR2EulerAngles313(const Mat3x3 &R)
Definition: matvec3.cc:927
Elem * ReadBeam2(DataManager *pDM, MBDynParser &HP, unsigned int uLabel)
Definition: beam2.cc:1329
const doublereal dN2[2]
Definition: shapefnc.cc:52
void SubMat12(const Mat3x3 &x)
Definition: matvec6.h:416
Vec3 GetPosRel(const ReferenceFrame &rf)
Definition: mbpar.cc:1331
Vec6 DefPrimeLoc
Definition: beam2.h:115
virtual ConstLawType::Type GetConstLawType(void) const =0
void SubMat22(const Mat3x3 &x)
Definition: matvec6.h:420
Definition: mbdyn.h:76
virtual bool IsKeyWord(const char *sKeyWord)
Definition: parser.cc:910
Vec3 p
Definition: beam2.h:117
const Vec6 Zero6(0., 0., 0., 0., 0., 0.)
Vec6 DefPrimeLocRef
Definition: beam2.h:374
const MatG_Manip MatG
Definition: matvec3.cc:646
long GetCurrentStep(void) const
Definition: output.h:116
const doublereal & dGet(unsigned short int iRow) const
Definition: matvec3.h:285
Mat6x6 DRef
Definition: beam2.h:100
virtual void AssStiffnessMat(FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: beam2.cc:330
virtual doublereal dGetPrivData(unsigned int i) const
Definition: beam2.cc:164
#define DEBUGCOUT(msg)
Definition: myassert.h:232
Vec3 MatR2EulerAngles123(const Mat3x3 &R)
Definition: matvec3.cc:893
Definition: mbdyn.h:77
virtual void AfterConvergence(const VectorHandler &X, const VectorHandler &XP)
Definition: beam2.cc:972
unsigned uOutputFlags
Definition: beam2.h:68
virtual void AfterPredict(VectorHandler &, VectorHandler &)
Definition: beam2.cc:565
virtual void Omega0(void)
Definition: beam2.cc:264
virtual integer iGetFirstMomentumIndex(void) const =0
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
const doublereal dRaDegr
Definition: matvec3.cc:884
doublereal dsdxi
Definition: beam2.h:124
virtual const StructNode * pGetNode(unsigned int i) const
Definition: beam2.cc:852
bool IsOpen(int out) const
Definition: output.cc:395
Type
Definition: beam.h:64
void AfterConvergence(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:288
const MatR_Manip MatR
Definition: matvec3.cc:645
#define ASSERT(expression)
Definition: colamd.c:977
virtual unsigned int iGetNumPrivData(void) const
Definition: beam2.cc:147
const doublereal dN2P[2]
Definition: shapefnc.cc:56
ConstitutiveLaw6D * GetConstLaw6D(ConstLawType::Type &clt)
Definition: mbpar.cc:1995
static unsigned int iGetPrivDataIdx_int(const char *s, ConstLawType::Type type)
Definition: beam.cc:269
void SetValue(DataManager *pDM, VectorHandler &, VectorHandler &, SimulationEntity::Hints *ph=0)
Definition: beam2.cc:1198
GradientExpression< UnaryExpr< FuncSqrt, Expr > > sqrt(const GradientExpression< Expr > &u)
Definition: gradient.h:2974
Mat3x3 MulTM(const Mat3x3 &m) const
Definition: matvec3.cc:500
VectorExpression< VectorCrossExpr< VectorLhsExpr, VectorRhsExpr >, 3 > Cross(const VectorExpression< VectorLhsExpr, 3 > &u, const VectorExpression< VectorRhsExpr, 3 > &v)
Definition: matvec.h:3248
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
virtual void Add(integer iRow, const Vec3 &v)
Definition: vh.cc:63
void Resize(integer ns)
Definition: matvec3n.cc:318
virtual void AssStiffnessMat(FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: beam2.cc:983
virtual void ResizeReset(integer, integer)
Definition: submat.cc:182
void ReadOptionalBeamCustomOutput(DataManager *pDM, MBDynParser &HP, unsigned int uLabel, Beam::Type BT, unsigned &uFlags, OrientationDescription &od)
Definition: beam.cc:1863
virtual unsigned int iGetNumDof(void) const
Definition: constltp.h:138
const MatCrossCross_Manip MatCrossCross
Definition: matvec3.cc:640
virtual void AssStiffnessVec(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: beam2.cc:1092
const doublereal * pGetMat(void) const
Definition: matvec3.h:743
std::ostream & Beams(void) const
Definition: output.h:457
virtual bool IsArg(void)
Definition: parser.cc:807
Definition: elem.h:75
void PutRowIndex(integer iSubRow, integer iRow)
Definition: submat.h:311
const T & GetF(void) const
Definition: constltp.h:293
Vec6 DefLocPrev
Definition: beam2.h:112
const doublereal * pGetVec(void) const
Definition: matvec3.h:192
virtual const Vec3 & GetgRef(void) const
Definition: strnode.h:976
std::ostream & GetLogFile(void) const
Definition: dataman.h:326
virtual flag fToBeOutput(void) const
Definition: output.cc:884
Vec3 MatR2EulerAngles321(const Mat3x3 &R)
Definition: matvec3.cc:941
virtual const Vec3 & GetgPCurr(void) const
Definition: strnode.h:994
virtual std::ostream & Restart(std::ostream &out) const
Definition: beam2.cc:299
Vec6 AzLoc
Definition: beam2.h:109
virtual void AssStiffnessVec(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: beam2.cc:408
virtual Vec3 InterpDeriv(const Vec3 &v1, const Vec3 &v2)
Definition: beam2.cc:219
virtual const Vec3 & GetVCurr(void) const
Definition: strnode.h:322
virtual void AddInternalForces(Vec6 &)
Definition: beam2.h:154
void Sub(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:215
#define SAFENEWARR(pnt, item, sz)
Definition: mynewmem.h:701
virtual void Output(OutputHandler &OH) const
Definition: beam2.cc:712
virtual const Vec3 & GetgPRef(void) const
Definition: strnode.h:988
virtual void AfterPredict(VectorHandler &, VectorHandler &)
Definition: beam2.cc:1221
double doublereal
Definition: colamd.c:52
const Tder & GetFDEPrime(void) const
Definition: constltp.h:303
long int integer
Definition: colamd.c:51
virtual HighParser::ErrOut GetLineData(void) const
Definition: parsinc.cc:697
void Update(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:283
virtual VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: beam2.cc:485
bool bFirstIDRes
Definition: beam2.h:128
unsigned int GetLabel(void) const
Definition: withlab.cc:62
Vec6 DefLocRef
Definition: beam2.h:111
virtual void AfterConvergence(const VectorHandler &X, const VectorHandler &XP)
Definition: beam2.cc:321
Node * ReadNode(MBDynParser &HP, Node::Type type) const
Definition: dataman3.cc:2309
const doublereal & dGet(unsigned short int i) const
Definition: matvec6.h:182
#define DEBUGLCOUT(level, msg)
Definition: myassert.h:244
Beam2(unsigned int uL, const StructNode *pN1, const StructNode *pN2, const Vec3 &F1, const Vec3 &F2, const Mat3x3 &R1, const Mat3x3 &R2, const Mat3x3 &r, const ConstitutiveLaw6D *pd, OrientationDescription ood, flag fOut)
Definition: beam2.cc:65
virtual std::ostream & Restart_(std::ostream &out) const
Definition: beam2.cc:305
Mat3x3 R
virtual ~Beam2(void)
Definition: beam2.cc:137
bool UseText(int out) const
Definition: output.cc:446
Vec3 f[NUMNODES]
Definition: beam2.h:86
bool bIsInverseDynamics(void) const
Definition: dataman.h:493
Vec3 g
Definition: beam2.h:118
#define SAFEDELETE(pnt)
Definition: mynewmem.h:710
virtual void OutputPrepare(OutputHandler &OH)
Definition: beam2.cc:625