47 static const char idx2xyz[] = {
'x',
'y',
'z' };
52 bool bPos[3],
bool bVel[3],
54 bool bRot[3],
bool bAgv[3],
63 pNode1(pN1), pNode2(pN2),
64 f1(f1Tmp), R1h(R1hTmp), R1hr(R1hrTmp),
65 f2(f2Tmp), R2h(R2hTmp), R2hr(R2hrTmp),
66 XDrv(pDCPos[0]), XPDrv(pDCPos[1]), XPPDrv(pDCPos[2]),
67 ThetaDrv(pDCRot[0]), OmegaDrv(pDCRot[1]), OmegaPDrv(pDCRot[2]),
68 nConstraints(0), nPosConstraints(0), nRotConstraints(0),
69 nVelConstraints(0), nAgvConstraints(0),
70 tilde_f1(R1h.MulTV(f1)),
79 ThetaDeltaRemnant(::
Zero3),
80 ThetaDeltaTrue(::
Zero3)
85 unsigned int index = 0;
87 for (
unsigned int i = 0; i < 3; i++) {
88 ASSERT(bPos[i] ==
false || bVel[i] ==
false);
109 for (
unsigned int i = 0; i < 3; i++) {
110 ASSERT(bRot[i] ==
false || bAgv[i] ==
false);
189 const char *prefix,
bool bInitial)
const
194 out << prefix << iIndex + 1;
199 "reaction force(s) [";
201 for (
unsigned int i = 0, cnt = 0; i < 3; i++) {
210 out <<
"]" << std::endl;
219 "reaction couple(s) [";
221 for (
unsigned int i = 0, cnt = 0; i < 3; i++) {
230 out <<
"]" << std::endl;
237 out << prefix << iIndex + 1;
242 "reaction force(s) derivative(s) [";
244 for (
unsigned int i = 0, cnt = 0; i < 3; i++) {
253 out <<
"]" << std::endl;
263 "reaction couple(s) derivative(s) [";
265 for (
unsigned int i = 0, cnt = 0; i < 3; i++) {
274 out <<
"]" << std::endl;
283 bool bInitial,
int i)
const
296 std::ostringstream os;
297 os <<
"TotalJoint(" <<
GetLabel() <<
")";
300 std::string name(os.str());
301 unsigned int cnt = 0;
304 for (
unsigned int i = 0; i < 3; i++) {
307 os.seekp(0, std::ios_base::end);
308 os <<
": dof(" << cnt + 1 <<
") F" <<
idx2xyz[i];
309 desc[cnt] = os.str();
316 for (
unsigned int i = 0; i < 3; i++) {
319 os.seekp(0, std::ios_base::end);
320 os <<
": dof(" << cnt + 1 <<
") M" <<
idx2xyz[i];
321 desc[cnt] = os.str();
329 for (
unsigned int i = 0; i < 3; i++) {
332 os.seekp(0, std::ios_base::end);
333 os <<
": dof(" << cnt + 1 <<
") FP" <<
idx2xyz[i];
334 desc[cnt] = os.str();
341 for (
unsigned int i = 0; i < 3; i++) {
344 os.seekp(0, std::ios_base::end);
345 os <<
": dof(" << cnt + 1 <<
") MP" <<
idx2xyz[i];
346 desc[cnt] = os.str();
356 os <<
": dof(" << i + 1 <<
")";
363 const char *prefix,
bool bInitial)
const
368 out << prefix << iIndex + 1;
373 "position/velocity constraint(s) [";
375 for (
unsigned int i = 0, cnt = 0; i < 3; i++) {
390 out <<
"]" << std::endl;
399 "orientation/angular velocity constraint(s) [";
401 for (
unsigned int i = 0, cnt = 0; i < 3; i++) {
416 out <<
"]" << std::endl;
423 out << prefix << iIndex + 1;
428 "velocity constraint(s) [";
430 for (
unsigned int i = 0, cnt = 0; i < 3; i++) {
440 out <<
"]" << std::endl;
449 "angular velocity constraint(s) [";
451 for (
unsigned int i = 0, cnt = 0; i < 3; i++) {
461 out <<
"]" << std::endl;
470 bool bInitial,
int i)
const
483 std::ostringstream os;
484 os <<
"TotalJoint(" <<
GetLabel() <<
")";
487 std::string name(os.str());
488 unsigned int cnt = 0;
491 for (
unsigned int i = 0; i < 3; i++) {
494 os.seekp(0, std::ios_base::end);
495 os <<
": equation(" << cnt + 1 <<
") P" <<
idx2xyz[i] <<
"1=P" <<
idx2xyz[i] <<
"2";
496 desc[cnt] = os.str();
501 os.seekp(0, std::ios_base::end);
502 os <<
": equation(" << cnt + 1 <<
") V" <<
idx2xyz[i] <<
"1=V" <<
idx2xyz[i] <<
"2";
503 desc[cnt] = os.str();
510 for (
unsigned int i = 0; i < 3; i++) {
513 os.seekp(0, std::ios_base::end);
514 os <<
": equation(" << cnt + 1 <<
") theta" <<
idx2xyz[i] <<
"1=theta" <<
idx2xyz[i] <<
"2";
515 desc[cnt] = os.str();
520 os.seekp(0, std::ios_base::end);
521 os <<
": equation(" << cnt + 1 <<
") W" <<
idx2xyz[i] <<
"1=W" <<
idx2xyz[i] <<
"2";
522 desc[cnt] = os.str();
530 for (
unsigned int i = 0; i < 3; i++) {
533 os.seekp(0, std::ios_base::end);
534 os <<
": equation(" << cnt + 1 <<
") v" <<
idx2xyz[i] <<
"1=v" <<
idx2xyz[i] <<
"2";
535 desc[cnt] = os.str();
542 for (
unsigned int i = 0; i < 3; i++) {
545 os.seekp(0, std::ios_base::end);
546 os <<
": equation(" << cnt + 1 <<
") w" <<
idx2xyz[i] <<
"1=w" <<
idx2xyz[i] <<
"2";
547 desc[cnt] = os.str();
557 os <<
": equation(" << i + 1 <<
")";
568 for (
unsigned int i = 0; i < ph->size(); i++) {
606 pedantic_cout(
"TotalJoint(" <<
uLabel <<
"): "
607 "creating drive from hint[" << i <<
"]..." << std::endl);
611 silent_cerr(
"TotalJoint(" <<
uLabel <<
"): "
612 "unable to create drive "
613 "after hint #" << i << std::endl);
639 }
else if (dynamic_cast<Joint::ReactionsHint *>(pjh)) {
651 if (strncasecmp(s,
"offset{" ,
STRLENOF(
"offset{" )) == 0)
655 if (strcmp(&s[1],
"}") != 0) {
667 }
else if (strncasecmp(s,
"position-hinge{" ,
STRLENOF(
"position-hinge{" )) == 0) {
670 if (strcmp(&s[1],
"}") != 0) {
682 }
else if (strncasecmp(s,
"position-drive3{" ,
STRLENOF(
"position-drive3{" )) == 0) {
694 }
else if (strncasecmp(s,
"orientation-hinge{" ,
STRLENOF(
"orientation-hinge{" )) == 0) {
695 s +=
STRLENOF(
"orientation-hinge{" );
697 if (strcmp(&s[1],
"}") != 0) {
709 }
else if (strncasecmp(s,
"orientation-drive3{" ,
STRLENOF(
"orientation-drive3{" )) == 0) {
759 <<
"position orientation, "
764 <<
"rotation orientation, "
772 <<
"position orientation, "
777 <<
"rotation orientation, "
786 out <<
", position constraint";
787 for (
unsigned i = 0; i < 3; i++) {
809 out <<
", orientation constraint";
810 for (
unsigned i = 0; i < 3; i++) {
815 out <<
", angular velocity";
829 return out <<
";" << std::endl;
843 DEBUGCOUT(
"Entering TotalJoint::AssJac()" << std::endl);
866 for (
int iCnt = 1; iCnt <= 6; iCnt++) {
869 WM.
PutRowIndex(6 + iCnt, iNode2FirstMomIndex + iCnt);
870 WM.
PutColIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
873 for (
unsigned int iCnt = 1; iCnt <=
nConstraints; iCnt++) {
874 WM.
PutRowIndex(12 + iCnt, iFirstReactionIndex + iCnt);
875 WM.
PutColIndex(12 + iCnt, iFirstReactionIndex + iCnt);
887 Vec3 FTmp(R1*(
F*dCoef));
888 Vec3 MTmp(R1r*(
M*dCoef));
898 WM.
Add(1, 3 + 1, Tmp);
901 WM.
Sub(3 + 1, 1, Tmp);
903 WM.
Add(3 + 1, 6 + 1, Tmp);
906 WM.
Sub(6 + 1, 3 + 1, Tmp);
912 WM.
Sub(3 + 1, 9 + 1, Tmp);
915 WM.
Add(9 + 1, 9 + 1, Tmp);
932 b1Cross_R1 = b1.Cross(R1);
933 b2Cross_R1 = b2.Cross(R1);
976 Vec3 vOmega1Cross_R1(Omega1Cross_R1.GetVec(
iVelIncid[iCnt])*dCoef);
1033 Vec3 vW2_Cross_R1(W2_Cross_R1.GetVec(
iAgvIncid[iCnt])*dCoef);
1065 DEBUGCOUT(
"Entering TotalJoint::AssRes()" << std::endl);
1084 for (
int iCnt = 1; iCnt <= 6; iCnt++) {
1085 WorkVec.
PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
1086 WorkVec.
PutRowIndex(6 + iCnt, iNode2FirstMomIndex + iCnt);
1090 for (
unsigned int iCnt = 1; iCnt <=
nConstraints; iCnt++) {
1091 WorkVec.
PutRowIndex(12 + iCnt, iFirstReactionIndex + iCnt);
1119 if (nPosConstraints) {
1124 if (nVelConstraints) {
1134 if (nRotConstraints) {
1138 if (nRotConstraints < 3) {
1139 for (
int i = nRotConstraints; i < 3; i++) {
1153 if (nAgvConstraints) {
1161 WorkVec.
Add(1, FTmp);
1162 WorkVec.
Add(3 + 1, MTmp + b1.
Cross(FTmp));
1165 WorkVec.
Sub(6 + 1, FTmp);
1166 WorkVec.
Sub(9 + 1, MTmp + b2.
Cross(FTmp));
1213 DEBUGCOUT(
"Entering TotalJoint::AssJac()" << std::endl);
1236 for (
int iCnt = 1; iCnt <= 6; iCnt++) {
1238 WM.
PutColIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
1241 for (
unsigned int iCnt = 1; iCnt <=
nConstraints; iCnt++) {
1252 Mat3x3 b1Cross_R1(b1.Cross(R1));
1253 Mat3x3 b2Cross_R1(b2.Cross(R1));
1261 WM.
SubT(1 + iCnt, 1, vR1);
1262 WM.
SubT(1 + iCnt, 3 + 1, vb1Cross_R1);
1265 WM.
AddT(1 + iCnt, 6 + 1, vR1);
1266 WM.
AddT(1 + iCnt, 9 + 1, vb2Cross_R1);
1313 for (
unsigned int iCnt = 1; iCnt <=
nConstraints; iCnt++) {
1314 WorkVec.
PutRowIndex(iCnt, iFirstReactionIndex + iCnt);
1427 Vec3 Tmp2 = R2r * Tmp;
1430 Tmp2 = R1r.
MulTV(Tmp);
1472 "INDEX ERROR in TotalJoint::GetEqType");
1486 Var_X = OH.CreateVar<
Vec3>(name +
"X",
"m",
1487 "local relative position (x, y, z)");
1492 Var_V = OH.CreateVar<
Vec3>(name +
"V",
"m/s",
1493 "local relative velocity (x, y, z)");
1495 Var_Omega = OH.CreateVar<
Vec3>(name +
"Omega",
"radian/s",
1496 "local relative angular velocity (x, y, z)");
1498 #endif // USE_NETCDF
1522 Vec3 b1(X2 + b2 - X1);
1524 Vec3 VTmp(R1Tmp.MulTV(
V2 + Omega2.Cross(b2) -
V1 - Omega1.Cross(b1)));
1525 Vec3 OmegaTmp(R1rTmp.
MulTV(Omega2 - Omega1));
1528 Vec3 MTmp(R1rTmp*
M);
1542 #endif // USE_NETCDF
1597 integer iNode1FirstVelIndex = iNode1FirstPosIndex + 6;
1599 integer iNode2FirstVelIndex = iNode2FirstPosIndex + 6;
1605 for (
int iCnt = 1; iCnt <= 6; iCnt++) {
1608 WM.
PutRowIndex(6 + iCnt, iNode1FirstVelIndex + iCnt);
1609 WM.
PutColIndex(6 + iCnt, iNode1FirstVelIndex + iCnt);
1610 WM.
PutRowIndex(12 + iCnt, iNode2FirstPosIndex + iCnt);
1611 WM.
PutColIndex(12 + iCnt, iNode2FirstPosIndex + iCnt);
1612 WM.
PutRowIndex(18 + iCnt, iNode2FirstVelIndex + iCnt);
1613 WM.
PutColIndex(18 + iCnt, iNode2FirstVelIndex + iCnt);
1617 for (
unsigned int iCnt = 1; iCnt <=
nConstraints; iCnt++) {
1618 WM.
PutRowIndex(24 + iCnt, iFirstReactionIndex + iCnt);
1619 WM.
PutColIndex(24 + iCnt, iFirstReactionIndex + iCnt);
1620 WM.
PutRowIndex(24 + nConstraints + iCnt, iReactionPrimeIndex + iCnt);
1621 WM.
PutColIndex(24 + nConstraints + iCnt, iReactionPrimeIndex + iCnt);
1641 FPrime(
iPosIncid[iCnt]) = XCurr(iReactionPrimeIndex + 1 + iCnt);
1645 MPrime(
iRotIncid[iCnt]) = XCurr(iReactionPrimeIndex + 1 + nPosConstraints + iCnt);
1650 Vec3 FPrimeTmp(R1 * FPrime);
1651 Vec3 MPrimeTmp(R1r * MPrime);
1659 WM.
Add(1, 3 + 1, Tmp);
1662 WM.
Sub(3 + 1, 1, Tmp);
1664 WM.
Add(3 + 1, 12 + 1, Tmp);
1667 WM.
Sub(12 + 1, 3 + 1, Tmp);
1673 WM.
Add(6 + 1, 9 + 1, Tmp);
1676 WM.
Sub(9 + 1, 6 + 1, Tmp);
1678 WM.
Add(9 + 1, 18 + 1, Tmp);
1681 WM.
Sub(18 + 1 , 9 + 1, Tmp);
1687 WM.
Sub(3 + 1, 15 + 1, Tmp);
1690 WM.
Add(15 + 1, 15 + 1, Tmp);
1696 WM.
Sub(9 + 1, 21 + 1, Tmp);
1699 WM.
Add(21 + 1, 21 + 1, Tmp);
1721 Mat3x3 b1Cross_R1(b1.Cross(R1));
1722 Mat3x3 b2Cross_R1(b2.Cross(R1));
1730 WM.
Sub(1, 24 + 1 + iCnt, vR1);
1731 WM.
Sub(3 + 1, 24 + 1 + iCnt, vb1Cross_R1);
1734 WM.
SubT(24 + 1 + iCnt, 1, vR1);
1735 WM.
SubT(24 + 1 + iCnt, 3 + 1, vb1Cross_R1);
1738 WM.
Sub(6 + 1, 24 + 1 + nConstraints + iCnt, vR1);
1739 WM.
Sub(9 + 1, 24 + 1 + nConstraints + iCnt, vb1Cross_R1);
1742 WM.
SubT(24 + 1 + nConstraints + iCnt, 6 + 1, vR1);
1743 WM.
SubT(24 + 1 + nConstraints + iCnt, 9 + 1, vb1Cross_R1);
1746 WM.
Add(12 + 1, 24 + 1 + iCnt, vR1);
1747 WM.
Add(15 + 1, 24 + 1 + iCnt, vb2Cross_R1);
1750 WM.
AddT(24 + 1 + iCnt, 12 + 1, vR1);
1751 WM.
AddT(24 + 1 + iCnt, 15 + 1, vb2Cross_R1);
1754 WM.
Add(18 + 1, 24 + 1 + nConstraints + iCnt, vR1);
1755 WM.
Add(21 + 1, 24 + 1 + nConstraints + iCnt, vb2Cross_R1);
1758 WM.
AddT(24 + 1 + nConstraints + iCnt, 18 + 1, vR1);
1759 WM.
AddT(24 + 1 + nConstraints + iCnt, 21 + 1, vb2Cross_R1);
1766 WM.
Sub(3 + 1, 24 + 1 + nPosConstraints + iCnt, vR1);
1769 WM.
SubT(24 + 1 + nPosConstraints + iCnt, 3 + 1, vR1);
1772 WM.
Sub(9 + 1, 24 + 1 + nConstraints + nPosConstraints + iCnt, vR1);
1775 WM.
SubT(24 + 1 + nConstraints + nPosConstraints + iCnt, 9 + 1, vR1);
1778 WM.
Add(15 + 1, 24 + 1 + nPosConstraints + iCnt, vR1);
1781 WM.
AddT(24 + 1 + nPosConstraints + iCnt, 15 + 1, vR1);
1784 WM.
Add(21 + 1, 24 + 1 + nConstraints + nPosConstraints + iCnt, vR1);
1787 WM.
AddT(24 + 1 + nConstraints + nPosConstraints + iCnt, 21 + 1, vR1);
1804 DEBUGCOUT(
"Entering TotalJoint::InitialAssRes()" << std::endl);
1814 integer iNode1FirstVelIndex = iNode1FirstPosIndex + 6;
1816 integer iNode2FirstVelIndex = iNode2FirstPosIndex + 6;
1821 for (
int iCnt = 1; iCnt <= 6; iCnt++) {
1822 WorkVec.
PutRowIndex(iCnt, iNode1FirstPosIndex+iCnt);
1823 WorkVec.
PutRowIndex(6 + iCnt, iNode1FirstVelIndex + iCnt);
1824 WorkVec.
PutRowIndex(12 + iCnt, iNode2FirstPosIndex + iCnt);
1825 WorkVec.
PutRowIndex(18 + iCnt, iNode2FirstVelIndex + iCnt);
1828 for (
unsigned int iCnt = 1; iCnt <=
nConstraints; iCnt++) {
1829 WorkVec.
PutRowIndex(24 + iCnt, iFirstReactionIndex + iCnt);
1830 WorkVec.
PutRowIndex(24 + nConstraints + iCnt, iReactionPrimeIndex + iCnt);
1852 F(
iPosIncid[iCnt]) = XCurr(iFirstReactionIndex + 1 + iCnt);
1853 FPrime(
iPosIncid[iCnt]) = XCurr(iReactionPrimeIndex + 1 + iCnt);
1857 M(
iRotIncid[iCnt]) = XCurr(iFirstReactionIndex + 1 + nPosConstraints + iCnt);
1858 MPrime(
iRotIncid[iCnt]) = XCurr(iReactionPrimeIndex + 1 + nPosConstraints + iCnt);
1863 Vec3 FPrimeTmp(R1 * FPrime);
1864 Vec3 MPrimeTmp(R1r * MPrime);
1867 WorkVec.
Add(1, FTmp);
1868 WorkVec.
Add(3 + 1, b1.Cross(FTmp) + MTmp);
1871 WorkVec.
Add(6 + 1, FPrimeTmp);
1872 WorkVec.
Add(9 + 1, b1.Cross(FPrimeTmp) + MPrimeTmp);
1875 WorkVec.
Sub(12 + 1, FTmp);
1876 WorkVec.
Sub(15 + 1, b2.Cross(FTmp) + MTmp);
1879 WorkVec.
Sub(18 + 1, FPrimeTmp);
1880 WorkVec.
Sub(21 + 1, b2.Cross(FPrimeTmp) + MPrimeTmp);
1885 Vec3 XDeltaPrime = R1.MulTV(b1Prime + b1.Cross(Omega1));
1894 Vec3 ThetaDeltaPrime = R1r.MulTV(Omega2 - Omega1);
1904 WorkVec.
PutCoef(24 + 1 + nConstraints + iCnt, -XDeltaPrime(
iPosIncid[iCnt]));
1910 WorkVec.
PutCoef(24 + 1 + nPosConstraints + nConstraints + iCnt, -ThetaDeltaPrime(
iRotIncid[iCnt]));
1928 if (strlen(s) != 2) {
1932 unsigned int off = 0;
2009 return Theta(i - 3);
2076 bool bPos[3],
bool bVel[3],
2078 bool bRot[3],
bool bAgv[3],
2085 Joint(uL, pDO, fOut),
2087 Xc(XcTmp), Rch(RchTmp), Rchr(RchrTmp),
2088 tilde_fn(fnTmp), tilde_Rnh(RnhTmp), tilde_Rnhr(RnhrTmp),
2090 XDrv(pDCPos[0]), XPDrv(pDCPos[1]), XPPDrv(pDCPos[2]),
2091 ThetaDrv(pDCRot[0]), OmegaDrv(pDCRot[1]), OmegaPDrv(pDCRot[2]),
2092 nConstraints(0), nPosConstraints(0), nRotConstraints(0),
2093 nVelConstraints(0), nAgvConstraints(0),
2101 ThetaDelta(::
Zero3),
2102 ThetaDeltaPrev(::
Zero3),
2103 ThetaDeltaRemnant(::
Zero3),
2104 ThetaDeltaTrue(::
Zero3)
2109 unsigned int index = 0;
2111 for (
unsigned int i = 0; i < 3; i++) {
2131 for (
unsigned int i = 0; i < 3; i++) {
2209 const char *prefix,
bool bInitial)
const
2214 out << prefix << iIndex + 1;
2220 out <<
"reaction force(s) [";
2222 for (
unsigned int i = 0, cnt = 0; i < 3; i++) {
2231 out <<
"]" << std::endl;
2240 out <<
"reaction couple(s) [";
2242 for (
unsigned int i = 0, cnt = 0; i < 3; i++) {
2251 out <<
"]" << std::endl;
2257 out << prefix << iIndex + 1;
2263 out <<
"reaction force(s) derivative(s) [";
2265 for (
unsigned int i = 0, cnt = 0; i < 3; i++) {
2274 out <<
"]" << std::endl;
2284 out <<
"reaction couple(s) derivative(s) [";
2286 for (
unsigned int i = 0, cnt = 0; i < 3; i++) {
2295 out <<
"]" << std::endl;
2303 bool bInitial,
int i)
const
2316 std::ostringstream os;
2317 os <<
"TotalPinJoint(" <<
GetLabel() <<
")";
2320 std::string name(os.str());
2321 unsigned int cnt = 0;
2324 for (
unsigned int i = 0; i < 3; i++) {
2327 os.seekp(0, std::ios_base::end);
2328 os <<
": dof(" << cnt + 1 <<
") F" <<
idx2xyz[i];
2329 desc[cnt] = os.str();
2336 for (
unsigned int i = 0; i < 3; i++) {
2339 os.seekp(0, std::ios_base::end);
2340 os <<
": dof(" << cnt + 1 <<
") M" <<
idx2xyz[i];
2341 desc[cnt] = os.str();
2349 for (
unsigned int i = 0; i < 3; i++) {
2352 os.seekp(0, std::ios_base::end);
2353 os <<
": dof(" << cnt + 1 <<
") FP" <<
idx2xyz[i];
2354 desc[cnt] = os.str();
2361 for (
unsigned int i = 0; i < 3; i++) {
2364 os.seekp(0, std::ios_base::end);
2365 os <<
": dof(" << cnt + 1 <<
") MP" <<
idx2xyz[i];
2366 desc[cnt] = os.str();
2376 os <<
": dof(" << i + 1 <<
")";
2383 const char *prefix,
bool bInitial)
const
2388 out << prefix << iIndex + 1;
2393 "position/velocity constraint(s) [";
2395 for (
unsigned int i = 0, cnt = 0; i < 3; i++) {
2410 out <<
"]" << std::endl;
2419 "orientation/angular velocity constraint(s) [";
2421 for (
unsigned int i = 0, cnt = 0; i < 3; i++) {
2436 out <<
"]" << std::endl;
2443 out << prefix << iIndex + 1;
2446 "velocity constraint(s) [";
2448 for (
unsigned int i = 0, cnt = 0; i < 3; i++) {
2458 out <<
"]" << std::endl;
2467 "angular velocity constraint(s) [";
2469 for (
unsigned int i = 0, cnt = 0; i < 3; i++) {
2479 out <<
"]" << std::endl;
2488 bool bInitial,
int i)
const
2501 std::ostringstream os;
2502 os <<
"TotalPinJoint(" <<
GetLabel() <<
")";
2505 std::string name(os.str());
2506 unsigned int cnt = 0;
2509 for (
unsigned int i = 0; i < 3; i++) {
2512 os.seekp(0, std::ios_base::end);
2513 os <<
": equation(" << cnt + 1 <<
") P" <<
idx2xyz[i] <<
"1=P" <<
idx2xyz[i] <<
"2";
2514 desc[cnt] = os.str();
2519 os.seekp(0, std::ios_base::end);
2520 os <<
": equation(" << cnt + 1 <<
") V" <<
idx2xyz[i] <<
"1=V" <<
idx2xyz[i] <<
"2";
2521 desc[cnt] = os.str();
2528 for (
unsigned int i = 0; i < 3; i++) {
2531 os.seekp(0, std::ios_base::end);
2532 os <<
": equation(" << cnt + 1 <<
") theta" <<
idx2xyz[i] <<
"1=theta" <<
idx2xyz[i] <<
"2";
2533 desc[cnt] = os.str();
2538 os.seekp(0, std::ios_base::end);
2539 os <<
": equation(" << cnt + 1 <<
") W" <<
idx2xyz[i] <<
"1=W" <<
idx2xyz[i] <<
"2";
2540 desc[cnt] = os.str();
2548 for (
unsigned int i = 0; i < 3; i++) {
2551 os.seekp(0, std::ios_base::end);
2552 os <<
": equation(" << cnt + 1 <<
") v" <<
idx2xyz[i] <<
"1=v" <<
idx2xyz[i] <<
"2";
2553 desc[cnt] = os.str();
2560 for (
unsigned int i = 0; i < 3; i++) {
2563 os.seekp(0, std::ios_base::end);
2564 os <<
": equation(" << cnt + 1 <<
") w" <<
idx2xyz[i] <<
"1=w" <<
idx2xyz[i] <<
"2";
2565 desc[cnt] = os.str();
2575 os <<
": equation(" << i + 1 <<
")";
2586 for (
unsigned int i = 0; i < ph->size(); i++) {
2624 pedantic_cout(
"TotalPinJoint(" <<
uLabel <<
"): "
2625 "creating drive from hint[" << i <<
"]..." << std::endl);
2629 silent_cerr(
"TotalPinJoint(" <<
uLabel <<
"): "
2630 "unable to create drive "
2631 "after hint #" << i << std::endl);
2657 }
else if (dynamic_cast<Joint::ReactionsHint *>(pjh)) {
2669 if (strncasecmp(s,
"offset{" ,
STRLENOF(
"offset{" )) == 0)
2673 if (strcmp(&s[1],
"}") != 0) {
2685 }
else if (strncasecmp(s,
"position-hinge{" ,
STRLENOF(
"position-hinge{" )) == 0) {
2688 if (strcmp(&s[1],
"}") != 0) {
2700 }
else if (strncasecmp(s,
"position-drive3{" ,
STRLENOF(
"position-drive3{" )) == 0) {
2712 }
else if (strncasecmp(s,
"orientation-hinge{" ,
STRLENOF(
"orientation-hinge{" )) == 0) {
2713 s +=
STRLENOF(
"orientation-hinge{" );
2715 if (strcmp(&s[1],
"}") != 0) {
2727 }
else if (strncasecmp(s,
"orientation-drive3{" ,
STRLENOF(
"orientation-drive3{" )) == 0) {
2780 <<
"position orientation, "
2785 <<
"rotation orientation, "
2792 <<
"position orientation, "
2797 <<
"rotation orientation, "
2806 out <<
", position constraint";
2807 for (
unsigned i = 0; i < 3; i++) {
2811 out <<
", velocity";
2813 out <<
", inactive";
2827 out <<
", orientation constraint";
2828 for (
unsigned i = 0; i < 3; i++) {
2832 out <<
", angular velocity";
2834 out <<
", inactive";
2845 return out <<
";" << std::endl;
2859 DEBUGCOUT(
"Entering TotalPinJoint::AssJac()" << std::endl);
2880 for (
int iCnt = 1; iCnt <= 6; iCnt++) {
2885 for (
unsigned int iCnt = 1; iCnt <=
nConstraints; iCnt++) {
2886 WM.
PutRowIndex(6 + iCnt, iFirstReactionIndex + iCnt);
2887 WM.
PutColIndex(6 + iCnt, iFirstReactionIndex + iCnt);
2911 WM.
Add(1, 6 + 1 + iCnt, vRch);
2912 WM.
Add(3 + 1, 6 + 1 + iCnt, vfnCross_Rch);
2915 WM.
AddT(6 + 1 + iCnt, 1, vRch);
2916 WM.
AddT(6 + 1 + iCnt, 3 + 1, vfnCross_Rch);
2923 WM.
Add(3 + 1, 6 + 1 + nPosConstraints + iCnt, vRchr);
2926 WM.
AddT(6 + 1 + nPosConstraints + iCnt, 3 + 1, vRchr);
2941 DEBUGCOUT(
"Entering TotalPinJoint::AssRes()" << std::endl);
2959 for (
int iCnt = 1; iCnt <= 6; iCnt++) {
2960 WorkVec.
PutRowIndex(iCnt, iNodeFirstMomIndex + iCnt);
2964 for (
unsigned int iCnt = 1; iCnt <=
nConstraints; iCnt++) {
2965 WorkVec.
PutRowIndex(6 + iCnt, iFirstReactionIndex + iCnt);
2989 if (nPosConstraints > 0) {
2994 if (nVelConstraints > 0) {
2998 if (nRotConstraints > 0) {
3002 if (nRotConstraints < 3) {
3003 for (
int i = nRotConstraints; i < 3; i++) {
3017 if (nAgvConstraints > 0) {
3025 WorkVec.
Sub(1, FTmp);
3026 WorkVec.
Sub(3 + 1, MTmp + fn.
Cross(FTmp));
3076 DEBUGCOUT(
"Entering TotalPinJoint::AssJac()" << std::endl);
3096 for (
int iCnt = 1; iCnt <= 6; iCnt++) {
3100 for (
unsigned int iCnt = 1; iCnt <=
nConstraints; iCnt++) {
3114 WM.
AddT(1 + iCnt, 1, vRch);
3115 WM.
AddT(3 + 1 + iCnt, 3 + 1, vfnCross_Rch);
3122 WM.
AddT(1 + nPosConstraints + iCnt, 3 + 1, vRchr);
3136 DEBUGCOUT(
"Entering TotalPinJoint::AssRes()" << std::endl);
3155 for (
unsigned int iCnt = 1; iCnt <=
nConstraints; iCnt++) {
3156 WorkVec.
PutRowIndex(iCnt, iFirstReactionIndex + iCnt);
3243 Vec3 Tmp2 = Rnhr * Tmp;
3287 "INDEX ERROR in TotalPinJoint::GetEqType");
3301 Var_X = OH.CreateVar<
Vec3>(name +
"X",
"m",
3302 "local relative position (x, y, z)");
3307 Var_V = OH.CreateVar<
Vec3>(name +
"V",
"m/s",
3308 "local relative velocity (x, y, z)");
3310 Var_Omega = OH.CreateVar<
Vec3>(name +
"Omega",
"radian/s",
3311 "local relative angular velocity (x, y, z)");
3313 #endif // USE_NETCDF
3332 Vec3 VTmp(
RchT*(Vn + Omegan.Cross(fn)));
3350 #endif // USE_NETCDF
3405 integer iNodeFirstVelIndex = iNodeFirstPosIndex + 6;
3411 for (
int iCnt = 1; iCnt <= 6; iCnt++) {
3414 WM.
PutRowIndex(6 + iCnt, iNodeFirstVelIndex + iCnt);
3415 WM.
PutColIndex(6 + iCnt, iNodeFirstVelIndex + iCnt);
3419 for (
unsigned int iCnt = 1; iCnt <=
nConstraints; iCnt++) {
3420 WM.
PutRowIndex(12 + iCnt, iFirstReactionIndex + iCnt);
3421 WM.
PutColIndex(12 + iCnt, iFirstReactionIndex + iCnt);
3422 WM.
PutRowIndex(12 + nConstraints + iCnt, iReactionPrimeIndex + iCnt);
3423 WM.
PutColIndex(12 + nConstraints + iCnt, iReactionPrimeIndex + iCnt);
3439 FPrime(
iPosIncid[iCnt]) = XCurr(iReactionPrimeIndex + 1 + iCnt);
3443 MPrime(
iRotIncid[iCnt]) = XCurr(iReactionPrimeIndex + 1 + nPosConstraints + iCnt);
3463 WM.
Add(1, 12 + 1 + iCnt, vRch);
3464 WM.
Add(3 + 1, 12 + 1 + iCnt, vfnCross_Rch);
3467 WM.
AddT(12 + 1 + iCnt, 1, vRch);
3468 WM.
AddT(12 + 1 + iCnt, 3 + 1, vfnCross_Rch);
3471 WM.
Add(6 + 1, 12 + 1 + nConstraints + iCnt, vRch);
3472 WM.
Add(9 + 1, 12 + 1 + nConstraints + iCnt, vfnCross_Rch);
3475 WM.
AddT(12 + 1 + nConstraints + iCnt, 6 + 1, vRch);
3476 WM.
AddT(12 + 1 + nConstraints + iCnt, 9 + 1, vfnCross_Rch);
3483 WM.
Add(3 + 1, 12 + 1 + nPosConstraints + iCnt, vRchr);
3486 WM.
AddT(12 + 1 + nPosConstraints + iCnt, 3 + 1, vRchr);
3489 WM.
Add(9 + 1, 12 + 1 + nConstraints + nPosConstraints + iCnt, vRchr);
3492 WM.
AddT(12 + 1 + nConstraints + nPosConstraints + iCnt, 9 + 1, vRchr);
3509 DEBUGCOUT(
"Entering TotalPinJoint::InitialAssRes()" << std::endl);
3519 integer iNodeFirstVelIndex = iNodeFirstPosIndex + 6;
3524 for (
int iCnt = 1; iCnt <= 6; iCnt++) {
3525 WorkVec.
PutRowIndex(iCnt, iNodeFirstPosIndex + iCnt);
3526 WorkVec.
PutRowIndex(6 + iCnt, iNodeFirstVelIndex + iCnt);
3529 for (
unsigned int iCnt = 1; iCnt <=
nConstraints; iCnt++) {
3530 WorkVec.
PutRowIndex(12 + iCnt, iFirstReactionIndex + iCnt);
3531 WorkVec.
PutRowIndex(12 + nConstraints + iCnt, iReactionPrimeIndex + iCnt);
3545 F(
iPosIncid[iCnt]) = XCurr(iFirstReactionIndex + 1 + iCnt);
3546 FPrime(
iPosIncid[iCnt]) = XCurr(iReactionPrimeIndex + 1 + iCnt);
3550 M(
iRotIncid[iCnt]) = XCurr(iFirstReactionIndex + 1 + nPosConstraints + iCnt);
3551 MPrime(
iRotIncid[iCnt]) = XCurr(iReactionPrimeIndex + 1 + nPosConstraints + iCnt);
3560 WorkVec.
Sub(1, FTmp);
3561 WorkVec.
Sub(3 + 1, fn.Cross(FTmp) + MTmp);
3564 WorkVec.
Sub(6 + 1, FPrimeTmp);
3565 WorkVec.
Sub(9 + 1, fn.Cross(FPrimeTmp) + MPrimeTmp);
3587 WorkVec.
PutCoef(12 + 1 + nConstraints + iCnt, -(XDeltaPrime(
iPosIncid[iCnt])));
3593 WorkVec.
PutCoef(12 + 1 + nPosConstraints + nConstraints + iCnt, -(ThetaDeltaPrime(
iRotIncid[iCnt])));
3610 if (strlen(s) != 2) {
3614 unsigned int off = 0;
3689 return Theta(i - 3);
3756 pNode1(pN1), pNode2(pN2),
3757 f1(f1Tmp), R1h(R1hTmp), R1hr(R1hrTmp),
3758 f2(f2Tmp), R2h(R2hTmp), R2hr(R2hrTmp),
3759 FDrv(pDCForce), MDrv(pDCCouple),
3771 <<
" " <<
F <<
" " <<
M << std::endl;
3780 "position, ",
f1.
Write(out,
", ") <<
", "
3781 "force orientation, ",
R1h.
Write(out,
", ") <<
", "
3782 "moment orientation, ",
R1hr.
Write(out,
", ") <<
", "
3784 "position, ",
f2.
Write(out,
", ") <<
", "
3785 "force orientation, ",
R2h.
Write(out,
", ") <<
", "
3786 "moment orientation, ",
R2hr.
Write(out,
", ") <<
", "
3800 DEBUGCOUT(
"Entering TotalForce::AssJac()" << std::endl);
3817 for (
int iCnt = 1; iCnt <= 6; iCnt++) {
3820 WM.
PutRowIndex(6 + iCnt, iNode2FirstMomIndex + iCnt);
3821 WM.
PutColIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
3831 Vec3 FTmp(R1*(
F*dCoef));
3832 Vec3 MTmp(R1r*(
M*dCoef));
3842 WM.
Add(1, 3 + 1, Tmp);
3845 WM.
Sub(3 + 1, 1, Tmp);
3847 WM.
Add(3 + 1, 6 + 1, Tmp);
3850 WM.
Sub(6 + 1, 3 + 1, Tmp);
3856 WM.
Sub(3 + 1, 9 + 1, Tmp);
3859 WM.
Add(9 + 1, 9 + 1, Tmp);
3882 DEBUGCOUT(
"Entering TotalForce::AssRes()" << std::endl);
3895 for (
int iCnt = 1; iCnt <= 6; iCnt++) {
3896 WorkVec.
PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
3897 WorkVec.
PutRowIndex(6+iCnt, iNode2FirstMomIndex + iCnt);
3916 WorkVec.
Add(1, FTmp);
3917 WorkVec.
Add(3 + 1, MTmp + b1.
Cross(FTmp));
3920 WorkVec.
Sub(6 + 1, FTmp);
3921 WorkVec.
Sub(9 + 1, MTmp + b2.
Cross(FTmp));
3956 for (
int iCnt = 1; iCnt <= 6; iCnt++) {
3957 WorkVec.
PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
3958 WorkVec.
PutRowIndex(6+iCnt, iNode2FirstMomIndex + iCnt);
3977 WorkVec.
Add(1, FTmp);
3978 WorkVec.
Add(3 + 1, MTmp + b1.
Cross(FTmp));
3981 WorkVec.
Sub(6 + 1, FTmp);
3982 WorkVec.
Sub(9 + 1, MTmp + b2.
Cross(FTmp));
4005 integer iNode1FirstVelIndex = iNode1FirstPosIndex + 6;
4007 integer iNode2FirstVelIndex = iNode2FirstPosIndex + 6;
4011 for (
int iCnt = 1; iCnt <= 6; iCnt++) {
4014 WM.
PutRowIndex(6 + iCnt, iNode1FirstVelIndex + iCnt);
4015 WM.
PutColIndex(6 + iCnt, iNode1FirstVelIndex + iCnt);
4016 WM.
PutRowIndex(12 + iCnt, iNode2FirstPosIndex + iCnt);
4017 WM.
PutColIndex(12 + iCnt, iNode2FirstPosIndex + iCnt);
4018 WM.
PutRowIndex(18 + iCnt, iNode2FirstVelIndex + iCnt);
4019 WM.
PutColIndex(18 + iCnt, iNode2FirstVelIndex + iCnt);
4043 WM.
Add(1, 3 + 1, Tmp);
4046 WM.
Sub(3 + 1, 1, Tmp);
4048 WM.
Add(3 + 1, 12 + 1, Tmp);
4051 WM.
Sub(12 + 1, 3 + 1, Tmp);
4057 WM.
Sub(3 + 1, 15 + 1, Tmp);
4060 WM.
Add(15 + 1, 15 + 1, Tmp);
4085 DEBUGCOUT(
"Entering TotalForce::InitialAssRes()" << std::endl);
4095 integer iNode1FirstVelIndex = iNode1FirstPosIndex + 6;
4097 integer iNode2FirstVelIndex = iNode2FirstPosIndex + 6;
4100 for (
int iCnt = 1; iCnt <= 6; iCnt++) {
4101 WorkVec.
PutRowIndex(iCnt, iNode1FirstPosIndex+iCnt);
4102 WorkVec.
PutRowIndex(6 + iCnt, iNode1FirstVelIndex + iCnt);
4103 WorkVec.
PutRowIndex(12 + iCnt, iNode2FirstPosIndex + iCnt);
4104 WorkVec.
PutRowIndex(18 + iCnt, iNode2FirstVelIndex + iCnt);
4130 WorkVec.
Add(1, FTmp);
4131 WorkVec.
Add(3 + 1, b1.Cross(FTmp) + MTmp);
4134 WorkVec.
Sub(12 + 1, FTmp);
4135 WorkVec.
Sub(15 + 1, b2.Cross(FTmp) + MTmp);
unsigned int iVelEqIndex[3]
unsigned int iVelEqIndex[3]
DofOrder::Order GetEqType(unsigned int i) const
virtual std::ostream & Restart(std::ostream &out) const
virtual unsigned int iGetInitialNumDof(void) const
void PutColIndex(integer iSubCol, integer iCol)
const Vec3 Zero3(0., 0., 0.)
Vec3 Cross(const Vec3 &v) const
#define ASSERTMSGBREAK(expr, msg)
virtual std::ostream & Restart(std::ostream &out) const
unsigned int iAgvIncid[3]
virtual void Output(OutputHandler &OH) const
std::ostream & Write(std::ostream &out, const char *sFill=" ") const
virtual unsigned int iGetNumDof(void) const
virtual const Mat3x3 & GetRRef(void) const
virtual bool bToBeOutput(void) const
MatrixExpression< TransposedMatrix< MatrixDirectExpr< Matrix< T, N_rows, N_cols > > >, N_cols, N_rows > Transpose(const Matrix< T, N_rows, N_cols > &A)
virtual bool bIsDifferentiable(void) const
#define MBDYN_EXCEPT_ARGS
TplDriveOwner< Vec3 > XPDrv
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
virtual void ResizeReset(integer)
VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
virtual std::ostream & DescribeDof(std::ostream &out, const char *prefix="", bool bInitial=false) const
const MatCross_Manip MatCross
bool UseNetCDF(int out) const
FullSubMatrixHandler & SetFull(void)
virtual const Mat3x3 & GetRCurr(void) const
void Add(integer iRow, integer iCol, const Vec3 &v)
SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
virtual doublereal dGetPrivData(unsigned int i) const
unsigned int nRotConstraints
unsigned int nAgvConstraints
virtual Hint * ParseHint(DataManager *pDM, const char *s) const
TplDriveOwner< Vec3 > OmegaPDrv
unsigned int nPosConstraints
virtual bool bInverseDynamics(void) const
unsigned int nVelConstraints
virtual void Sub(integer iRow, const Vec3 &v)
TplDriveOwner< Vec3 > ThetaDrv
TotalForce(unsigned int uL, TplDriveCaller< Vec3 > *const pDCForce, TplDriveCaller< Vec3 > *const pDCCouple, const StructNode *pN1, const Vec3 &f1Tmp, const Mat3x3 &R1hTmp, const Mat3x3 &R1hrTmp, const StructNode *pN2, const Vec3 &f2Tmp, const Mat3x3 &R2hTmp, const Mat3x3 &R2hrTmp, flag fOut)
unsigned int iPosIncid[3]
unsigned int nVelConstraints
virtual std::ostream & DescribeDof(std::ostream &out, const char *prefix="", bool bInitial=false) const
virtual std::ostream & Restart(std::ostream &out) const
const StructNode * pNode2
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
std::vector< Hint * > Hints
void OutputPrepare(OutputHandler &OH)
SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Vec3 GetVec(unsigned short int i) const
TplDriveOwner< Vec3 > XPPDrv
unsigned int iRotEqIndex[3]
TplDriveOwner< Vec3 > MDrv
void Set(const TplDriveCaller< T > *pDC)
void AddT(integer iRow, integer iCol, const Vec3 &v)
Vec3 VecRot(const Mat3x3 &Phi)
unsigned int iPosIncid[3]
virtual T GetP(void) const
virtual std::ostream & Restart(std::ostream &out) const
Vec3 MulTV(const Vec3 &v) const
unsigned int iVelIncid[3]
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
virtual void DecCoef(integer iRow, const doublereal &dCoef)=0
unsigned int iAgvIncid[3]
void OutputPrepare(OutputHandler &OH)
void Update(const VectorHandler &XCurr, InverseDynamics::Order iOrder=InverseDynamics::INVERSE_DYNAMICS)
unsigned int iPosEqIndex[3]
TplDriveOwner< Vec3 > OmegaPDrv
virtual Hint * ParseHint(DataManager *pDM, const char *s) const
TplDriveCaller< T > * pGetDriveCaller(void) const
TplDriveOwner< Vec3 > OmegaDrv
VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
TotalPinJoint(unsigned int uL, const DofOwner *pDO, bool bPos[3], bool bVel[3], TplDriveCaller< Vec3 > *const pDCPos[3], bool bRot[3], bool bAgv[3], TplDriveCaller< Vec3 > *const pDCRot[3], const Vec3 &XcTmp, const Mat3x3 &RchTmp, const Mat3x3 &RchrTmp, const StructNode *pN, const Vec3 &fnTmp, const Mat3x3 &RnhTmp, const Mat3x3 &RnhrTmp, flag fOut)
void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
unsigned int iAgvEqIndex[3]
unsigned int nAgvConstraints
const StructNode * pNode2
long GetCurrentStep(void) const
virtual void Update(const VectorHandler &XCurr, InverseDynamics::Order iOrder=InverseDynamics::INVERSE_DYNAMICS)
T Get(const doublereal &dVar) const
VariableSubMatrixHandler & InitialAssJac(VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
Mat3x3 Rot(const Vec3 &phi)
TplDriveOwner< Vec3 > XPDrv
virtual integer iGetFirstMomentumIndex(void) const =0
virtual integer iGetFirstPositionIndex(void) const
TplDriveOwner< Vec3 > XPPDrv
virtual const Vec3 & GetWCurr(void) const
unsigned int iAgvEqIndex[3]
DofOrder::Order GetEqType(unsigned int i) const
virtual std::ostream & Restart(std::ostream &out) const
const StructNode * pNode1
void Output(OutputHandler &OH) const
virtual bool bInverseDynamics(void) const
std::ostream & Joints(void) const
unsigned int iRotEqIndex[3]
virtual std::ostream & Restart(std::ostream &out) const =0
virtual void AfterConvergence(const VectorHandler &X, const VectorHandler &XP)
#define ASSERT(expression)
virtual unsigned int iGetInitialNumDof(void) const
VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
TplDriveOwner< Vec3 > OmegaDrv
virtual bool bInverseDynamics(void) const
Mat3x3 MulTM(const Mat3x3 &m) const
virtual void PutCoef(integer iRow, const doublereal &dCoef)=0
VectorExpression< VectorCrossExpr< VectorLhsExpr, VectorRhsExpr >, 3 > Cross(const VectorExpression< VectorLhsExpr, 3 > &u, const VectorExpression< VectorRhsExpr, 3 > &v)
virtual void OutputPrepare_int(const std::string &type, OutputHandler &OH, std::string &name)
virtual const Vec3 & GetXCurr(void) const
virtual void Add(integer iRow, const Vec3 &v)
virtual void ResizeReset(integer, integer)
unsigned int nRotConstraints
virtual unsigned int iGetNumDof(void) const
Vec3 Unwrap(const Vec3 &vPrev, const Vec3 &v)
void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Mat3x3 Transpose(void) const
TplDriveOwner< Vec3 > XDrv
virtual std::ostream & DescribeEq(std::ostream &out, const char *prefix="", bool bInitial=false) const
virtual unsigned int iGetPrivDataIdx(const char *s) const
const MatCrossCross_Manip MatCrossCross
void SubT(integer iRow, integer iCol, const Vec3 &v)
unsigned int nPosConstraints
virtual void SetValue(DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)
virtual unsigned int iGetNumPrivData(void) const
void PutRowIndex(integer iSubRow, integer iRow)
const doublereal * pGetVec(void) const
TotalJoint(unsigned int uL, const DofOwner *pDO, bool bPos[3], bool bVel[3], TplDriveCaller< Vec3 > *const pDCPos[3], bool bRot[3], bool bAgv[3], TplDriveCaller< Vec3 > *const pDCRot[3], const StructNode *pN1, const Vec3 &f1Tmp, const Mat3x3 &R1hTmp, const Mat3x3 &R1hrTmp, const StructNode *pN2, const Vec3 &f2Tmp, const Mat3x3 &R2hTmp, const Mat3x3 &R2hrTmp, flag fOut)
VariableSubMatrixHandler & InitialAssJac(VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
virtual doublereal dGetPrivData(unsigned int i) const
virtual const Vec3 & GetVCurr(void) const
void Sub(integer iRow, integer iCol, const Vec3 &v)
void Output(OutputHandler &OH) const
unsigned int iVelIncid[3]
virtual SubVectorHandler & InitialAssRes(SubVectorHandler &WorkVec, const VectorHandler &XCurr)
const char * invdyn2str(InverseDynamics::Order iOrder)
unsigned int iRotIncid[3]
void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
unsigned int nConstraints
Mat3x3 MulMT(const Mat3x3 &m) const
virtual unsigned int iGetPrivDataIdx(const char *s) const
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
virtual integer iGetFirstIndex(void) const
unsigned int nConstraints
TplDriveOwner< Vec3 > ThetaDrv
unsigned int iRotIncid[3]
std::ostream & Output(std::ostream &out, const char *sJointName, unsigned int uLabel, const Vec3 &FLocal, const Vec3 &MLocal, const Vec3 &FGlobal, const Vec3 &MGlobal) const
SubVectorHandler & InitialAssRes(SubVectorHandler &WorkVec, const VectorHandler &XCurr)
TplDriveOwner< Vec3 > XDrv
std::ostream & Write(std::ostream &out, const char *sFill=" ", const char *sFill2=NULL) const
virtual void SetValue(DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)
unsigned int GetLabel(void) const
const StructNode * pNode1
TplDriveOwner< Vec3 > FDrv
static const char idx2xyz[]
unsigned int iPosEqIndex[3]
virtual void Resize(integer iNewSize)=0
std::ostream & Forces(void) const
bool UseText(int out) const
SubVectorHandler & InitialAssRes(SubVectorHandler &WorkVec, const VectorHandler &XCurr)
virtual void AfterConvergence(const VectorHandler &X, const VectorHandler &XP)
virtual unsigned int iGetNumPrivData(void) const
virtual VariableSubMatrixHandler & InitialAssJac(VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
virtual std::ostream & DescribeEq(std::ostream &out, const char *prefix="", bool bInitial=false) const