MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
autostr.cc
Go to the documentation of this file.
1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/mbdyn/struct/autostr.cc,v 1.56 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 #include "mbconfig.h" /* This goes first in every *.c,*.cc file */
33 
34 #include <cmath>
35 #include <cfloat>
36 
37 #include "autostr.h"
38 
39 /* AutomaticStructDispElem - begin */
40 
41 /* Costruttore */
43 : Elem(pN->GetLabel(), pN->fToBeOutput()),
44 pNode(const_cast<DynamicStructDispNode *>(pN)), B(Zero3), BP(Zero3),
45 m(0.)
46 {
47  pNode->SetAutoStr(this);
48 }
49 
50 void
52 {
53  if (m == 0.) {
54  XPP = Zero3;
55  return;
56  }
57 
58  XPP = BP/m;
59 }
60 
61 void
63 {
64  m += dm;
65 }
66 
67 /* inizializza i dati */
68 void
70 {
71  B = b;
72  BP = bp;
73 }
74 
75 
76 /* Scrive il contributo dell'elemento al file di restart */
77 std::ostream&
78 AutomaticStructDispElem::Restart(std::ostream& out) const
79 {
80  out << "automatic structural displacement: " << GetLabel() << ", "
81  "reference, global, ", B.Write(out, ", ") << ", "
82  "reference, global, ", BP.Write(out, ", ") << ";" << std::endl;
83 
84  return out;
85 }
86 
87 
88 /* assemblaggio jacobiano */
91  doublereal dCoef,
92  const VectorHandler& /* XCurr */ ,
93  const VectorHandler& /* XPrimeCurr */ )
94 {
95  DEBUGCOUTFNAME("AutomaticStructElem::AssJac");
96 
97  /* Casting di WorkMat */
98  SparseSubMatrixHandler& WM = WorkMat.SetSparse();
99 
100  /* Dimensiona e resetta la matrice di lavoro */
101  integer iCoefs = 6;
102  const RigidBodyKinematics *pRBK = pNode->pGetRBK();
103  if (pRBK) {
104  iCoefs += 6;
105  }
106  WM.ResizeReset(iCoefs, 0);
107 
108  /* Setta gli indici della matrice - le incognite sono ordinate come:
109  * - posizione (3)
110  * - parametri di rotazione (3)
111  * - quantita' di moto (3)
112  * - momento della quantita' di moto
113  * e gli indici sono consecutivi. La funzione pGetFirstPositionIndex()
114  * ritorna il valore del primo indice -1, in modo che l'indice i-esimo
115  * e' dato da iGetFirstPositionIndex()+i
116  */
117  integer iFirstPositionIndex = pNode->iGetFirstPositionIndex();
118  integer iFirstMomentumIndex = pNode->iGetFirstMomentumIndex();
119 
120  for (int iCnt = 1; iCnt <= 3; iCnt++) {
121  WM.PutItem(iCnt, iFirstPositionIndex + iCnt,
122  iFirstMomentumIndex + iCnt, -dCoef);
123  WM.PutItem(3 + iCnt, iFirstMomentumIndex + iCnt,
124  iFirstMomentumIndex + iCnt, 1.);
125  }
126 
127  // relative frame dynamics contribution
128  // (see tecman, "Dynamics in a Relative Reference Frame")
129  if (pRBK) {
130  const Vec3& W0 = pRBK->GetW();
131 
132  WM.PutCross(7, iFirstMomentumIndex,
133  iFirstMomentumIndex, W0*(2.*dCoef));
134  }
135 
136  return WorkMat;
137 }
138 
139 
140 /* assemblaggio autoval */
141 void
143  VariableSubMatrixHandler& WorkMatB,
144  const VectorHandler& /* XCurr */ ,
145  const VectorHandler& /* XPrimeCurr */ )
146 {
147  DEBUGCOUTFNAME("AutomaticStructElem::AssMats");
148 
149  /* Casting di WorkMat */
150  SparseSubMatrixHandler& WMA = WorkMatA.SetSparse();
151  SparseSubMatrixHandler& WMB = WorkMatB.SetSparse();
152 
153  /* Dimensiona e resetta la matrice di lavoro */
154  WMA.ResizeReset(3, 0);
155  WMB.ResizeReset(3, 0);
156 
157  /* Setta gli indici della matrice - le incognite sono ordinate come:
158  * - posizione (3)
159  * - parametri di rotazione (3)
160  * - quantita' di moto (3)
161  * - momento della quantita' di moto
162  * e gli indici sono consecutivi. La funzione pGetFirstPositionIndex()
163  * ritorna il valore del primo indice -1, in modo che l'indice i-esimo
164  * e' dato da iGetFirstPositionIndex()+i
165  */
166  integer iFirstPositionIndex = pNode->iGetFirstPositionIndex();
167  integer iFirstMomentumIndex = pNode->iGetFirstMomentumIndex();
168 
169  for (int iCnt = 1; iCnt <= 3; iCnt++) {
170  WMA.PutItem(iCnt, iFirstPositionIndex + iCnt,
171  iFirstMomentumIndex + iCnt, -1.);
172  WMB.PutItem(iCnt, iFirstMomentumIndex + iCnt,
173  iFirstMomentumIndex + iCnt, 1.);
174  }
175 }
176 
177 
178 /* assemblaggio residuo */
181  doublereal /* dCoef */ ,
182  const VectorHandler& XCurr,
183  const VectorHandler& XPrimeCurr)
184 {
185  DEBUGCOUTFNAME("AutomaticStructElem::AssRes");
186 
187  WorkVec.ResizeReset(6);
188 
189  integer iFirstPositionIndex = pNode->iGetFirstPositionIndex();
190  integer iFirstMomentumIndex = pNode->iGetFirstMomentumIndex();
191  for (integer iCnt = 1; iCnt <= 3; iCnt++) {
192  WorkVec.PutRowIndex(iCnt, iFirstPositionIndex + iCnt);
193  WorkVec.PutRowIndex(3 + iCnt, iFirstMomentumIndex + iCnt);
194  }
195 
196  /* Collects data */
197  B = Vec3(XCurr, iFirstMomentumIndex + 1);
198  BP = Vec3(XPrimeCurr, iFirstMomentumIndex + 1);
199 
200  /*
201  * Momentum and momenta moment (about node):
202  *
203  * B = m V + W /\ S
204  *
205  * G = S /\ V + J W
206  *
207  * Bp = F
208  *
209  * Gp + V /\ B = M
210  */
211  WorkVec.Add(1, B);
212  WorkVec.Sub(4, BP);
213 
214  // relative frame dynamics contribution
215  // (see tecman, "Dynamics in a Relative Reference Frame")
216  const RigidBodyKinematics *pRBK = pNode->pGetRBK();
217  if (pRBK) {
218  const Vec3& W0 = pRBK->GetW();
219 
220  WorkVec.Sub(4, W0.Cross(B*2.));
221  }
222 
223  // reset instantaneous inertia properties
224  m = 0.;
225 
226  return WorkVec;
227 }
228 
229 
230 void
232 {
233  if (bToBeOutput()) {
234 #ifdef USE_NETCDF
237 
238  std::ostringstream os;
239  os << "node.struct." << GetLabel() << ".";
240 
241  std::string name(os.str());
242 
243  Var_B = OH.CreateVar<Vec3>(name + "B", "kg m/s", "momentum (X, Y, Z)");
244  Var_G = OH.CreateVar<Vec3>(name + "G", "kg m^2/s", "momenta moment (X, Y, Z)");
245  Var_BP = OH.CreateVar<Vec3>(name + "BP", "kg m/s^2", "momentum derivative (X, Y, Z)");
246  Var_GP = OH.CreateVar<Vec3>(name + "GP", "kg m^2/s^2", "momenta moment derivative (X, Y, Z)");
247  }
248 #endif // USE_NETCDF
249  }
250 }
251 
252 void
254 {
255  if (bToBeOutput()) {
256 #ifdef USE_NETCDF
258  Var_B->put_rec(B.pGetVec(), OH.GetCurrentStep());
259  Var_G->put_rec(::Zero3.pGetVec(), OH.GetCurrentStep());
260  Var_BP->put_rec(BP.pGetVec(), OH.GetCurrentStep());
261  Var_GP->put_rec(::Zero3.pGetVec(), OH.GetCurrentStep());
262  }
263 #endif /* USE_NETCDF */
264 
266  OH.Inertia() << std::setw(8) << GetLabel()
267  << " " << B
268  << " " << ::Zero3
269  << " " << BP
270  << " " << ::Zero3
271  << std::endl;
272  }
273  }
274 }
275 
276 /* Setta i valori iniziali delle variabili (e fa altre cose)
277  * prima di iniziare l'integrazione */
278 void
280  VectorHandler& /* X */ , VectorHandler& XP,
282 {
284 
285  XP.Put(iIndex + 1, BP);
286 }
287 
288 /* Dati privati */
289 unsigned int
291 {
292  return 13;
293 }
294 
295 unsigned int
297 {
298  /*
299  * beta[1]
300  * beta[2]
301  * beta[3]
302  * gamma[1]
303  * gamma[2]
304  * gamma[3]
305  * betaP[1]
306  * betaP[2]
307  * betaP[3]
308  * gammaP[1]
309  * gammaP[2]
310  * gammaP[3]
311  * KE
312  */
313  unsigned int idx = 0;
314  if (strcmp(s, "KE") == 0) {
315  return 13;
316 
317  } else if (strncmp(s, "beta", STRLENOF("beta")) == 0) {
318  s += STRLENOF("beta");
319 
320  } else if (strncmp(s, "gamma", STRLENOF("gamma")) == 0) {
321  s += STRLENOF("gamma");
322  idx += 3;
323 
324  } else {
325  return 0;
326  }
327 
328  if (s[0] == 'P') {
329  s++;
330  idx += 6;
331  }
332 
333  if (s[0] != '[') {
334  return 0;
335  }
336  s++;
337 
338  switch (s[0]) {
339  case '1':
340  case '2':
341  case '3':
342  idx += s[0] - '0';
343  s++;
344  break;
345 
346  default:
347  return 0;
348  }
349 
350  if (s[0] != ']' && s[1] != '\0') {
351  return 0;
352  }
353 
354  return idx;
355 }
356 
359 {
360  if (i == 13) {
361  return (B*pNode->GetVCurr())/2;
362  }
363 
364  unsigned int der = (i - 1)/6;
365  i -= 6*der;
366  unsigned int type = (i - 1)/3;
367  i -= 3*type;
368 
369  if (der) {
370  if (type) {
371  return 0.;
372  }
373  return BP(i);
374 
375  } else {
376  if (type) {
377  return 0.;
378  }
379  return B(i);
380  }
381 }
382 
383 /* AutomaticStructDispElem - end */
384 
385 
386 /* AutomaticStructElem - begin */
387 
388 /* Costruttore */
390 : Elem(pN->GetLabel(), (pN->fToBeOutput() & StructDispNode::OUTPUT_INERTIA) == StructDispNode::OUTPUT_INERTIA),
392 G(Zero3), GP(Zero3),
393 S(Zero3), J(Zero3x3)
394 {
395  ASSERT(dynamic_cast<const DynamicStructNode *>(pNode) != 0);
396  pNode->SetAutoStr(this);
397 }
398 
399 void
401 {
402  if (m == 0.) {
403  XPP = Zero3;
404  WP = Zero3;
405  return;
406  }
407 
408  Vec3 Xcg = S/m;
409  Mat3x3 Jcg = J + Mat3x3(MatCrossCross, Xcg, S);
410  const Vec3& V = pNode->GetVCurr();
411  const Vec3& W = dynamic_cast<const DynamicStructNode *>(pNode)->GetWCurr();
412  ASSERT(Jcg.IsSymmetric()); // NOTE: should be a run time test
413  WP = Jcg.LDLSolve(GP - Xcg.Cross(BP) - W.Cross(Jcg*W) + V.Cross(B));
414  XPP = (BP - WP.Cross(S) - W.Cross(W.Cross(S)))/m;
415 }
416 
417 void
419  const Mat3x3& dJ)
420 {
421  m += dm;
422  S += dS;
423  J += dJ;
424 }
425 
426 /* inizializza i dati */
427 void
429  const Vec3& bp, const Vec3& gp)
430 {
431  B = b;
432  G = g;
433  BP = bp;
434  GP = gp;
435 }
436 
437 
438 /* Scrive il contributo dell'elemento al file di restart */
439 std::ostream&
440 AutomaticStructElem::Restart(std::ostream& out) const
441 {
442  out << "automatic structural: " << GetLabel() << ", "
443  "reference, global, ", B.Write(out, ", ") << ", "
444  "reference, global, ", G.Write(out, ", ") << ", "
445  "reference, global, ", BP.Write(out, ", ") << ", "
446  "reference, global, ", GP.Write(out, ", ") << ";" << std::endl;
447 
448  return out;
449 }
450 
451 
452 /* assemblaggio jacobiano */
455  doublereal dCoef,
456  const VectorHandler& /* XCurr */ ,
457  const VectorHandler& /* XPrimeCurr */ )
458 {
459  DEBUGCOUTFNAME("AutomaticStructElem::AssJac");
460 
461  /* Casting di WorkMat */
462  SparseSubMatrixHandler& WM = WorkMat.SetSparse();
463 
464  /* Dimensiona e resetta la matrice di lavoro */
465  integer iCoefs = 24;
466  const RigidBodyKinematics *pRBK = pNode->pGetRBK();
467  if (pRBK) {
468  iCoefs += 12;
469  }
470  WM.ResizeReset(iCoefs, 0);
471 
472  /* Setta gli indici della matrice - le incognite sono ordinate come:
473  * - posizione (3)
474  * - parametri di rotazione (3)
475  * - quantita' di moto (3)
476  * - momento della quantita' di moto
477  * e gli indici sono consecutivi. La funzione pGetFirstPositionIndex()
478  * ritorna il valore del primo indice -1, in modo che l'indice i-esimo
479  * e' dato da iGetFirstPositionIndex()+i
480  */
481  integer iFirstPositionIndex = pNode->iGetFirstPositionIndex();
482  integer iFirstMomentumIndex = pNode->iGetFirstMomentumIndex();
483 
484  for (int iCnt = 1; iCnt <= 6; iCnt++) {
485  WM.PutItem(iCnt, iFirstPositionIndex + iCnt,
486  iFirstMomentumIndex + iCnt, -dCoef);
487  WM.PutItem(6+iCnt, iFirstMomentumIndex + iCnt,
488  iFirstMomentumIndex + iCnt, 1.);
489  }
490 
491  WM.PutCross(13, iFirstMomentumIndex + 3,
492  iFirstMomentumIndex, pNode->GetVCurr()*dCoef);
493  WM.PutCross(19, iFirstMomentumIndex + 3,
494  iFirstPositionIndex, -B);
495 
496  // relative frame dynamics contribution
497  // (see tecman, "Dynamics in a Relative Reference Frame")
498  if (pRBK) {
499  const Vec3& W0 = pRBK->GetW();
500 
501  WM.PutCross(25, iFirstMomentumIndex,
502  iFirstMomentumIndex, W0*(2.*dCoef));
503  WM.PutCross(31, iFirstMomentumIndex + 3,
504  iFirstMomentumIndex + 3, W0*dCoef);
505  }
506 
507  return WorkMat;
508 }
509 
510 
511 /* assemblaggio autoval */
512 void
514  VariableSubMatrixHandler& WorkMatB,
515  const VectorHandler& /* XCurr */ ,
516  const VectorHandler& /* XPrimeCurr */ )
517 {
518  DEBUGCOUTFNAME("AutomaticStructElem::AssMats");
519 
520  /* Casting di WorkMat */
521  SparseSubMatrixHandler& WMA = WorkMatA.SetSparse();
522  SparseSubMatrixHandler& WMB = WorkMatB.SetSparse();
523 
524  /* Dimensiona e resetta la matrice di lavoro */
525  WMA.ResizeReset(12, 0);
526  WMB.ResizeReset(12, 0);
527 
528  /* Setta gli indici della matrice - le incognite sono ordinate come:
529  * - posizione (3)
530  * - parametri di rotazione (3)
531  * - quantita' di moto (3)
532  * - momento della quantita' di moto
533  * e gli indici sono consecutivi. La funzione pGetFirstPositionIndex()
534  * ritorna il valore del primo indice -1, in modo che l'indice i-esimo
535  * e' dato da iGetFirstPositionIndex()+i
536  */
537  integer iFirstPositionIndex = pNode->iGetFirstPositionIndex();
538  integer iFirstMomentumIndex = pNode->iGetFirstMomentumIndex();
539 
540  for (int iCnt = 1; iCnt <= 6; iCnt++) {
541  WMA.PutItem(iCnt, iFirstPositionIndex + iCnt,
542  iFirstMomentumIndex + iCnt, -1.);
543  WMB.PutItem(iCnt, iFirstMomentumIndex + iCnt,
544  iFirstMomentumIndex + iCnt, 1.);
545  }
546 
547  WMA.PutCross(7, iFirstMomentumIndex + 3, iFirstMomentumIndex,
548  pNode->GetVCurr());
549  WMB.PutCross(7, iFirstMomentumIndex + 3, iFirstPositionIndex, -B);
550 }
551 
552 
553 /* assemblaggio residuo */
556  doublereal /* dCoef */ ,
557  const VectorHandler& XCurr,
558  const VectorHandler& XPrimeCurr)
559 {
560  DEBUGCOUTFNAME("AutomaticStructElem::AssRes");
561 
562  WorkVec.ResizeReset(12);
563 
564  integer iFirstPositionIndex = pNode->iGetFirstPositionIndex();
565  integer iFirstMomentumIndex = pNode->iGetFirstMomentumIndex();
566  for (integer iCnt = 1; iCnt <= 12; iCnt++) {
567  WorkVec.PutRowIndex(iCnt, iFirstPositionIndex + iCnt);
568  }
569 
570  /* Collects data */
571  B = Vec3(XCurr, iFirstMomentumIndex + 1);
572  G = Vec3(XCurr, iFirstMomentumIndex + 4);
573  BP = Vec3(XPrimeCurr, iFirstMomentumIndex + 1);
574  GP = Vec3(XPrimeCurr, iFirstMomentumIndex + 4);
575 
576  /*
577  * Momentum and momenta moment (about node):
578  *
579  * B = m V + W /\ S
580  *
581  * G = S /\ V + J W
582  *
583  * Bp = F
584  *
585  * Gp + V /\ B = M
586  */
587  WorkVec.Add(1, B);
588  WorkVec.Add(4, G);
589  WorkVec.Sub(7, BP);
590  WorkVec.Sub(10, GP + pNode->GetVCurr().Cross(B));
591 
592  // relative frame dynamics contribution
593  // (see tecman, "Dynamics in a Relative Reference Frame")
594  const RigidBodyKinematics *pRBK = pNode->pGetRBK();
595  if (pRBK) {
596  const Vec3& W0 = pRBK->GetW();
597 
598  WorkVec.Sub(7, W0.Cross(B*2.));
599  WorkVec.Sub(10, W0.Cross(G));
600  }
601 
602  // reset instantaneous inertia properties
603  m = 0.;
604  S = Zero3;
605  J = Zero3x3;
606 
607  return WorkVec;
608 }
609 
610 
611 void
613 {
614  if (bToBeOutput()) {
615 #ifdef USE_NETCDF
618 
619  std::ostringstream os;
620  os << "node.struct." << GetLabel() << ".";
621 
622  std::string name(os.str());
623 
624  Var_B = OH.CreateVar<Vec3>(name + "B", "kg m/s", "momentum (X, Y, Z)");
625  Var_G = OH.CreateVar<Vec3>(name + "G", "kg m^2/s", "momenta moment (X, Y, Z)");
626  Var_BP = OH.CreateVar<Vec3>(name + "BP", "kg m/s^2", "momentum derivative (X, Y, Z)");
627  Var_GP = OH.CreateVar<Vec3>(name + "GP", "kg m^2/s^2", "momenta moment derivative (X, Y, Z)");
628  }
629 #endif // USE_NETCDF
630  }
631 }
632 
633 void
635 {
636  if (bToBeOutput()) {
637 #ifdef USE_NETCDF
639  Var_B->put_rec(B.pGetVec(), OH.GetCurrentStep());
640  Var_G->put_rec(G.pGetVec(), OH.GetCurrentStep());
641  Var_BP->put_rec(BP.pGetVec(), OH.GetCurrentStep());
642  Var_GP->put_rec(GP.pGetVec(), OH.GetCurrentStep());
643  }
644 #endif /* USE_NETCDF */
645 
647  OH.Inertia() << std::setw(8) << GetLabel()
648  << " " << B
649  << " " << G
650  << " " << BP
651  << " " << GP
652  << std::endl;
653  }
654  }
655 }
656 
657 /* Setta i valori iniziali delle variabili (e fa altre cose)
658  * prima di iniziare l'integrazione */
659 void
661  VectorHandler& /* X */ , VectorHandler& XP,
663 {
665 
666  XP.Put(iIndex + 1, BP);
667  XP.Put(iIndex + 4, GP);
668 }
669 
670 /* Dati privati */
671 unsigned int
673 {
674  return 13;
675 }
676 
677 unsigned int
679 {
680  /*
681  * beta[1]
682  * beta[2]
683  * beta[3]
684  * gamma[1]
685  * gamma[2]
686  * gamma[3]
687  * betaP[1]
688  * betaP[2]
689  * betaP[3]
690  * gammaP[1]
691  * gammaP[2]
692  * gammaP[3]
693  * KE
694  */
695  unsigned int idx = 0;
696  if (strcmp(s, "KE") == 0) {
697  return 13;
698 
699  } else if (strncmp(s, "beta", STRLENOF("beta")) == 0) {
700  s += STRLENOF("beta");
701 
702  } else if (strncmp(s, "gamma", STRLENOF("gamma")) == 0) {
703  s += STRLENOF("gamma");
704  idx += 3;
705 
706  } else {
707  return 0;
708  }
709 
710  if (s[0] == 'P') {
711  s++;
712  idx += 6;
713  }
714 
715  if (s[0] != '[') {
716  return 0;
717  }
718  s++;
719 
720  switch (s[0]) {
721  case '1':
722  case '2':
723  case '3':
724  idx += s[0] - '0';
725  s++;
726  break;
727 
728  default:
729  return 0;
730  }
731 
732  if (s[0] != ']' && s[1] != '\0') {
733  return 0;
734  }
735 
736  return idx;
737 }
738 
741 {
742  if (i == 13) {
743  const StructNode *pSN = dynamic_cast<const StructNode *>(pNode);
744  return (B*pSN->GetVCurr() + G*pSN->GetWCurr())/2;
745  }
746 
747  unsigned int der = (i - 1)/6;
748  i -= 6*der;
749  unsigned int type = (i - 1)/3;
750  i -= 3*type;
751 
752  if (der) {
753  if (type) {
754  return GP(i);
755  }
756  return BP(i);
757 
758  } else {
759  if (type) {
760  return G(i);
761  }
762  return B(i);
763  }
764 }
765 
766 /* AutomaticStructElem - end */
767 
virtual void Output(OutputHandler &OH) const
Definition: autostr.cc:253
const Vec3 Zero3(0., 0., 0.)
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
std::ostream & Write(std::ostream &out, const char *sFill=" ") const
Definition: matvec3.cc:738
virtual void SetValue(DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)
Definition: autostr.cc:660
virtual bool bToBeOutput(void) const
Definition: output.cc:890
Definition: matvec3.h:98
#define DEBUGCOUTFNAME(fname)
Definition: myassert.h:256
virtual void ResizeReset(integer)
Definition: vh.cc:55
virtual SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: autostr.cc:180
void Init(const Vec3 &b, const Vec3 &bp)
Definition: autostr.cc:69
bool UseNetCDF(int out) const
Definition: output.cc:491
virtual void Sub(integer iRow, const Vec3 &v)
Definition: vh.cc:78
std::ostream & Inertia(void) const
Definition: output.h:436
virtual doublereal dGetPrivData(unsigned int i) const
Definition: autostr.cc:740
virtual unsigned int iGetPrivDataIdx(const char *s) const
Definition: autostr.cc:296
void ResizeReset(integer iNewRow, integer iNewCol)
Definition: submat.cc:1084
void OutputPrepare(OutputHandler &OH)
Definition: autostr.cc:231
void PutCross(integer iSubIt, integer iFirstRow, integer iFirstCol, const Vec3 &v)
Definition: submat.cc:1236
std::vector< Hint * > Hints
Definition: simentity.h:89
virtual void AddInertia(const doublereal &dm)
Definition: autostr.cc:62
AutomaticStructDispElem(const DynamicStructDispNode *pN)
Definition: autostr.cc:42
virtual VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: autostr.cc:454
virtual void ComputeAccelerations(Vec3 &XPP) const
Definition: autostr.cc:51
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
const Mat3x3 Zero3x3(0., 0., 0., 0., 0., 0., 0., 0., 0.)
virtual void ComputeAccelerations(Vec3 &XPP, Vec3 &WP) const
Definition: autostr.cc:400
virtual void SetValue(DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)
Definition: autostr.cc:279
void OutputPrepare(OutputHandler &OH)
Definition: autostr.cc:612
void AssMats(VariableSubMatrixHandler &WorkMatA, VariableSubMatrixHandler &WorkMatB, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: autostr.cc:513
void PutItem(integer iSubIt, integer iRow, integer iCol, const doublereal &dCoef)
Definition: submat.h:997
virtual unsigned int iGetPrivDataIdx(const char *s) const
Definition: autostr.cc:678
virtual unsigned int iGetNumPrivData(void) const
Definition: autostr.cc:290
virtual void AddInertia(const doublereal &dm, const Vec3 &dS, const Mat3x3 &dJ)
Definition: autostr.cc:418
virtual void SetAutoStr(const AutomaticStructDispElem *p)
Definition: strnode.h:582
long GetCurrentStep(void) const
Definition: output.h:116
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
virtual SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: autostr.cc:555
bool IsOpen(int out) const
Definition: output.cc:395
#define ASSERT(expression)
Definition: colamd.c:977
const RigidBodyKinematics * pGetRBK(void) const
Definition: strnode.cc:152
DynamicStructDispNode * pNode
Definition: autostr.h:48
virtual std::ostream & Restart(std::ostream &out) const
Definition: autostr.cc:440
virtual void Add(integer iRow, const Vec3 &v)
Definition: vh.cc:63
void Init(const Vec3 &b, const Vec3 &g, const Vec3 &bp, const Vec3 &gp)
Definition: autostr.cc:428
Vec3 LDLSolve(const Vec3 &v) const
Definition: matvec3.cc:199
bool IsSymmetric(void) const
Definition: matvec3.h:1260
const MatCrossCross_Manip MatCrossCross
Definition: matvec3.cc:640
const doublereal dS
Definition: beamslider.cc:71
virtual void Put(integer iRow, const Vec3 &v)
Definition: vh.cc:93
#define STRLENOF(s)
Definition: mbdyn.h:166
AutomaticStructElem(const DynamicStructNode *pN)
Definition: autostr.cc:389
Definition: elem.h:75
virtual unsigned int iGetNumPrivData(void) const
Definition: autostr.cc:672
virtual const Vec3 & GetW(void) const =0
virtual doublereal dGetPrivData(unsigned int i) const
Definition: autostr.cc:358
const doublereal * pGetVec(void) const
Definition: matvec3.h:192
void AssMats(VariableSubMatrixHandler &WorkMatA, VariableSubMatrixHandler &WorkMatB, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: autostr.cc:142
virtual const Vec3 & GetVCurr(void) const
Definition: strnode.h:322
virtual VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: autostr.cc:90
virtual void Output(OutputHandler &OH) const
Definition: autostr.cc:634
SparseSubMatrixHandler & SetSparse(void)
Definition: submat.h:1178
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51
virtual std::ostream & Restart(std::ostream &out) const
Definition: autostr.cc:78
unsigned int GetLabel(void) const
Definition: withlab.cc:62
bool UseText(int out) const
Definition: output.cc:446
virtual integer iGetFirstMomentumIndex(void) const
Definition: strnode.h:602