194 const char* sKeyWords[] = {
196 "distance" "with" "offset",
203 "universal" "rotation",
206 "cardano" "rotation",
210 "revolute" "rotation",
214 "plane" "displacement",
215 "plane" "displacement" "pin",
219 "rod" "with" "offset",
221 "deformable" "hinge",
222 "deformable" "displacement" "hinge",
223 "deformable" "displacement" "joint",
224 "deformable" "joint",
225 "deformable" "axial" "joint",
227 "invariant" "deformable" "hinge",
228 "invariant" "deformable" "displacement" "joint",
229 "invariant" "deformable" "joint",
231 "angular" "velocity",
232 "linear" "acceleration",
233 "angular" "acceleration",
236 "drive" "displacement",
237 "drive" "displacement" "pin",
238 "imposed" "displacement",
239 "imposed" "displacement" "pin",
240 "imposed" "orientation",
242 "total" "internal" "reaction",
244 "total" "pin" "joint",
253 #endif // MBDYN_DEVEL
282 PLANEDISPLACEMENTPIN,
292 DEFORMABLEAXIALJOINT,
294 INVARIANTDEFORMABLEHINGE,
295 INVARIANTDEFORMABLEDISPJOINT,
296 INVARIANTDEFORMABLEJOINT,
304 DRIVEDISPLACEMENTPIN,
306 IMPOSEDDISPLACEMENTPIN,
309 TOTALINTERNALREACTION,
317 POINT_SURFACE_CONTACT,
320 #endif // MBDYN_DEVEL
332 if (CurrKeyWord >= 0) {
333 std::cout <<
"joint type: " << sKeyWords[CurrKeyWord] << std::endl;
339 bool bIsTorque(
true);
340 bool bIsPrescribedMotion(
true);
341 bool bIsErgonomy(
false);
342 bool bIsRightHandSide(
false);
344 switch (CurrKeyWord) {
377 silent_cerr(
"Joint(" << uLabel <<
"): "
378 "invalid StructNode(" << pNode1->
GetLabel() <<
") for node #1" << std::endl);
383 silent_cerr(
"Joint(" << uLabel <<
"): "
384 "invalid StructNode(" << pNode2->
GetLabel() <<
") for node #2" << std::endl);
395 - pN1->GetRCurr()*f1).
Norm();
400 pedantic_cout(
"Distance(" << uLabel <<
"): "
401 "length from nodes = " << l << std::endl);
419 pN1, pN2, f1, f2, pDC, fOut));
425 pNode1, pNode2, pDC, fOut));
429 out <<
"distance: " << uLabel
431 <<
" ", f1.Write(out,
" ")
433 <<
" ", f2.Write(out,
" ")
439 case DISTANCEWITHOFFSET:
444 #ifdef MBDYN_X_COMPATIBLE_INPUT
445 pedantic_cerr(
"Joint(" << uLabel <<
"): \"distance with offset\" "
446 "is deprecated; use \"distance\" instead" << std::endl);
455 #ifdef MBDYN_X_COMPATIBLE_INPUT
458 pedantic_cerr(
"Joint(" << uLabel <<
"): "
459 "missing keyword \"position\" at line "
464 #ifndef MBDYN_X_COMPATIBLE_INPUT
468 DEBUGCOUT(
"Offset 1: " << f1 << std::endl);
476 #ifdef MBDYN_X_COMPATIBLE_INPUT
479 pedantic_cerr(
"Joint(" << uLabel <<
"): "
480 "missing keyword \"position\" at line "
485 #ifndef MBDYN_X_COMPATIBLE_INPUT
489 DEBUGCOUT(
"Offset 2: " << f2 << std::endl);
495 <<
": driver data expected" << std::endl);
505 pedantic_cout(
"DistanceWithOffset(" << uLabel <<
"): "
506 "length from nodes = " << l << std::endl);
525 out <<
"distance: " << uLabel
527 <<
" ", f1.Write(out,
" ")
529 <<
" ", f2.Write(out,
" ")
548 #ifdef MBDYN_X_COMPATIBLE_INPUT
551 pedantic_cerr(
"Joint(" << uLabel <<
"): "
552 "missing keyword \"position\" at line "
560 #ifndef MBDYN_X_COMPATIBLE_INPUT
564 DEBUGCOUT(
"X0 =" << std::endl << X0 << std::endl);
570 #ifdef MBDYN_X_COMPATIBLE_INPUT
573 pedantic_cerr(
"Joint(" << uLabel <<
"): "
574 "missing keyword \"orientation\" at line "
582 #ifndef MBDYN_X_COMPATIBLE_INPUT
586 DEBUGCOUT(
"R0 =" << std::endl << R0 << std::endl);
593 ClampJoint(uLabel, pDO, pNode, X0, R0, fOut));
595 out <<
"clamp: " << uLabel
617 #ifdef MBDYN_X_COMPATIBLE_INPUT
620 pedantic_cerr(
"Joint(" << uLabel <<
"): "
621 "missing keyword \"position\" at line "
626 #ifndef MBDYN_X_COMPATIBLE_INPUT
635 DEBUGCOUT(
"Node reference frame d:" << std::endl << d << std::endl);
640 #ifdef MBDYN_X_COMPATIBLE_INPUT
643 pedantic_cerr(
"Joint(" << uLabel <<
"): "
644 "missing keyword \"position\" at line "
649 #ifndef MBDYN_X_COMPATIBLE_INPUT
664 PinJoint(uLabel, pDO, pNode, X0, d, fOut));
667 out <<
"sphericalpin: " << uLabel
683 case REVOLUTEROTATION:
685 case UNIVERSALROTATION:
687 case CARDANOROTATION:
690 case PLANEDISPLACEMENT:
698 #ifndef MBDYN_X_COMPATIBLE_INPUT
703 switch (CurrKeyWord) {
704 case REVOLUTEROTATION:
705 case UNIVERSALROTATION:
706 case CARDANOROTATION:
712 pedantic_cerr(
"Joint(" << uLabel <<
"): "
713 "missing keyword \"position\" at line "
720 pedantic_cerr(
"Joint(" << uLabel <<
"): "
721 "missing keyword \"position\" at line "
725 DEBUGCOUT(
"Node 1 reference frame d1:" << std::endl
733 DEBUGCOUT(
"Hinge orientation matrix is supplied" << std::endl);
735 #ifdef MBDYN_X_COMPATIBLE_INPUT
737 pedantic_cerr(
"Joint(" << uLabel <<
"): "
739 <<
" is deprecated; use \"orientation\" instead"
741 DEBUGCOUT(
"Hinge orientation matrix is supplied" << std::endl);
754 #ifndef MBDYN_X_COMPATIBLE_INPUT
759 switch (CurrKeyWord) {
760 case REVOLUTEROTATION:
761 case UNIVERSALROTATION:
762 case CARDANOROTATION:
768 pedantic_cerr(
"Joint(" << uLabel <<
"): "
769 "missing keyword \"position\" at line "
776 pedantic_cerr(
"Joint(" << uLabel <<
"): "
777 "missing keyword \"position\" at line "
781 DEBUGCOUT(
"Node 2 reference frame d2:" << std::endl
789 DEBUGCOUT(
"Hinge orientation matrix is supplied" << std::endl);
791 #ifdef MBDYN_X_COMPATIBLE_INPUT
793 pedantic_cerr(
"Joint(" << uLabel <<
"): "
795 <<
" is deprecated; use \"orientation\" instead"
797 DEBUGCOUT(
"Hinge orientation matrix is supplied" << std::endl);
804 if (CurrKeyWord == AXIALROTATION) {
809 switch (CurrKeyWord) {
812 case UNIVERSALROTATION:
813 case CARDANOROTATION:
816 case REVOLUTEROTATION:
826 switch (CurrKeyWord) {
835 d1, R1h, d2, R2h, od, fOut));
837 out <<
"sphericalhinge: " << uLabel
850 <<
": deprecated \"plane hinge\" joint name;"
851 <<
" use \"revolute hinge\" instead" << std::endl);
854 bool calcInitdTheta =
true;
858 calcInitdTheta =
false;
875 d1, d2, R1h, R2h, od, fOut,
876 calcInitdTheta, initDTheta,
877 r, preload, bsh, bf));
879 out <<
"revolutehinge: " << uLabel
892 silent_cerr(
"missing keyword \"friction\" at line "
916 Brake(uLabel, pDO, pNode1, pNode2,
917 d1, d2, R1h, R2h, fOut,
921 out <<
"brake: " << uLabel
932 case REVOLUTEROTATION:
937 pNode1, pNode2, R1h, R2h, od, fOut));
939 out <<
"revoluterotation: " << uLabel
957 d1, d2, R1h, R2h, fOut));
959 out <<
"cardanohinge: " << uLabel
970 case UNIVERSALROTATION:
971 case CARDANOROTATION:
976 pNode1, pNode2, R1h, R2h, od, fOut));
978 out <<
"cardanorotation: " << uLabel
1008 d1, d2, R1h, R2h, pDC, od,
1010 r, preload, bsh, bf));
1012 out <<
"axialrotation: " << uLabel
1023 case GIMBALROTATION:
1028 pNode1, pNode2, R1h, R2h, od, fOut));
1030 out <<
"gimbalrotation: " << uLabel
1041 case PLANEDISPLACEMENT:
1042 silent_cerr(
"PlaneDispJoint(" << uLabel <<
"): "
1044 "use an InPlane and a RevoluteRotation"
1049 ASSERTMSG(0,
"You shouldn't have reached this point");
1059 case PLANEDISPLACEMENTPIN:
1067 #ifdef MBDYN_X_COMPATIBLE_INPUT
1070 pedantic_cerr(
"Joint(" << uLabel <<
"): "
1071 "missing keyword \"position\" at line "
1076 #ifndef MBDYN_X_COMPATIBLE_INPUT
1080 DEBUGCOUT(
"Node reference frame d:" << std::endl << d << std::endl);
1084 DEBUGCOUT(
"Hinge orientation matrix is supplied" << std::endl);
1086 #ifdef MBDYN_X_COMPATIBLE_INPUT
1088 pedantic_cerr(
"Joint(" << uLabel <<
"): "
1090 <<
" is deprecated; use \"orientation\" instead"
1092 DEBUGCOUT(
"Hinge orientation matrix is supplied" << std::endl);
1094 DEBUGCOUT(
"Hinge Rotation matrix Rh:" << std::endl << Rh << std::endl);
1100 #ifndef MBDYN_X_COMPATIBLE_INPUT
1104 pedantic_cerr(
"Joint(" << uLabel <<
"): "
1105 "keyword \"position\" expected at line " << HP.
GetLineData()
1112 DEBUGCOUT(
"Absolute X:" << std::endl << X0 << std::endl);
1116 DEBUGCOUT(
"Hinge orientation matrix is supplied" << std::endl);
1118 #ifdef MBDYN_X_COMPATIBLE_INPUT
1120 pedantic_cerr(
"Joint(" << uLabel <<
"): "
1122 <<
" is deprecated; use \"orientation\" instead"
1124 DEBUGCOUT(
"Hinge orientation matrix is supplied" << std::endl);
1129 DEBUGCOUT(
"Absolute R:" << std::endl << R0 << std::endl);
1134 switch (CurrKeyWord) {
1138 silent_cerr(
"deprecated \"plane pin\" joint name;"
1139 <<
" use \"revolute pin\" instead" << std::endl);
1142 bool calcInitdTheta =
true;
1146 calcInitdTheta =
false;
1151 X0, R0, d, Rh, fOut,
1152 calcInitdTheta, initDTheta));
1154 out <<
"revolutepin: " << uLabel
1160 <<
" " << R0.MulMT(pNode->
GetRCurr())
1170 X0, R0, d, Rh, fOut));
1172 out <<
"cardanopin: " << uLabel
1178 <<
" " << R0.MulMT(pNode->
GetRCurr())
1183 case PLANEDISPLACEMENTPIN:
1184 silent_cerr(
"PlaneDispJoint(" << uLabel <<
"): "
1186 "use an \"inplane\" and a \"revolute rotation\" instead"
1191 ASSERTMSG(0,
"You shouldn't have reached this point");
1205 #ifdef MBDYN_X_COMPATIBLE_INPUT
1208 pedantic_cerr(
"Joint(" << uLabel <<
"): "
1209 "missing keyword \"position\" at line "
1214 #ifndef MBDYN_X_COMPATIBLE_INPUT
1217 DEBUGCOUT(
"Node 1 reference frame p:" << std::endl << p << std::endl);
1223 silent_cerr(
"Joint(" << uLabel <<
"): "
1233 bool bOffset(
false);
1239 DEBUGCOUT(
"Node 2 reference frame q:" << std::endl
1250 pNode1, pNode2, v, p, q, fOut));
1255 pNode1, pNode2, v, p, fOut));
1260 out <<
"inplane: " << uLabel
1279 #ifdef MBDYN_X_COMPATIBLE_INPUT
1282 pedantic_cerr(
"Joint(" << uLabel <<
"): "
1283 "missing keyword \"position\" at line "
1288 #ifndef MBDYN_X_COMPATIBLE_INPUT
1292 DEBUGCOUT(
"Node 1 reference frame p:" << std::endl << p << std::endl);
1296 #ifdef MBDYN_X_COMPATIBLE_INPUT
1299 pedantic_cerr(
"Joint(" << uLabel <<
"): "
1300 "missing keyword \"orientation\" at line "
1305 #ifndef MBDYN_X_COMPATIBLE_INPUT
1314 bool bOffset(
false);
1320 DEBUGCOUT(
"Node 2 reference frame q:" << std::endl << p << std::endl);
1330 pNode1, pNode2,
R, p, q, fOut));
1335 pNode1, pNode2,
R, p, fOut));
1338 out <<
"inline: " << uLabel
1353 bIsPrescribedMotion =
false;
1354 bIsRightHandSide =
true;
1361 bool bOffset(
false);
1372 silent_cerr(
"Joint(" << uLabel <<
"): "
1373 "\"position\" not allowed with rotationless node " << pNode1->
GetLabel()
1390 silent_cerr(
"Joint(" << uLabel <<
"): "
1391 "\"position\" not allowed on second node when first node "
1392 << pNode1->
GetLabel() <<
" is rotationless"
1395 }
else if (pN2 == 0) {
1396 silent_cerr(
"Joint(" << uLabel <<
"): "
1397 "\"position\" not allowed with rotationless node " << pNode2->
GetLabel()
1408 bool bFromNodes(
false);
1411 DEBUGCOUT(
"Initial length will be computed from nodes position" << std::endl);
1415 DEBUGCOUT(
"Initial length = " << dL0 << std::endl);
1420 #ifdef MBDYN_X_COMPATIBLE_INPUT
1422 pedantic_cerr(
"Joint(" << uLabel <<
"): "
1424 <<
" is deprecated; use \"position\" instead"
1427 silent_cerr(
"Joint(" << uLabel <<
"): "
1428 "offsets already defined "
1435 silent_cerr(
"Joint(" << uLabel <<
"): "
1436 "\"offset\" not allowed when first node "
1437 << pNode1->
GetLabel() <<
" is rotationless"
1440 }
else if (pN2 == 0) {
1441 silent_cerr(
"Joint(" << uLabel <<
"): "
1442 "\"offset\" not allowed when second node "
1443 << pNode2->
GetLabel() <<
" is rotationless"
1451 DEBUGCOUT(
"Offset 1: " << f1 << std::endl);
1454 DEBUGCOUT(
"Offset 2: " << f2 << std::endl);
1460 v += pN2->GetRCurr()*f2 - pN1->GetRCurr()*f1;
1466 pedantic_cout(
"Rod[WithOffset](" << uLabel <<
"): "
1467 "length from nodes = " << dL1 << std::endl);
1470 DEBUGCOUT(
"Initial length = " << dL0 << std::endl);
1482 "rod joint does not support "
1483 "dynamic constitutive laws yet"
1491 out <<
"rod: " << uLabel
1493 <<
" ", f1.Write(out,
" ")
1495 <<
" ", f2.Write(out,
" ")
1502 pN1, pN2, f1, f2, dL0, fOut));
1511 pNode1, pNode2, dL0, fOut));
1517 Rod(uLabel, pDO, pCL,
1518 pNode1, pNode2, dL0, fOut));
1528 bIsPrescribedMotion =
false;
1529 bIsRightHandSide =
true;
1539 #ifdef MBDYN_X_COMPATIBLE_INPUT
1540 pedantic_cerr(
"Joint(" << uLabel <<
"): \"rod with offset\" "
1541 "is deprecated; use \"rod\" instead" << std::endl);
1550 #ifdef MBDYN_X_COMPATIBLE_INPUT
1553 pedantic_cerr(
"Joint(" << uLabel <<
"): "
1554 "missing keyword \"position\" at line "
1559 #ifndef MBDYN_X_COMPATIBLE_INPUT
1564 <<
"with offset " << f1 << std::endl);
1572 #ifdef MBDYN_X_COMPATIBLE_INPUT
1575 pedantic_cerr(
"Joint(" << uLabel <<
"): "
1576 "missing keyword \"position\" at line "
1581 #ifndef MBDYN_X_COMPATIBLE_INPUT
1585 DEBUGCOUT(
"Linked to Node " << pNode2->GetLabel()
1586 <<
"with offset " << f2 << std::endl);
1589 + pNode2->GetRCurr()*f2
1593 pedantic_cout(
"RodWithOffset(" << uLabel <<
"): "
1594 "length from nodes = " << dL1 << std::endl);
1605 DEBUGCOUT(
"Initial length = " << dL0 << std::endl);
1617 "\"rod with offset\" joint does not support "
1618 "dynamic constitutive laws yet"
1626 out <<
"rod: " << uLabel
1628 <<
" ", f1.Write(out,
" ")
1629 <<
" " << pNode2->GetLabel()
1630 <<
" ", f2.Write(out,
" ")
1636 pNode1, pNode2, f1, f2, dL0, fOut));
1643 bIsPrescribedMotion =
false;
1644 bIsRightHandSide =
true;
1655 #ifdef MBDYN_X_COMPATIBLE_INPUT
1658 pedantic_cerr(
"Joint(" << uLabel <<
"): "
1659 "missing keyword \"position\" at line "
1664 #ifndef MBDYN_X_COMPATIBLE_INPUT
1670 #ifdef MBDYN_X_COMPATIBLE_INPUT
1673 pedantic_cerr(
"Joint(" << uLabel <<
"): "
1674 "missing keyword \"position\" at line "
1679 #ifndef MBDYN_X_COMPATIBLE_INPUT
1684 <<
"with offset O " << fO
1685 <<
" and offset A " << fA << std::endl);
1694 #ifdef MBDYN_X_COMPATIBLE_INPUT
1697 pedantic_cerr(
"Joint(" << uLabel <<
"): "
1698 "missing keyword \"position\" at line "
1704 #ifndef MBDYN_X_COMPATIBLE_INPUT
1710 #ifdef MBDYN_X_COMPATIBLE_INPUT
1713 pedantic_cerr(
"Joint(" << uLabel <<
"): "
1714 "missing keyword \"position\" at line "
1720 #ifndef MBDYN_X_COMPATIBLE_INPUT
1724 bool bFromNodes =
false;
1728 DEBUGCOUT(
"Initial length computed from nodes " << std::endl);
1731 DEBUGCOUT(
"Initial length = " << dL0 << std::endl);
1735 if (HP.
IsKeyWord(
"integration" "order")) {
1737 if (iIntOrder < 1) {
1738 pedantic_cerr(
"Joint(" << uLabel <<
"): "
1739 "integration order cannot be less than 1. "
1742 }
else if (iIntOrder > 10) {
1743 pedantic_cerr(
"Joint(" << uLabel <<
"): "
1744 "maximum supported integration order is 10."
1749 int iIntSegments = 3;
1750 if (HP.
IsKeyWord(
"integration" "segments")) {
1751 iIntSegments = HP.
GetInt();
1752 if (iIntSegments < 1) {
1753 pedantic_cerr(
"Joint (" << uLabel <<
"): "
1754 "integration segments cannot be less than 1."
1759 DEBUGCOUT(
"Joint(" << uLabel <<
"): Linked to Node "
1760 << pNode2->GetLabel()
1761 <<
" with offset B " << fB
1762 <<
" and offset I " << fI
1763 <<
". Integration order " << iIntOrder
1764 <<
" on " << iIntSegments <<
" segments"
1773 "rod bezier joint does not support "
1774 "dynamic constitutive laws yet"
1782 out <<
"rod bezier: " << uLabel
1784 <<
" ", fO.Write(out,
" ")
1785 <<
" ", fA.Write(out,
" ")
1786 <<
" " << pNode2->GetLabel()
1787 <<
" ", fB.Write(out,
" ")
1788 <<
" ", fI.Write(out,
" ")
1794 pNode1, pNode2, fO, fA, fB, fI,
1796 iIntOrder, iIntSegments, fOut));
1798 case DEFORMABLEHINGE:
1799 case DEFORMABLEDISPHINGE:
1800 case DEFORMABLEDISPJOINT:
1801 case DEFORMABLEAXIALJOINT:
1802 case INVARIANTDEFORMABLEHINGE:
1803 case INVARIANTDEFORMABLEDISPJOINT:
1806 bIsPrescribedMotion =
false;
1807 bIsRightHandSide =
true;
1818 switch (CurrKeyWord) {
1819 case DEFORMABLEDISPHINGE:
1820 case DEFORMABLEDISPJOINT:
1821 case INVARIANTDEFORMABLEDISPJOINT:
1823 #ifdef MBDYN_X_COMPATIBLE_INPUT
1826 pedantic_cerr(
"Joint(" << uLabel <<
"): "
1827 "missing keyword \"position\" at line "
1832 #ifndef MBDYN_X_COMPATIBLE_INPUT
1837 case DEFORMABLEHINGE:
1838 case DEFORMABLEAXIALJOINT:
1839 case INVARIANTDEFORMABLEHINGE:
1851 DEBUGCOUT(
"Hinge orientation matrix is supplied" << std::endl);
1853 #ifdef MBDYN_X_COMPATIBLE_INPUT
1855 pedantic_cerr(
"Joint(" << uLabel <<
"): "
1857 <<
" is deprecated; use \"orientation\" instead"
1859 DEBUGCOUT(
"Hinge orientation matrix is supplied" << std::endl);
1872 switch (CurrKeyWord) {
1873 case DEFORMABLEDISPHINGE:
1874 case DEFORMABLEDISPJOINT:
1875 case INVARIANTDEFORMABLEDISPJOINT:
1877 #ifdef MBDYN_X_COMPATIBLE_INPUT
1880 pedantic_cerr(
"Joint(" << uLabel <<
"): "
1881 "missing keyword \"position\" at line "
1886 #ifndef MBDYN_X_COMPATIBLE_INPUT
1891 case DEFORMABLEHINGE:
1892 case DEFORMABLEAXIALJOINT:
1893 case INVARIANTDEFORMABLEHINGE:
1905 DEBUGCOUT(
"Hinge orientation matrix is supplied" << std::endl);
1907 #ifdef MBDYN_X_COMPATIBLE_INPUT
1909 pedantic_cerr(
"Joint(" << uLabel <<
"): "
1911 <<
" is deprecated; use \"orientation\" instead"
1913 DEBUGCOUT(
"Hinge orientation matrix is supplied" << std::endl);
1923 unsigned iCLNumDof = 0;
1924 switch (CurrKeyWord) {
1925 case DEFORMABLEAXIALJOINT:
1936 if (iCLNumDof != 0) {
1938 "generic deformable joint does not support "
1939 "constitutive laws with internal degrees of freedom yet"
1945 switch (CurrKeyWord) {
1946 case DEFORMABLEHINGE:
1947 case INVARIANTDEFORMABLEHINGE:
1957 const char *sJointLogName = 0;
1961 switch (CurrKeyWord) {
1962 case DEFORMABLEHINGE:
1968 sJointLogName =
"deformablehinge";
1971 case INVARIANTDEFORMABLEHINGE:
1977 sJointLogName =
"deformablehinge";
1980 case DEFORMABLEDISPHINGE:
1981 case DEFORMABLEDISPJOINT:
1986 f1, f2, R1, R2, fOut));
1988 sJointLogName =
"deformabledisplacementjoint";
1991 case INVARIANTDEFORMABLEDISPJOINT:
1993 silent_cerr(
"\"invariant deformable displacement joint\" "
1995 <<
" not implemented yet" << std::endl);
2003 f1, f2, R1, R2, fOut));
2005 sJointLogName =
"deformabledisplacementjoint";
2009 case DEFORMABLEAXIALJOINT:
2015 sJointLogName =
"deformableaxialjoint";
2019 ASSERTMSG(0,
"You shouldn't have reached this point");
2026 switch (CurrKeyWord) {
2027 case DEFORMABLEHINGE:
2033 sJointLogName =
"deformablehinge";
2036 case INVARIANTDEFORMABLEHINGE:
2042 sJointLogName =
"deformablehinge";
2045 case DEFORMABLEDISPHINGE:
2046 case DEFORMABLEDISPJOINT:
2051 f1, f2, R1, R2, fOut));
2052 sJointLogName =
"deformabledisplacementjoint";
2055 case INVARIANTDEFORMABLEDISPJOINT:
2056 silent_cerr(
"\"invariant deformable displacement joint\" "
2058 <<
" not implemented yet" << std::endl);
2065 f1, f2, R1, R2, fOut));
2066 sJointLogName =
"deformabledisplacementjoint";
2070 case DEFORMABLEAXIALJOINT:
2076 sJointLogName =
"deformableaxialjoint";
2080 ASSERTMSG(0,
"You shouldn't have reached this point");
2087 switch (CurrKeyWord) {
2088 case DEFORMABLEHINGE:
2094 sJointLogName =
"deformablehinge";
2097 case INVARIANTDEFORMABLEHINGE:
2103 sJointLogName =
"deformablehinge";
2106 case DEFORMABLEDISPHINGE:
2107 case DEFORMABLEDISPJOINT:
2113 f1, f2, R1, R2, fOut));
2114 sJointLogName =
"deformabledisplacementjoint";
2117 case INVARIANTDEFORMABLEDISPJOINT:
2118 silent_cerr(
"\"invariant deformable displacement joint\" "
2120 <<
" not implemented yet" << std::endl);
2124 ViscoElasticDispJointInv,
2125 ViscoElasticDispJointInv(uLabel,
2128 f1, f2, R1, R2, fOut));
2129 sJointLogName =
"deformabledisplacementjoint";
2133 case DEFORMABLEAXIALJOINT:
2139 sJointLogName =
"deformableaxialjoint";
2143 ASSERTMSG(0,
"You shouldn't have reached this point");
2150 ASSERTMSG(0,
"You shouldn't have reached this point");
2155 out << sJointLogName <<
": " << uLabel
2165 case DEFORMABLEJOINT:
2166 case INVARIANTDEFORMABLEJOINT:
2169 bIsPrescribedMotion =
false;
2170 bIsRightHandSide =
true;
2210 "\"deformable joint\" does not support "
2211 "dynamic constitutive laws yet"
2221 switch (CurrKeyWord) {
2222 case DEFORMABLEJOINT:
2227 f1, f2, R1, R2, od, fOut));
2230 case INVARIANTDEFORMABLEJOINT:
2235 f1, f2, R1, R2, od, fOut));
2239 ASSERTMSG(0,
"You shouldn't have reached this point");
2247 switch (CurrKeyWord) {
2248 case DEFORMABLEJOINT:
2253 f1, f2, R1, R2, od, fOut));
2256 case INVARIANTDEFORMABLEJOINT:
2257 silent_cerr(
"\"invariant deformable joint\" "
2258 "with support for viscous constitutive law "
2260 <<
" not implemented yet" << std::endl);
2265 ViscousJointInv(uLabel, pDO, pCL,
2267 f1, f2, R1, R2, od, fOut));
2272 ASSERTMSG(0,
"You shouldn't have reached this point");
2280 switch (CurrKeyWord) {
2281 case DEFORMABLEJOINT:
2286 f1, f2, R1, R2, od, fOut));
2289 case INVARIANTDEFORMABLEJOINT:
2290 silent_cerr(
"\"invariant deformable joint\" "
2291 "with support for viscoelastic constitutive law "
2293 <<
" not implemented yet" << std::endl);
2297 ViscoElasticJointInv,
2298 ViscoElasticJointInv(uLabel, pDO, pCL,
2300 f1, f2, R1, R2, od, fOut));
2305 ASSERTMSG(0,
"You shouldn't have reached this point");
2313 ASSERTMSG(0,
"You shouldn't have reached this point");
2314 silent_cerr(
"\"deformable joint\" "
2316 <<
" not implemented with the requested "
2317 "constitutive law type" << std::endl);
2322 out <<
"deformablejoint: " << uLabel
2336 bIsPrescribedMotion =
false;
2337 bIsRightHandSide =
true;
2362 "\"viscous body\" does not support "
2363 "dynamic constitutive laws yet"
2374 silent_cerr(
"\"viscous body\" "
2375 "needs viscous constitutive law "
2383 pNode, f,
R, od, fOut));
2387 ASSERTMSG(0,
"You shouldn't have reached this point");
2388 silent_cerr(
"\"viscous body\" "
2390 <<
" not implemented with the requested "
2391 "constitutive law type" << std::endl);
2396 out <<
"viscousbody: " << uLabel
2404 case LINEARVELOCITY:
2405 case ANGULARVELOCITY:
2414 silent_cerr(
"linear/angular velocity direction is null" << std::endl);
2424 switch (CurrKeyWord) {
2425 case LINEARVELOCITY:
2429 pNode, Dir, pDC, fOut));
2430 out <<
"linearvelocity: ";
2433 case ANGULARVELOCITY:
2437 pNode, Dir, pDC, fOut));
2438 out <<
"angularvelocity: ";
2442 ASSERTMSG(0,
"You shouldn't have reached this point");
2453 case LINEARACCELERATION:
2454 case ANGULARACCELERATION:
2463 silent_cerr(
"Joint(" << uLabel <<
"): "
2464 "direction is null" << std::endl);
2474 switch (CurrKeyWord) {
2475 case LINEARACCELERATION:
2479 pNode, Dir, pDC, fOut));
2480 out <<
"linearacceleration: ";
2483 case ANGULARACCELERATION:
2487 pNode, Dir, pDC, fOut));
2488 out <<
"angularacceleration: ";
2492 ASSERTMSG(0,
"You shouldn't have reached this point");
2511 DEBUGCOUT(
"Hinge orientation matrix is supplied" << std::endl);
2513 #ifdef MBDYN_X_COMPATIBLE_INPUT
2515 pedantic_cerr(
"Joint(" << uLabel <<
"): "
2517 <<
" is deprecated; use \"orientation\" instead"
2519 DEBUGCOUT(
"Hinge orientation matrix is supplied" << std::endl);
2532 DEBUGCOUT(
"Hinge orientation matrix is supplied" << std::endl);
2534 #ifdef MBDYN_X_COMPATIBLE_INPUT
2536 pedantic_cerr(
"Joint(" << uLabel <<
"): "
2538 <<
" is deprecated; use \"orientation\" instead"
2540 DEBUGCOUT(
"Hinge orientation matrix is supplied" << std::endl);
2553 out <<
"prismatic: " << uLabel
2571 DEBUGCOUT(
"Hinge orientation matrix is supplied" << std::endl);
2573 #ifdef MBDYN_X_COMPATIBLE_INPUT
2575 pedantic_cerr(
"Joint(" << uLabel <<
"): "
2577 <<
" is deprecated; use \"orientation\" instead"
2579 DEBUGCOUT(
"Hinge orientation matrix is supplied" << std::endl);
2593 DEBUGCOUT(
"Hinge orientation matrix is supplied" << std::endl);
2595 #ifdef MBDYN_X_COMPATIBLE_INPUT
2597 pedantic_cerr(
"Joint(" << uLabel <<
"): "
2599 <<
" is deprecated; use \"orientation\" instead"
2601 DEBUGCOUT(
"Hinge orientation matrix is supplied" << std::endl);
2614 pNode1, pNode2, R1h, R2h, fOut));
2618 case DRIVEDISPLACEMENT:
2627 #ifdef MBDYN_X_COMPATIBLE_INPUT
2630 pedantic_cerr(
"Joint(" << uLabel <<
"): "
2631 "missing keyword \"position\" at line "
2636 #ifndef MBDYN_X_COMPATIBLE_INPUT
2647 #ifdef MBDYN_X_COMPATIBLE_INPUT
2650 pedantic_cerr(
"Joint(" << uLabel <<
"): "
2651 "missing keyword \"position\" at line "
2656 #ifndef MBDYN_X_COMPATIBLE_INPUT
2667 pNode1, pNode2, f1, f2, fOut));
2670 out <<
"drivedisplacement: " << uLabel
2679 case DRIVEDISPLACEMENTPIN:
2687 #ifdef MBDYN_X_COMPATIBLE_INPUT
2690 pedantic_cerr(
"Joint(" << uLabel <<
"): "
2691 "missing keyword \"position\" at line "
2696 #ifndef MBDYN_X_COMPATIBLE_INPUT
2703 #ifdef MBDYN_X_COMPATIBLE_INPUT
2706 pedantic_cerr(
"Joint(" << uLabel <<
"): "
2707 "missing keyword \"position\" at line "
2712 #ifndef MBDYN_X_COMPATIBLE_INPUT
2723 pNode, f, x, fOut));
2726 out <<
"drivedisplacementpin: " << uLabel
2734 case IMPOSEDDISPLACEMENT:
2736 silent_cerr(
"ImposedDisplacement(" << uLabel <<
"): "
2737 "deprecated; using \"total joint\" instead" << std::endl);
2755 bool bXActive[3] = {
true,
true,
true };
2756 bool bVActive[3] = {
false,
false,
false };
2760 bool bRActive[3] = {
false,
false,
false };
2761 bool bWActive[3] = {
false,
false,
false };
2770 bXActive, bVActive, pXDC,
2771 bRActive, bWActive, pTDC,
2772 pNode1, f1, R1h, R1hr,
2773 pNode2, f2, R2h, R2hr,
2777 out <<
"totaljoint: " << uLabel
2786 <<
" " << bXActive[0]
2787 <<
" " << bXActive[1]
2788 <<
" " << bXActive[2]
2789 <<
" " << bVActive[0]
2790 <<
" " << bVActive[1]
2791 <<
" " << bVActive[2]
2792 <<
" " << bRActive[0]
2793 <<
" " << bRActive[1]
2794 <<
" " << bRActive[2]
2795 <<
" " << bWActive[0]
2796 <<
" " << bWActive[1]
2797 <<
" " << bWActive[2]
2801 case IMPOSEDDISPLACEMENTPIN:
2803 silent_cerr(
"ImposedDisplacementPin(" << uLabel <<
"): "
2804 "deprecated; using \"total pin joint\" instead" << std::endl);
2818 bool bXActive[3] = {
true,
true,
true };
2819 bool bVActive[3] = {
false,
false,
false };
2823 bool bRActive[3] = {
false,
false,
false };
2824 bool bWActive[3] = {
false,
false,
false };
2833 bXActive, bVActive, pXDC,
2834 bRActive, bWActive, pTDC,
2836 pNode, fn, Rnh, Rnhr,
2840 out <<
"totalpinjoint: " << uLabel
2852 case IMPOSEDORIENTATION:
2854 silent_cerr(
"ImposedOrientation(" << uLabel <<
"): "
2855 "using \"total joint\" instead" << std::endl);
2873 bool bXActive[3] = {
false,
false,
false };
2874 bool bVActive[3] = {
false,
false,
false };
2878 bool bRActive[3] = {
true,
true,
true };
2879 bool bWActive[3] = {
false,
false,
false };
2891 bXActive, bVActive, pXDC,
2892 bRActive, bWActive, pTDC,
2893 pNode1, f1, R1h, R1hr,
2894 pNode2, f2, R2h, R2hr,
2898 out <<
"totaljoint: " << uLabel
2903 <<
" " << pNode2->GetLabel()
2907 <<
" " << bXActive[0]
2908 <<
" " << bXActive[1]
2909 <<
" " << bXActive[2]
2910 <<
" " << bVActive[0]
2911 <<
" " << bVActive[1]
2912 <<
" " << bVActive[2]
2913 <<
" " << bRActive[0]
2914 <<
" " << bRActive[1]
2915 <<
" " << bRActive[2]
2916 <<
" " << bWActive[0]
2917 <<
" " << bWActive[1]
2918 <<
" " << bWActive[2]
2934 if (HP.
IsKeyWord(
"position" "orientation")) {
2935 DEBUGCOUT(
"Position orientation matrix is supplied" << std::endl);
2940 if (HP.
IsKeyWord(
"rotation" "orientation")) {
2941 DEBUGCOUT(
"Rotation orientation matrix is supplied" << std::endl);
2955 if (HP.
IsKeyWord(
"position" "orientation")) {
2956 DEBUGCOUT(
"Position orientation matrix is supplied" << std::endl);
2961 if (HP.
IsKeyWord(
"rotation" "orientation")) {
2962 DEBUGCOUT(
"Rotation orientation matrix is supplied" << std::endl);
2966 bool bXActive[3] = {
false,
false,
false };
2967 bool bVActive[3] = {
false,
false,
false };
2969 if (HP.
IsKeyWord(
"position" "constraint")) {
2970 for (
unsigned i = 0; i < 3; i++) {
2972 bXActive[i] =
false;
2973 bVActive[i] =
false;
2977 bVActive[i] =
false;
2981 bXActive[i] =
false;
2986 bXActive[i] = bActive;
2987 bVActive[i] = bActive;
2991 silent_cerr(
"TotalEquation(" << uLabel <<
"): "
2992 "invalid status for position component #" << i + 1
3009 bool bRActive[3] = {
false,
false,
false };
3010 bool bWActive[3] = {
false,
false,
false };
3012 if (HP.
IsKeyWord(
"orientation" "constraint")) {
3013 for (
unsigned i = 0; i < 3; i++) {
3015 bRActive[i] =
false;
3016 bWActive[i] =
false;
3020 bWActive[i] =
false;
3022 }
else if (HP.
IsKeyWord(
"angular" "velocity")) {
3023 bRActive[i] =
false;
3028 bool bActive = HP.
GetInt();
3029 bRActive[i] = bActive;
3030 bWActive[i] = bActive;
3034 silent_cerr(
"TotalEquation(" << uLabel <<
"): "
3035 "invalid status for position component #" << i + 1
3057 bXActive, bVActive, pXDC,
3058 bRActive, bWActive, pTDC,
3059 pNode1, f1, R1h, R1hr,
3060 pNode2, f2, R2h, R2hr,
3064 out <<
"totalequation: " << uLabel
3076 case TOTALINTERNALREACTION:
3088 if (HP.
IsKeyWord(
"position" "orientation")) {
3089 DEBUGCOUT(
"Position orientation matrix is supplied" << std::endl);
3094 if (HP.
IsKeyWord(
"rotation" "orientation")) {
3095 DEBUGCOUT(
"Rotation orientation matrix is supplied" << std::endl);
3109 if (HP.
IsKeyWord(
"position" "orientation")) {
3110 DEBUGCOUT(
"Position orientation matrix is supplied" << std::endl);
3115 if (HP.
IsKeyWord(
"rotation" "orientation")) {
3116 DEBUGCOUT(
"Rotation orientation matrix is supplied" << std::endl);
3120 bool bXActive[3] = {
false,
false,
false };
3121 if (HP.
IsKeyWord(
"position" "constraint")) {
3122 for (
unsigned i = 0; i < 3; i++) {
3124 bXActive[i] =
false;
3131 bXActive[i] = HP.
GetInt();
3135 silent_cerr(
"TotalReaction(" << uLabel <<
"): "
3136 "invalid status for position component #" << i + 1
3143 bool bRActive[3] = {
false,
false,
false };
3144 if (HP.
IsKeyWord(
"orientation" "constraint")) {
3145 for (
unsigned i = 0; i < 3; i++) {
3147 bRActive[i] =
false;
3158 silent_cerr(
"TotalReaction(" << uLabel <<
"): "
3159 "invalid status for position component #" << i + 1
3169 unsigned int tot_eq_j_label = HP.
GetInt();
3172 if (nested_pt != 0) {
3177 if (tot_eq_pt == 0) {
3178 silent_cerr(
"TotalEquation" "(" << tot_eq_j_label <<
") "
3179 "needed by TotalReaction(" << uLabel <<
") "
3181 <<
" is not defined"
3186 silent_cerr(
"Total Reaction(" << uLabel <<
") "
3187 "needs a reference to a corresponding "
3200 pNode1, f1, R1h, R1hr,
3201 pNode2, f2, R2h, R2hr,
3206 out <<
"totalreaction: " << uLabel
3215 <<
" " << tot_eq_pt->GetLabel()
3231 if (HP.
IsKeyWord(
"position" "orientation")) {
3232 DEBUGCOUT(
"Position orientation matrix is supplied" << std::endl);
3237 if (HP.
IsKeyWord(
"rotation" "orientation")) {
3238 DEBUGCOUT(
"Rotation orientation matrix is supplied" << std::endl);
3252 if (HP.
IsKeyWord(
"position" "orientation")) {
3253 DEBUGCOUT(
"Position orientation matrix is supplied" << std::endl);
3258 if (HP.
IsKeyWord(
"rotation" "orientation")) {
3259 DEBUGCOUT(
"Rotation orientation matrix is supplied" << std::endl);
3263 bool bXActive[3] = {
false,
false,
false };
3264 bool bVActive[3] = {
false,
false,
false };
3266 if (HP.
IsKeyWord(
"position" "constraint")) {
3267 for (
unsigned i = 0; i < 3; i++) {
3269 bXActive[i] =
false;
3270 bVActive[i] =
false;
3274 bVActive[i] =
false;
3277 bXActive[i] =
false;
3283 bXActive[i] = bActive;
3284 bVActive[i] =
false;
3288 silent_cerr(
"TotalJoint(" << uLabel <<
"): "
3289 "invalid status for position component #" << i + 1
3308 bool bRActive[3] = {
false,
false,
false };
3309 bool bWActive[3] = {
false,
false,
false };
3311 if (HP.
IsKeyWord(
"orientation" "constraint")) {
3312 for (
unsigned i = 0; i < 3; i++) {
3314 bRActive[i] =
false;
3315 bWActive[i] =
false;
3319 bWActive[i] =
false;
3321 }
else if (HP.
IsKeyWord(
"angular" "velocity")) {
3322 bRActive[i] =
false;
3327 bool bActive = HP.
GetInt();
3328 bRActive[i] = bActive;
3329 bWActive[i] =
false;
3333 silent_cerr(
"TotalJoint(" << uLabel <<
"): "
3334 "invalid status for orientation component #" << i + 1
3358 bXActive, bVActive, pXDC,
3359 bRActive, bWActive, pTDC,
3360 pNode1, f1, R1h, R1hr,
3361 pNode2, f2, R2h, R2hr,
3365 out <<
"totaljoint: " << uLabel
3374 <<
" " << bXActive[0]
3375 <<
" " << bXActive[1]
3376 <<
" " << bXActive[2]
3377 <<
" " << bVActive[0]
3378 <<
" " << bVActive[1]
3379 <<
" " << bVActive[2]
3380 <<
" " << bRActive[0]
3381 <<
" " << bRActive[1]
3382 <<
" " << bRActive[2]
3383 <<
" " << bWActive[0]
3384 <<
" " << bWActive[1]
3385 <<
" " << bWActive[2]
3401 if (HP.
IsKeyWord(
"position" "orientation")) {
3402 DEBUGCOUT(
"Position orientation matrix is supplied" << std::endl);
3407 if (HP.
IsKeyWord(
"rotation" "orientation")) {
3408 DEBUGCOUT(
"Rotation orientation matrix is supplied" << std::endl);
3415 DEBUGCOUT(
"Position vector is supplied" << std::endl);
3420 if (HP.
IsKeyWord(
"position" "orientation")) {
3421 DEBUGCOUT(
"Position orientation matrix is supplied" << std::endl);
3426 if (HP.
IsKeyWord(
"rotation" "orientation")) {
3427 DEBUGCOUT(
"Rotation orientation matrix is supplied" << std::endl);
3431 bool bXActive[3] = {
false,
false,
false };
3432 bool bVActive[3] = {
false,
false,
false };
3434 if (HP.
IsKeyWord(
"position" "constraint")) {
3435 for (
unsigned i = 0; i < 3; i++) {
3437 bXActive[i] =
false;
3438 bVActive[i] =
false;
3442 bVActive[i] =
false;
3445 bXActive[i] =
false;
3451 bVActive[i] =
false;
3455 silent_cerr(
"TotalPinJoint(" << uLabel <<
"): "
3456 "invalid status for position component #" << i + 1
3475 bool bRActive[3] = {
false,
false,
false };
3476 bool bWActive[3] = {
false,
false,
false };
3478 if (HP.
IsKeyWord(
"orientation" "constraint")) {
3479 for (
unsigned i = 0; i < 3; i++) {
3481 bRActive[i] =
false;
3482 bWActive[i] =
false;
3486 bWActive[i] =
false;
3488 }
else if (HP.
IsKeyWord(
"angular" "velocity")) {
3489 bRActive[i] =
false;
3495 bWActive[i] =
false;
3499 silent_cerr(
"TotalPinJoint(" << uLabel <<
"): "
3500 "invalid status for position component #" << i + 1
3524 bXActive, bVActive, pXDC,
3525 bRActive, bWActive, pTDC,
3527 pNode, fn, Rnh, Rnhr,
3531 out <<
"totalpinjoint: " << uLabel
3539 <<
" " << bXActive[0]
3540 <<
" " << bXActive[1]
3541 <<
" " << bXActive[2]
3542 <<
" " << bVActive[0]
3543 <<
" " << bVActive[1]
3544 <<
" " << bVActive[2]
3545 <<
" " << bRActive[0]
3546 <<
" " << bRActive[1]
3547 <<
" " << bRActive[2]
3548 <<
" " << bWActive[0]
3549 <<
" " << bWActive[1]
3550 <<
" " << bWActive[2]
3556 silent_cerr(
"Joint(" << uLabel <<
"): "
3557 "\"kinematic\" obolete; replace with a \"total [pin] joint\" "
3566 out <<
"beamslider: " << uLabel;
3571 <<
"with offset " << f << std::endl);
3582 "Slider rotation matrix: " << std::endl << R << std::endl);
3596 silent_cerr(
"unknown slider type at line "
3602 unsigned int nB = HP.
GetInt();
3604 silent_cerr(
"At least one beam is required at line "
3615 for (
unsigned int i = 0; i < nB; i++) {
3617 unsigned int uBeam = HP.
GetInt();
3622 <<
": Beam3(" << uBeam <<
") "
3623 "not defined" << std::endl);
3627 const Beam *pBeam =
dynamic_cast<const Beam *
>(p);
3630 <<
": Beam(" << uBeam <<
") "
3631 "is not a Beam3" << std::endl);
3648 if (pNode1 != pLastNode) {
3650 "Beam(" << pBeam->
GetLabel() <<
")"
3651 ".Node1(" << pNode1->
GetLabel() <<
") "
3653 ".Node3(" << pLastNode->
GetLabel() <<
") "
3654 "do not match" << std::endl);
3659 f1 = bc[i-1]->
Getf(3);
3665 "Beam(" << pBeam->
GetLabel() <<
").f1 "
3667 "do not match" << std::endl);
3677 R1 = bc[i-1]->
GetR(3);
3683 "Beam(" << pBeam->
GetLabel() <<
").R1 "
3685 "do not match" << std::endl);
3690 << std::endl << R1 << std::endl);
3698 << std::endl << R1 << std::endl);
3721 "Node 2 rotation matrix: " << std::endl
3722 << R2 << std::endl);
3744 "Node 3 rotation matrix: " << std::endl
3745 << R3 << std::endl);
3754 BeamConn(pBeam, f1, f2, f3, R1, R2, R3));
3761 if (uIB < 1 || uIB > nB) {
3762 silent_cerr(
"illegal initial beam " << uIB
3773 if (uIN < 1 || uIN > 3) {
3774 silent_cerr(
"illegal initial node " << uIN
3783 if (dL < 0. || dL > .4) {
3784 silent_cerr(
"illegal smearing factor " << dL <<
"; "
3785 "using default" << std::endl);
3807 case POINT_SURFACE_CONTACT: {
3822 silent_cerr(
"PointSurfaceContact(" << uLabel <<
"): "
3828 double ElasticStiffness = HP.
GetReal();
3835 pNode1, pSup, SupDirection, ElasticStiffness, fOut));
3847 #ifdef MBDYN_X_COMPATIBLE_INPUT
3850 pedantic_cerr(
"Joint(" << uLabel <<
"): "
3851 "missing keyword \"position\" at line "
3856 #ifndef MBDYN_X_COMPATIBLE_INPUT
3860 DEBUGCOUT(
"Node 1 reference frame p:" << std::endl << p << std::endl);
3864 #ifdef MBDYN_X_COMPATIBLE_INPUT
3867 pedantic_cerr(
"Joint(" << uLabel <<
"): "
3868 "missing keyword \"orientation\" at line "
3873 #ifndef MBDYN_X_COMPATIBLE_INPUT
3887 DEBUGCOUT(
"Node 2 reference frame q:" << std::endl << p << std::endl);
3892 silent_cerr(
"Joint(" << uLabel <<
"): "
3893 "missing keyword \"pitch\" at line "
3910 ScrewJoint(uLabel, pDO, pNode1, pNode2,
3911 p, q, R, pitch, fOut, bsh, bf));
3914 out <<
"screw: " << uLabel
3923 #endif // MBDYN_DEVEL
3928 silent_cerr(
"Joint(" << uLabel <<
"): unknown joint type "
3936 silent_cerr(
"error in allocation of element "
3937 << uLabel << std::endl);
3942 if (HP.
IsKeyWord(
"inverse" "dynamics")) {
3948 bIsPrescribedMotion =
false;
3949 if (HP.
IsKeyWord(
"prescribed" "motion")) {
3953 if (HP.
IsKeyWord(
"right" "hand" "side")) {
3963 type = pCLDO->pGetConstLaw()->GetConstLawType();
3965 type = pCLDO->pGetConstLaw()->GetConstLawType();
3967 type = pCLDO->pGetConstLaw()->GetConstLawType();
3969 silent_cerr(
"Joint(" << uLabel <<
"): is \"ergonomy\" but cannot infer constitutive law type" << std::endl);
3974 silent_cerr(
"Joint(" << uLabel <<
"): invalid constitutive law type (must be ELASTIC)" << std::endl);
3978 if (bIsRightHandSide) {
3979 silent_cerr(
"warning, Joint(" << uLabel <<
") is both \"ergonomy\" and \"right hand side\"" << std::endl);
3991 if (bIsPrescribedMotion) {
3994 if (bIsRightHandSide) {
4002 silent_cerr(
"warning, Joint(" << uLabel <<
") is used for inverse dynamics but no flag (torque, prescribed motion, right hand side, ergonomy) is active." << std::endl);
4014 silent_cerr(
"semicolon expected at line " << HP.
GetLineData()
flag fReadOutput(MBDynParser &HP, const T &t) const
virtual bool bInverseDynamics(void) const
Mat3x3 GetRotRel(const ReferenceFrame &rf)
const Vec3 & Getf(unsigned int i) const
GradientExpression< UnaryExpr< FuncAsin, Expr > > asin(const GradientExpression< Expr > &u)
const Vec3 Zero3(0., 0., 0.)
#define MBDYN_EXCEPT_ARGS
#define DEBUGCOUTFNAME(fname)
virtual integer GetInt(integer iDefval=0)
virtual const Mat3x3 & GetRCurr(void) const
Mat3x3 GetRotAbs(const ReferenceFrame &rf)
doublereal Norm(void) const
virtual bool GetBool(bool bDefval=false)
virtual void ReadInitialState(MBDynParser &HP)
#define ASSERTMSG(expr, msg)
const Mat3x3 Eye3(1., 0., 0., 0., 1., 0., 0., 0., 1.)
BasicFriction *const ParseFriction(MBDynParser &HP, DataManager *pDM)
BasicShapeCoefficient *const ParseShapeCoefficient(MBDynParser &HP)
OrientationDescription ReadOptionalOrientationDescription(DataManager *pDM, MBDynParser &HP)
void SetInverseDynamicsFlags(unsigned uIDF)
bool IsExactlySame(const Vec3 &v) const
virtual const StructNode * pGetNode(unsigned int i) const
virtual bool GetYesNoOrBool(bool bDefval=false)
Vec3 MulTV(const Vec3 &v) const
TplDriveCaller< Vec3 > * ReadDCVecAbs(const DataManager *pDM, MBDynParser &HP, const ReferenceFrame &rf)
Elem * pFindElem(Elem::Type Typ, unsigned int uElem, unsigned int iDeriv) const
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)
TplDriveCaller< Vec3 > * ReadDC3D(const DataManager *pDM, MBDynParser &HP)
#define SAFENEW(pnt, item)
Vec3 GetPosRel(const ReferenceFrame &rf)
bool IsExactlySame(const Mat3x3 &m) const
virtual bool IsKeyWord(const char *sKeyWord)
Vec3 GetPosAbs(const ReferenceFrame &rf)
Mat3x3 Rot(const Vec3 &phi)
bool PushCurrData(const std::string &name, const TypedValue &value)
const Beam * pGetBeam(void) const
ConstitutiveLaw6D * GetConstLaw6D(ConstLawType::Type &clt)
OrientationDescription GetOrientationDescription(void) const
bool PopCurrData(const std::string &name)
Mat3x3 MulTM(const Mat3x3 &m) const
VectorExpression< VectorCrossExpr< VectorLhsExpr, VectorRhsExpr >, 3 > Cross(const VectorExpression< VectorLhsExpr, 3 > &u, const VectorExpression< VectorRhsExpr, 3 > &v)
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
virtual const Vec3 & GetXCurr(void) const
VectorExpression< VectorExpr, N_rows >::ScalarType Norm(const VectorExpression< VectorExpr, N_rows > &u)
const Mat3x3 & GetR(unsigned int i) const
virtual unsigned int iGetNumDof(void) const
std::ostream & GetLogFile(void) const
Joint * ReadModal(DataManager *pDM, MBDynParser &HP, const DofOwner *pDO, unsigned int uLabel)
#define SAFENEWARR(pnt, item, sz)
DriveCaller * GetDriveCaller(bool bDeferred=false)
Vec3 GetUnitVecRel(const ReferenceFrame &rf)
virtual Elem * pGetElem(void) const
ConstitutiveLaw3D * GetConstLaw3D(ConstLawType::Type &clt)
virtual HighParser::ErrOut GetLineData(void) const
unsigned int GetLabel(void) const
Node * ReadNode(MBDynParser &HP, Node::Type type) const
#define DEBUGLCOUT(level, msg)
ConstitutiveLaw1D * GetConstLaw1D(ConstLawType::Type &clt)
TplDriveCaller< Vec3 > * ReadDCVecRel(const DataManager *pDM, MBDynParser &HP, const ReferenceFrame &rf)
bool bIsInverseDynamics(void) const
virtual doublereal GetReal(const doublereal &dDefval=0.0)