51 const Vec3& dTmp1,
const Vec3& dTmp2,
55 const bool _calcInitdTheta,
63 pNode1(pN1), pNode2(pN2),
64 d1(dTmp1), R1h(R1hTmp), d2(dTmp2), R2h(R2hTmp), F(
Zero3), M(
Zero3),
71 calcInitdTheta(_calcInitdTheta), NTheta(0), dTheta(initDTheta), dThetaWrapped(initDTheta),
72 Sh_c(sh), fc(f), preF(pref), r(rr),
77 int n = (uL > 0 ? 1 + (
int)log10(uL) : 1);
80 snprintf(fname, len,
"hinge%.*d.out", n, uL);
103 << prefix << iIndex + 1 <<
"->" << iIndex + 3 <<
": "
104 "reaction forces [Fx,Fy,Fz]" << std::endl
105 << prefix << iIndex + 4 <<
"->" << iIndex + 5 <<
": "
106 "reaction couples [mx,my]" << std::endl;
111 << prefix << iIndex + 1 <<
"->" << iIndex + 3 <<
": "
112 "reaction force derivatives [FPx,FPy,FPz]" << std::endl
113 << prefix << iIndex + 4 <<
"->" << iIndex + 5 <<
": "
114 "reaction couple derivatives [mPx,mPy]" << std::endl;
121 out << prefix << iIndex + 1;
123 out <<
"->" << iIndex + iFCDofs;
125 out <<
": friction dof(s)" << std::endl
133 static const char xyz[] =
"xyz";
138 std::ostringstream os;
139 os <<
"PlaneHingeJoint(" <<
GetLabel() <<
")";
145 if (
fc && (i == -1 || i >= nself)) {
148 desc[0] = os.str() +
": " + desc[0];
155 unsigned short nfc = 0;
159 desc.resize(nfc + nself);
160 for (
unsigned i = nfc; i-- > 0; ) {
161 desc[nself + i] = os.str() +
": " + desc[nfc];
164 std::string name = os.str();
166 for (
unsigned i = 0; i < 3; i++) {
168 os.seekp(0, std::ios_base::end);
169 os <<
": reaction force f" <<
xyz[i];
173 for (
unsigned i = 0; i < 2; i++) {
175 os.seekp(0, std::ios_base::end);
176 os <<
": reaction couple m" <<
xyz[i];
177 desc[3 + i] = os.str();
181 for (
unsigned i = 0; i < 3; i++) {
183 os.seekp(0, std::ios_base::end);
184 os <<
": reaction force derivative fP" <<
xyz[i];
185 desc[3 + 2 + i] = os.str();
188 for (
unsigned i = 0; i < 2; i++) {
190 os.seekp(0, std::ios_base::end);
191 os <<
": reaction couple derivative mP" <<
xyz[i];
192 desc[3 + 2 + 3 + i] = os.str();
213 os <<
": reaction force f" <<
xyz[i];
218 os <<
": reaction couple m" << xyz[i - 3];
224 os <<
": reaction force derivative fP" << xyz[i - 3 - 2];
229 os <<
": reaction couple derivative mP" << xyz[i - 3 - 2 - 3];
242 << prefix << iIndex + 1 <<
"->" << iIndex + 3 <<
": "
243 "position constraints [Px1=Px2,Py1=Py2,Pz1=Pz2]" << std::endl
244 << prefix << iIndex + 4 <<
"->" << iIndex + 5 <<
": "
245 "orientation constraints [gx1=gx2,gy1=gy2]" << std::endl;
250 << prefix << iIndex + 1 <<
"->" << iIndex + 3 <<
": "
251 "velocity constraints [vx1=vx2,vy1=vy2,vz1=vz2]" << std::endl
252 << prefix << iIndex + 4 <<
"->" << iIndex + 5 <<
": "
253 "angular velocity constraints [wx1=wx2,wy1=wy2]" << std::endl;
260 out << prefix << iIndex + 1;
262 out <<
"->" << iIndex + iFCDofs;
264 out <<
": friction equation(s)" << std::endl
275 std::ostringstream os;
276 os <<
"PlaneHingeJoint(" <<
GetLabel() <<
")";
282 if (
fc && (i == -1 || i >= nself)) {
285 desc[0] = os.str() +
": " + desc[0];
292 unsigned short nfc = 0;
296 desc.resize(nfc + nself);
297 for (
unsigned i = nfc; i-- > 0; ) {
298 desc[nself + i] = os.str() +
": " + desc[nfc];
301 std::string name = os.str();
303 for (
unsigned i = 0; i < 3; i++) {
305 os.seekp(0, std::ios_base::end);
306 os <<
": position constraint P" <<
xyz[i];
310 for (
unsigned i = 0; i < 2; i++) {
312 os.seekp(0, std::ios_base::end);
313 os <<
": orientation constraint g" <<
xyz[i];
314 desc[3 + i] = os.str();
318 for (
unsigned i = 0; i < 3; i++) {
320 os.seekp(0, std::ios_base::end);
321 os <<
": position constraint derivative v" <<
xyz[i];
322 desc[3 + 2 + i] = os.str();
325 for (
unsigned i = 0; i < 2; i++) {
327 os.seekp(0, std::ios_base::end);
328 os <<
": orientation constraint derivative w" <<
xyz[i];
329 desc[3 + 2 + 3 + i] = os.str();
350 os <<
": position constraint P" <<
xyz[i];
355 os <<
": orientation constraint g" << xyz[i - 3];
361 os <<
": position constraint derivative v" << xyz[i - 3 - 2];
366 os <<
": orientation constraint derivative w" << xyz[i - 3 - 2 - 3];
379 for (
unsigned i = 0; i < ph->size(); i++) {
404 }
else if (dynamic_cast<Joint::ReactionsHint *>(pjh)) {
417 std::cerr <<
"F: " <<
F << std::endl;
418 std::cerr <<
"M: " <<
M << std::endl;
422 X.
Put(iFirstReactionIndex + 1,
F);
434 if (strncasecmp(s,
"offset{" ,
STRLENOF(
"offset{" )) == 0)
438 if (strcmp(&s[1],
"}") != 0) {
450 }
else if (strncasecmp(s,
"hinge{" ,
STRLENOF(
"hinge{" )) == 0) {
453 if (strcmp(&s[1],
"}") != 0) {
497 Vec3 e3a(R1hTmp.GetVec(3));
524 <<
", hinge, reference, node, 1, ", (
R1h.
GetVec(1)).
Write(out,
", ")
528 <<
", hinge, reference, node, 1, ", (
R2h.
GetVec(1)).
Write(out,
", ")
530 <<
"initial theta, " <<
dTheta <<
", "
531 <<
"initial state, ",
F.
Write(out,
", ")
532 <<
", " <<
M.
dGet(1) <<
", " <<
M.
dGet(2) <<
';' << std::endl;
545 DEBUGCOUT(
"Entering PlaneHingeJoint::AssJac()" << std::endl);
565 for (
unsigned int iCnt = 1; iCnt <= 6; iCnt++) {
572 for (
unsigned int iCnt = 1; iCnt <=
iGetNumDof(); iCnt++) {
622 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
624 WM.
PutCoef(6+iCnt, 12+iCnt, -1.);
638 MTmp = e2b*MTmp.
dGet(1)-e1b*MTmp.dGet(2);
644 WM.
Add(4, 10, e3aWedgeMWedge);
646 WM.
Add(10, 4, MWedgee3aWedge);
650 Vec3 Tmp1(e2b.Cross(e3a));
651 Vec3 Tmp2(e3a.Cross(e1b));
653 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
665 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
666 WM.
PutCoef(12+iCnt, iCnt, -1.);
667 WM.
PutCoef(12+iCnt, 6+iCnt, 1.);
683 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
719 dF.
Set(
F/modF,1,12+1);
783 dv.
Set(e3a*
r,1, 0+4);
784 dv.
Set(-e3a*r,4, 6+4);
788 XCurr,XPrimeCurr,dF,dv);
798 dM3.
Set(e3a*shc*r,1,1); dM3.
Link(1,&dF);
799 dM3.
Set(e3a*modF*r,1,2); dM3.
Link(2,&dShc);
805 dM3.
Sub(WM, 6+4, 1.);
818 DEBUGCOUT(
"Entering PlaneHingeJoint::AssRes()" << std::endl);
832 for (
int iCnt = 1; iCnt <= 6; iCnt++) {
833 WorkVec.
PutRowIndex(iCnt, iNode1FirstMomIndex+iCnt);
834 WorkVec.
PutRowIndex(6+iCnt, iNode2FirstMomIndex+iCnt);
838 for (
unsigned int iCnt = 1; iCnt <=
iGetNumDof(); iCnt++) {
839 WorkVec.
PutRowIndex(12+iCnt, iFirstReactionIndex+iCnt);
843 F =
Vec3(XCurr, iFirstReactionIndex+1);
844 M =
Vec3(XCurr(iFirstReactionIndex+4),
845 XCurr(iFirstReactionIndex+5),
883 WorkVec.
Add(13, (x1+dTmp1-x2-dTmp2)/dCoef);
891 bool ChangeJac(
false);
905 WorkVec.
Sub(4,e3a*
M3);
906 WorkVec.
Add(10,e3a*M3);
940 "INDEX ERROR in PlaneHingeJoint::GetEqType");
957 Var_Phi = OH.CreateRotationVar(name,
"",
od,
"global");
959 Var_Omega = OH.CreateVar<
Vec3>(name +
"Omega",
"radian/s",
960 "local relative angular velocity (x, y, z)");
1009 Var_F_local->put_rec((R2Tmp.MulTV(
F)).pGetVec(), OH.
GetCurrentStep());
1044 #endif // USE_NETCDF
1047 R2Tmp.MulTV(
F),
M,
F, R2Tmp*
M)
1069 of <<
" " <<
M3 <<
" " <<
fc->
fc();
1112 integer iNode1FirstVelIndex = iNode1FirstPosIndex+6;
1114 integer iNode2FirstVelIndex = iNode2FirstPosIndex+6;
1116 integer iReactionPrimeIndex = iFirstReactionIndex+5;
1124 for (
int iCnt = 1; iCnt <= 6; iCnt++) {
1129 WM.
PutRowIndex(12+iCnt, iNode2FirstPosIndex+iCnt);
1130 WM.
PutColIndex(12+iCnt, iNode2FirstPosIndex+iCnt);
1131 WM.
PutRowIndex(18+iCnt, iNode2FirstVelIndex+iCnt);
1132 WM.
PutColIndex(18+iCnt, iNode2FirstVelIndex+iCnt);
1136 for (
int iCnt = 1; iCnt <= 10; iCnt++) {
1137 WM.
PutRowIndex(24+iCnt, iFirstReactionIndex+iCnt);
1138 WM.
PutColIndex(24+iCnt, iFirstReactionIndex+iCnt);
1149 Vec3 FPrime(XCurr, iReactionPrimeIndex+1);
1150 Vec3 MPrime(XCurr(iReactionPrimeIndex+4),
1151 XCurr(iReactionPrimeIndex+5),
1155 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
1157 WM.
PutCoef(iCnt, 24+iCnt, 1.);
1160 WM.
PutCoef(6+iCnt, 29+iCnt, 1.);
1163 WM.
PutCoef(12+iCnt, 24+iCnt, -1.);
1166 WM.
PutCoef(18+iCnt, 29+iCnt, -1.);
1169 WM.
PutCoef(24+iCnt, iCnt, -1.);
1172 WM.
PutCoef(29+iCnt, 6+iCnt, -1.);
1175 WM.
PutCoef(24+iCnt, 12+iCnt, 1.);
1178 WM.
PutCoef(29+iCnt, 18+iCnt, 1.);
1212 Vec3 Tmp1(e2b.Cross(e3a));
1213 Vec3 Tmp2(e3a.Cross(e1b));
1221 if (Tmp1.Dot() <= std::numeric_limits<doublereal>::epsilon() || Tmp2.Dot() <= std::numeric_limits<doublereal>::epsilon()) {
1222 silent_cerr(
"PlaneHingeJoint(" <<
GetLabel() <<
"): "
1223 "first and second node hinge axes are (nearly) orthogonal"
1228 Vec3 TmpPrime1(e2b.Cross(Omega1.Cross(e3a))-e3a.Cross(Omega2.Cross(e2b)));
1229 Vec3 TmpPrime2(e3a.Cross(Omega2.Cross(e1b))-e1b.Cross(Omega1.Cross(e3a)));
1235 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
1236 WM.
PutCoef(3+iCnt, 28, Tmp1(iCnt));
1237 WM.
PutCoef(3+iCnt, 29, Tmp2(iCnt));
1244 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
1245 WM.
PutCoef(15+iCnt, 28, -Tmp1(iCnt));
1246 WM.
PutCoef(15+iCnt, 29, -Tmp2(iCnt));
1252 WM.
Add(10, 16, MDeltag2);
1254 WM.
Add(10, 25, O1Wedged1Wedge);
1257 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
1258 WM.
PutCoef(9+iCnt, 28, TmpPrime1(iCnt));
1259 WM.
PutCoef(9+iCnt, 29, TmpPrime2(iCnt));
1260 WM.
PutCoef(9+iCnt, 33, Tmp1(iCnt));
1261 WM.
PutCoef(9+iCnt, 34, Tmp2(iCnt));
1265 WM.
Add(22, 4, MDeltag1);
1269 WM.
Add(22, 25, O2Wedged2Wedge);
1272 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
1273 WM.
PutCoef(21+iCnt, 28, -TmpPrime1(iCnt));
1274 WM.
PutCoef(21+iCnt, 29, -TmpPrime2(iCnt));
1275 WM.
PutCoef(21+iCnt, 33, -Tmp1(iCnt));
1276 WM.
PutCoef(21+iCnt, 34, -Tmp2(iCnt));
1284 WM.
Add(30, 4, O1Wedged1Wedge);
1286 WM.
Add(30, 16, O2Wedged2Wedge);
1291 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
1301 d = Tmp2.dGet(iCnt);
1312 Vec3 O1mO2(Omega1-Omega2);
1314 TmpPrime2 = e2b.
Cross(e3a.Cross(O1mO2));
1315 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
1321 TmpPrime2 = e1b.
Cross(e3a.Cross(O1mO2));
1322 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
1336 DEBUGCOUT(
"Entering PlaneHingeJoint::InitialAssRes()" << std::endl);
1346 integer iNode1FirstVelIndex = iNode1FirstPosIndex+6;
1348 integer iNode2FirstVelIndex = iNode2FirstPosIndex+6;
1350 integer iReactionPrimeIndex = iFirstReactionIndex+5;
1353 for (
int iCnt = 1; iCnt <= 6; iCnt++) {
1354 WorkVec.
PutRowIndex(iCnt, iNode1FirstPosIndex+iCnt);
1355 WorkVec.
PutRowIndex(6+iCnt, iNode1FirstVelIndex+iCnt);
1356 WorkVec.
PutRowIndex(12+iCnt, iNode2FirstPosIndex+iCnt);
1357 WorkVec.
PutRowIndex(18+iCnt, iNode2FirstVelIndex+iCnt);
1360 for (
int iCnt = 1; iCnt <= 10; iCnt++) {
1361 WorkVec.
PutRowIndex(24+iCnt, iFirstReactionIndex+iCnt);
1375 F =
Vec3(XCurr, iFirstReactionIndex+1);
1376 M =
Vec3(XCurr(iFirstReactionIndex+4),
1377 XCurr(iFirstReactionIndex+5),
1379 Vec3 FPrime(XCurr, iReactionPrimeIndex+1);
1380 Vec3 MPrime(XCurr(iReactionPrimeIndex+4),
1381 XCurr(iReactionPrimeIndex+5),
1391 Vec3 O1Wedged1(Omega1.Cross(d1Tmp));
1392 Vec3 O2Wedged2(Omega2.Cross(d2Tmp));
1401 Vec3 MPrimeTmp(e3a.Cross(MTmp.Cross(Omega2))+MTmp.Cross(Omega1.Cross(e3a))+
1402 e2b.Cross(e3a)*MPrime.
dGet(1)+e3a.Cross(e1b)*MPrime.
dGet(2));
1406 WorkVec.
Add(4, F.Cross(d1Tmp)-MTmp.Cross(e3a));
1409 WorkVec.
Sub(7, FPrime);
1410 WorkVec.
Add(10, FPrime.
Cross(d1Tmp)-O1Wedged1.
Cross(F)-MPrimeTmp);
1417 WorkVec.
Add(19, FPrime);
1418 WorkVec.
Add(22, d2Tmp.
Cross(FPrime)+O2Wedged2.
Cross(F)+MPrimeTmp);
1421 WorkVec.
Add(25, x1+d1Tmp-x2-d2Tmp);
1424 WorkVec.
Add(30, v1+O1Wedged1-v2-O2Wedged2);
1427 WorkVec.
PutCoef(28, e2b.Dot(e3a));
1428 WorkVec.
PutCoef(29, e1b.Dot(e3a));
1432 WorkVec.
PutCoef(33, e2b.Dot(Tmp));
1433 WorkVec.
PutCoef(34, e1b.Dot(Tmp));
1450 unsigned int idx = 0;
1522 silent_cerr(
"PlaneHingeJoint(" <<
GetLabel() <<
"): "
1523 "illegal private data " << i << std::endl);
1539 Joint(uL, pDO, fOut),
1540 pNode1(pN1), pNode2(pN2),
1541 R1h(R1hTmp), R2h(R2hTmp), M(
Zero3),
1542 NTheta(0), dTheta(0.),
1569 << prefix << iIndex + 1 <<
"->" << iIndex + 2 <<
": "
1570 "reaction couples [mx,my]" << std::endl;
1575 << prefix << iIndex + 1 <<
"->" << iIndex + 2 <<
": "
1576 "reaction couple derivatives [mPx,mPy]" << std::endl;
1585 std::ostringstream os;
1586 os <<
"PlaneRotationJoint(" <<
GetLabel() <<
")";
1588 unsigned short nself = 2;
1595 std::string name = os.str();
1597 for (
unsigned i = 0; i < 2; i++) {
1599 os.seekp(0, std::ios_base::end);
1600 os <<
": reaction couple m" <<
xyz[i];
1605 for (
unsigned i = 0; i < 2; i++) {
1607 os.seekp(0, std::ios_base::end);
1608 os <<
": reaction couple derivative mP" <<
xyz[i];
1609 desc[2 + i] = os.str();
1629 os <<
": reaction couple m" <<
xyz[i];
1634 os <<
": reaction couple derivative mP" << xyz[i - 2];
1647 << prefix << iIndex + 1 <<
"->" << iIndex + 2 <<
": "
1648 "orientation constraints [gx1=gx2,gy1=gy2]" << std::endl;
1653 << prefix << iIndex + 1 <<
"->" << iIndex + 2 <<
": "
1654 "angular velocity constraints [wx1=wx2,wy1=wy2]" << std::endl;
1663 std::ostringstream os;
1664 os <<
"PlaneRotationJoint(" <<
GetLabel() <<
")";
1666 unsigned short nself = 2;
1673 std::string name = os.str();
1675 for (
unsigned i = 0; i < 2; i++) {
1677 os.seekp(0, std::ios_base::end);
1678 os <<
": orientation constraint g" <<
xyz[i];
1683 for (
unsigned i = 0; i < 2; i++) {
1685 os.seekp(0, std::ios_base::end);
1686 os <<
": orientation constraint derivative w" <<
xyz[i];
1687 desc[2 + i] = os.str();
1707 os <<
": orientation constraint g" <<
xyz[i];
1712 os <<
": orientation constraint derivative w" << xyz[i - 2];
1725 for (
unsigned i = 0; i < ph->size(); i++) {
1738 }
else if (dynamic_cast<Joint::ReactionsHint *>(pjh)) {
1752 if (strncasecmp(s,
"hinge{" ,
STRLENOF(
"hinge{" )) == 0) {
1755 if (strcmp(&s[1],
"}") != 0) {
1800 <<
", hinge, reference, node, 1, ", (
R1h.
GetVec(1)).
Write(out,
", ")
1803 <<
", hinge, reference, node, 1, ", (
R2h.
GetVec(1)).
Write(out,
", ")
1804 <<
", 2, ", (
R2h.
GetVec(2)).
Write(out,
", ") <<
';' << std::endl;
1817 DEBUGCOUT(
"Entering PlaneRotationJoint::AssJac()" << std::endl);
1837 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
1844 for (
int iCnt = 1; iCnt <= 2; iCnt++) {
1892 Vec3 MTmp =
M*dCoef;
1894 Vec3 e3a(R1hTmp.GetVec(3));
1897 MTmp = e2b*MTmp.
dGet(1)-e1b*MTmp.dGet(2);
1902 WM.
Sub(1, 1, MWedgee3aWedge);
1903 WM.
Add(1, 4, e3aWedgeMWedge);
1905 WM.
Add(4, 1, MWedgee3aWedge);
1906 WM.
Sub(4, 4, e3aWedgeMWedge);
1909 Vec3 Tmp1(e2b.Cross(e3a));
1910 Vec3 Tmp2(e3a.Cross(e1b));
1912 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
1916 d = Tmp2.dGet(iCnt);
1933 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
1937 d = Tmp2.dGet(iCnt);
1952 DEBUGCOUT(
"Entering PlaneRotationJoint::AssRes()" << std::endl);
1966 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
1967 WorkVec.
PutRowIndex(iCnt, iNode1FirstMomIndex+iCnt);
1968 WorkVec.
PutRowIndex(3+iCnt, iNode2FirstMomIndex+iCnt);
1972 for (
int iCnt = 1; iCnt <= 2; iCnt++) {
1973 WorkVec.
PutRowIndex(6+iCnt, iFirstReactionIndex+iCnt);
1977 M =
Vec3(XCurr(iFirstReactionIndex+1),
1978 XCurr(iFirstReactionIndex+2),
1994 Vec3 e3a(R1hTmp.GetVec(3));
2001 WorkVec.
Sub(1, MTmp);
2004 WorkVec.
Add(4, MTmp);
2010 Vec3 Tmp = R1hTmp.GetVec(3);
2021 "INDEX ERROR in PlaneRotationJoint::GetEqType");
2035 Var_Phi = OH.CreateRotationVar(name,
"",
od,
"global");
2037 Var_Omega = OH.CreateVar<
Vec3>(name +
"Omega",
"radian/s",
2038 "local relative angular velocity (x, y, z)");
2040 #endif // USE_NETCDF
2102 #endif // USE_NETCDF
2125 OH.
Joints() <<
" " << OmegaTmp << std::endl;
2166 integer iNode1FirstVelIndex = iNode1FirstPosIndex+6+3;
2168 integer iNode2FirstVelIndex = iNode2FirstPosIndex+6+3;
2170 integer iReactionPrimeIndex = iFirstReactionIndex+2;
2178 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
2190 for (
int iCnt = 1; iCnt <= 4; iCnt++) {
2191 WM.
PutRowIndex(12+iCnt, iFirstReactionIndex+iCnt);
2192 WM.
PutColIndex(12+iCnt, iFirstReactionIndex+iCnt);
2203 Vec3 MPrime(XCurr(iReactionPrimeIndex+1),
2204 XCurr(iReactionPrimeIndex+2),
2208 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
2210 WM.
PutCoef(iCnt, 12+iCnt, 1.);
2213 WM.
PutCoef(3+iCnt, 14+iCnt, 1.);
2216 WM.
PutCoef(6+iCnt, 12+iCnt, -1.);
2219 WM.
PutCoef(9+iCnt, 14+iCnt, -1.);
2233 Vec3 MPrimeTmp(e2b*MPrime.dGet(1)-e1b*MPrime.dGet(2));
2242 Vec3 Tmp1(e2b.Cross(e3a));
2243 Vec3 Tmp2(e3a.Cross(e1b));
2251 if (Tmp1.Dot() <= std::numeric_limits<doublereal>::epsilon() || Tmp2.Dot() <= std::numeric_limits<doublereal>::epsilon()) {
2252 silent_cerr(
"PlaneRotationJoint(" <<
GetLabel() <<
"): "
2253 "first and second node hinge axes are (nearly) orthogonal"
2258 Vec3 TmpPrime1(e2b.Cross(Omega1.Cross(e3a))-e3a.Cross(Omega2.Cross(e2b)));
2259 Vec3 TmpPrime2(e3a.Cross(Omega2.Cross(e1b))-e1b.Cross(Omega1.Cross(e3a)));
2264 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
2265 WM.
PutCoef(iCnt, 13, Tmp1.dGet(iCnt));
2266 WM.
PutCoef(iCnt, 14, Tmp2.dGet(iCnt));
2272 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
2273 WM.
PutCoef(6+iCnt, 13, -Tmp1(iCnt));
2274 WM.
PutCoef(6+iCnt, 14, -Tmp2(iCnt));
2278 WM.
Sub(4, 1, MDeltag1);
2280 WM.
Add(4, 7, MDeltag2);
2283 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
2284 WM.
PutCoef(3+iCnt, 13, TmpPrime1(iCnt));
2285 WM.
PutCoef(3+iCnt, 14, TmpPrime2(iCnt));
2286 WM.
PutCoef(3+iCnt, 15, Tmp1(iCnt));
2287 WM.
PutCoef(3+iCnt, 16, Tmp2(iCnt));
2291 WM.
Add(10, 1, MDeltag1);
2293 WM.
Sub(10, 7, MDeltag2);
2296 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
2297 WM.
PutCoef(9+iCnt, 13, -TmpPrime1(iCnt));
2298 WM.
PutCoef(9+iCnt, 14, -TmpPrime2(iCnt));
2299 WM.
PutCoef(9+iCnt, 15, -Tmp1(iCnt));
2300 WM.
PutCoef(9+iCnt, 16, -Tmp2(iCnt));
2305 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
2326 Vec3 O1mO2(Omega1 - Omega2);
2328 TmpPrime2 = e2b.
Cross(e3a.Cross(O1mO2));
2329 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
2330 WM.
PutCoef(15, iCnt, TmpPrime1(iCnt));
2331 WM.
PutCoef(15, 6+iCnt, TmpPrime2(iCnt));
2335 TmpPrime2 = e1b.
Cross(e3a.Cross(O1mO2));
2336 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
2337 WM.
PutCoef(16, iCnt, TmpPrime1(iCnt));
2338 WM.
PutCoef(16, 6+iCnt, TmpPrime2(iCnt));
2350 DEBUGCOUT(
"Entering PlaneRotationJoint::InitialAssRes()" << std::endl);
2360 integer iNode1FirstVelIndex = iNode1FirstPosIndex+6+3;
2362 integer iNode2FirstVelIndex = iNode2FirstPosIndex+6+3;
2364 integer iReactionPrimeIndex = iFirstReactionIndex+2;
2367 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
2368 WorkVec.
PutRowIndex(iCnt, iNode1FirstPosIndex+iCnt);
2369 WorkVec.
PutRowIndex(3+iCnt, iNode1FirstVelIndex+iCnt);
2370 WorkVec.
PutRowIndex(6+iCnt, iNode2FirstPosIndex+iCnt);
2371 WorkVec.
PutRowIndex(9+iCnt, iNode2FirstVelIndex+iCnt);
2374 for (
int iCnt = 1; iCnt <= 4; iCnt++) {
2375 WorkVec.
PutRowIndex(12+iCnt, iFirstReactionIndex+iCnt);
2385 M =
Vec3(XCurr(iFirstReactionIndex+1),
2386 XCurr(iFirstReactionIndex+2),
2388 Vec3 MPrime(XCurr(iReactionPrimeIndex+1),
2389 XCurr(iReactionPrimeIndex+2),
2402 Vec3 MTmp(e2b*M.dGet(1)-e1b*M.dGet(2));
2403 Vec3 MPrimeTmp(e3a.Cross(MTmp.Cross(Omega2))+MTmp.Cross(Omega1.Cross(e3a))+
2404 e2b.Cross(e3a)*MPrime.
dGet(1)+e3a.Cross(e1b)*MPrime.
dGet(2));
2407 WorkVec.
Sub(1, MTmp.Cross(e3a));
2410 WorkVec.
Sub(4, MPrimeTmp);
2413 WorkVec.
Add(7, MTmp.Cross(e3a));
2416 WorkVec.
Add(10, MPrimeTmp);
2419 WorkVec.
PutCoef(13, e2b.Dot(e3a));
2420 WorkVec.
PutCoef(14, e1b.Dot(e3a));
2424 WorkVec.
PutCoef(15, e2b.Dot(Tmp));
2425 WorkVec.
PutCoef(16, e1b.Dot(Tmp));
2442 unsigned int idx = 0;
2507 silent_cerr(
"PlaneRotationJoint(" <<
GetLabel() <<
"): "
2508 "illegal private data " << i << std::endl);
2524 const Vec3& dTmp1,
const Vec3& dTmp2,
2535 Joint(uL, pDO, fOut),
2537 pNode1(pN1), pNode2(pN2),
2538 d1(dTmp1), R1h(R1hTmp), d2(dTmp2), R2h(R2hTmp), F(
Zero3), M(
Zero3),
2539 NTheta(0), dTheta(0.), dThetaWrapped(0.),
2546 Sh_c(sh), fc(f), preF(pref), r(rr),
2572 << prefix << iIndex + 1 <<
"->" << iIndex + 3 <<
": "
2573 "reaction forces [Fx,Fy,Fz]" << std::endl
2574 << prefix << iIndex + 4 <<
"->" << iIndex + 6 <<
": "
2575 "reaction couples [mx,my,mz]" << std::endl;
2580 << prefix << iIndex + 1 <<
"->" << iIndex + 3 <<
": "
2581 "reaction force derivatives [FPx,FPy,FPz]" << std::endl
2582 << prefix << iIndex + 4 <<
"->" << iIndex + 5 <<
": "
2583 "reaction couple derivatives [mPx,mPy]" << std::endl;
2590 out << prefix << iIndex + 1;
2592 out <<
"->" << iIndex + iFCDofs;
2594 out <<
": friction dof(s)" << std::endl
2605 std::ostringstream os;
2606 os <<
"AxialRotationJoint(" <<
GetLabel() <<
")";
2612 if (
fc && (i == -1 || i >= nself)) {
2615 desc[0] = os.str() +
": " + desc[0];
2622 unsigned short nfc = 0;
2626 desc.resize(nfc + nself);
2627 for (
unsigned i = nfc; i-- > 0; ) {
2628 desc[nself + i] = os.str() +
": " + desc[nfc];
2631 std::string name = os.str();
2633 for (
unsigned i = 0; i < 3; i++) {
2635 os.seekp(0, std::ios_base::end);
2636 os <<
": reaction force f" <<
xyz[i];
2640 for (
unsigned i = 0; i < 3; i++) {
2642 os.seekp(0, std::ios_base::end);
2643 os <<
": reaction couple m" <<
xyz[i];
2644 desc[3 + i] = os.str();
2648 for (
unsigned i = 0; i < 3; i++) {
2650 os.seekp(0, std::ios_base::end);
2651 os <<
": reaction force derivative fP" <<
xyz[i];
2652 desc[6 + i] = os.str();
2655 for (
unsigned i = 0; i < 2; i++) {
2657 os.seekp(0, std::ios_base::end);
2658 os <<
": reaction couple derivative mP" <<
xyz[i];
2659 desc[9 + i] = os.str();
2680 os <<
": reaction force f" <<
xyz[i];
2686 os <<
": reaction couple m" << xyz[i - 3];
2692 os <<
": reaction force derivative fP" << xyz[i - 6];
2697 os <<
": reaction couple derivative mP" << xyz[i - 9];
2710 << prefix << iIndex + 1 <<
"->" << iIndex + 3 <<
": "
2711 "position constraints [Px1=Px2,Py1=Py2,Pz1=Pz2]" << std::endl
2712 << prefix << iIndex + 4 <<
"->" << iIndex + 5 <<
": "
2713 "orientation constraints [gx1=gx2,gy1=gy2]" << std::endl
2714 << prefix << iIndex + 6 <<
": "
2715 "angular velocity constraint wz2-wz1=Omega]" << std::endl;
2720 << prefix << iIndex + 1 <<
"->" << iIndex + 3 <<
": "
2721 "velocity constraints [vx1=vx2,vy1=vy2,vz1=vz2]" << std::endl
2722 << prefix << iIndex + 4 <<
"->" << iIndex + 5 <<
": "
2723 "reaction couple derivatives [wx1=wx2,wy1=wy2]" << std::endl;
2730 out << prefix << iIndex + 1;
2732 out <<
"->" << iIndex + iFCDofs;
2734 out <<
": friction equation(s)" << std::endl
2745 std::ostringstream os;
2746 os <<
"AxialRotationJoint(" <<
GetLabel() <<
")";
2752 if (
fc && (i == -1 || i >= nself)) {
2755 desc[0] = os.str() +
": " + desc[0];
2762 unsigned short nfc = 0;
2766 desc.resize(nfc + nself);
2767 for (
unsigned i = nfc; i-- > 0; ) {
2768 desc[nself + i] = os.str() +
": " + desc[nfc];
2771 std::string name = os.str();
2773 for (
unsigned i = 0; i < 3; i++) {
2775 os.seekp(0, std::ios_base::end);
2776 os <<
": position constraint P" <<
xyz[i];
2780 for (
unsigned i = 0; i < 2; i++) {
2782 os.seekp(0, std::ios_base::end);
2783 os <<
": orientation constraint g" <<
xyz[i];
2784 desc[3 + i] = os.str();
2788 os.seekp(0, std::ios_base::end);
2789 os <<
": angular velocity constraint wz";
2793 for (
unsigned i = 0; i < 3; i++) {
2795 os.seekp(0, std::ios_base::end);
2796 os <<
": position constraint derivative v" <<
xyz[i];
2797 desc[6 + i] = os.str();
2800 for (
unsigned i = 0; i < 2; i++) {
2802 os.seekp(0, std::ios_base::end);
2803 os <<
": orientation constraint derivative w" <<
xyz[i];
2804 desc[9 + i] = os.str();
2825 os <<
": position constraint P" <<
xyz[i];
2830 os <<
": orientation constraint g" << xyz[i - 3];
2834 os <<
": angular velocity constraint wz";
2840 os <<
": position constraint derivative v" << xyz[i - 6];
2845 os <<
": orientation constraint derivative w" << xyz[i - 9];
2858 for (
unsigned i = 0; i < ph->size(); i++) {
2866 silent_cerr(
"AxialRotationJoint::SetValue: "
2867 "unable to create drive after hint "
2868 "#" << i << std::endl);
2895 }
else if (dynamic_cast<Joint::ReactionsHint *>(pjh)) {
2914 if (strncasecmp(s,
"offset{" ,
STRLENOF(
"offset{" )) == 0) {
2917 if (strcmp(&s[1],
"}") != 0) {
2929 }
else if (strncasecmp(s,
"hinge{" ,
STRLENOF(
"hinge{" )) == 0) {
2932 if (strcmp(&s[1],
"}") != 0) {
2976 Vec3 e3a(R1hTmp.GetVec(3));
2993 <<
", reference, node, ",
d1.
Write(out,
", ")
2994 <<
", hinge, reference, node, 1, ", (
R1h.
GetVec(1)).
Write(out,
", ")
2997 <<
", reference, node, ",
d2.
Write(out,
", ")
2998 <<
", hinge, reference, node, 1, ", (
R2h.
GetVec(1)).
Write(out,
", ")
3012 DEBUGCOUT(
"Entering AxialRotationJoint::AssJac()" << std::endl);
3076 for (
int iCnt = 1; iCnt <= 6; iCnt++) {
3083 for (
unsigned int iCnt = 1; iCnt <=
iGetNumDof(); iCnt++) {
3084 WM.
PutRowIndex(12+iCnt, iFirstReactionIndex+iCnt);
3085 WM.
PutColIndex(12+iCnt, iFirstReactionIndex+iCnt);
3089 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
3090 WM.
PutCoef(iCnt, 12+iCnt, 1.);
3091 WM.
PutCoef(6+iCnt, 12+iCnt, -1.);
3099 Vec3 FTmp =
F*dCoef;
3100 Vec3 MTmp =
M*dCoef;
3105 MTmp = e2b*MTmp.
dGet(1) - e1b*MTmp.dGet(2);
3111 WM.
Add(4, 10, e3aWedgeMWedge);
3113 WM.
Add(10, 4, MWedgee3aWedge);
3118 Vec3 Tmp1(e2b.Cross(e3a));
3119 Vec3 Tmp2(e3a.Cross(e1b));
3121 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
3138 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
3139 WM.
PutCoef(12+iCnt, iCnt, -1.);
3140 WM.
PutCoef(12+iCnt, 6+iCnt, 1.);
3156 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
3161 d = Tmp2.dGet(iCnt);
3170 Vec3 Tmp = e3a + Omega2.
Cross(e3a*dCoef);
3171 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
3201 if ((modF == 0.) or (
F.
Norm() >
preF)) {
3216 dv.
Set(e3a*
r,1, 0+4);
3217 dv.
Set(-e3a*r,4, 6+4);
3221 XCurr,XPrimeCurr,dF,dv);
3229 dM3.
Set(shc * r,1); dM3.
Link(1,&dF);
3230 dM3.
Set(modF * r,2); dM3.
Link(2,&dShc);
3233 dM3.
Add(WM,0+4,e3a.dGet(1));
3234 dM3.
Add(WM,0+5,e3a.dGet(2));
3235 dM3.
Add(WM,0+6,e3a.dGet(3));
3238 dM3.
Sub(WM,6+4,e3a.dGet(1));
3239 dM3.
Sub(WM,6+5,e3a.dGet(2));
3240 dM3.
Sub(WM,6+6,e3a.dGet(3));
3253 DEBUGCOUT(
"Entering AxialRotationJoint::AssRes()" << std::endl);
3267 for (
int iCnt = 1; iCnt <= 6; iCnt++) {
3268 WorkVec.
PutRowIndex(iCnt, iNode1FirstMomIndex+iCnt);
3269 WorkVec.
PutRowIndex(6+iCnt, iNode2FirstMomIndex+iCnt);
3272 for (
unsigned int iCnt = 1; iCnt <=
iGetNumDof(); iCnt++) {
3273 WorkVec.
PutRowIndex(12+iCnt, iFirstReactionIndex+iCnt);
3277 F =
Vec3(XCurr, iFirstReactionIndex+1);
3278 M =
Vec3(XCurr, iFirstReactionIndex+4);
3310 WorkVec.
Add(13, (x1+dTmp1-x2-dTmp2)/dCoef);
3323 WorkVec.
PutCoef(18, dOmega0-e3a.Dot(Omega2-Omega1));
3326 bool ChangeJac(
false);
3338 WorkVec.
Sub(4,e3a*
M3);
3339 WorkVec.
Add(10,e3a*M3);
3354 "INDEX ERROR in AxialRotationJoint::GetEqType");
3373 Var_Phi = OH.CreateRotationVar(name,
"",
od,
"global");
3375 Var_Omega = OH.CreateVar<
Vec3>(name +
"Omega",
"radian/s",
3376 "local relative angular velocity (x, y, z)");
3386 #endif // USE_NETCDF
3425 Var_F_local->put_rec((R2Tmp.MulTV(
F)).pGetVec(), OH.
GetCurrentStep());
3458 #endif // USE_NETCDF
3461 R2Tmp.MulTV(
F),
M,
F, R2Tmp*
M)
3484 of <<
" " <<
M3 <<
" " <<
fc->
fc();
3528 integer iNode1FirstVelIndex = iNode1FirstPosIndex+6;
3530 integer iNode2FirstVelIndex = iNode2FirstPosIndex+6;
3532 integer iReactionPrimeIndex = iFirstReactionIndex+5;
3540 for (
int iCnt = 1; iCnt <= 6; iCnt++) {
3545 WM.
PutRowIndex(12+iCnt, iNode2FirstPosIndex+iCnt);
3546 WM.
PutColIndex(12+iCnt, iNode2FirstPosIndex+iCnt);
3547 WM.
PutRowIndex(18+iCnt, iNode2FirstVelIndex+iCnt);
3548 WM.
PutColIndex(18+iCnt, iNode2FirstVelIndex+iCnt);
3552 for (
int iCnt = 1; iCnt <= 5; iCnt++) {
3553 WM.
PutRowIndex(24+iCnt, iFirstReactionIndex+iCnt);
3554 WM.
PutColIndex(24+iCnt, iFirstReactionIndex+iCnt);
3557 for (
int iCnt = 1; iCnt <= 6; iCnt++) {
3558 WM.
PutRowIndex(29+iCnt, iReactionPrimeIndex+iCnt);
3559 WM.
PutColIndex(29+iCnt, iReactionPrimeIndex+iCnt);
3568 Vec3 FPrime(XCurr, iReactionPrimeIndex+1);
3569 Vec3 MPrime(XCurr, iReactionPrimeIndex+4);
3572 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
3574 WM.
PutCoef(iCnt, 24+iCnt, 1.);
3577 WM.
PutCoef(6+iCnt, 29+iCnt, 1.);
3580 WM.
PutCoef(12+iCnt, 24+iCnt, -1.);
3583 WM.
PutCoef(18+iCnt, 29+iCnt, -1.);
3586 WM.
PutCoef(24+iCnt, iCnt, -1.);
3589 WM.
PutCoef(29+iCnt, 6+iCnt, -1.);
3592 WM.
PutCoef(24+iCnt, 12+iCnt, 1.);
3595 WM.
PutCoef(29+iCnt, 18+iCnt, 1.);
3629 Vec3 Tmp1(e2b.Cross(e3a));
3630 Vec3 Tmp2(e3a.Cross(e1b));
3638 if (Tmp1.Dot() <= std::numeric_limits<doublereal>::epsilon() || Tmp2.Dot() <= std::numeric_limits<doublereal>::epsilon()) {
3639 silent_cerr(
"AxialRotationJoint(" <<
GetLabel() <<
"): "
3640 "first and second node hinge axes are (nearly) orthogonal"
3645 Vec3 TmpPrime1(e2b.Cross(Omega1.Cross(e3a))-e3a.Cross(Omega2.Cross(e2b)));
3646 Vec3 TmpPrime2(e3a.Cross(Omega2.Cross(e1b))-e1b.Cross(Omega1.Cross(e3a)));
3652 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
3653 WM.
PutCoef(3+iCnt, 28, Tmp1(iCnt));
3654 WM.
PutCoef(3+iCnt, 29, Tmp2(iCnt));
3661 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
3662 WM.
PutCoef(15+iCnt, 28, -Tmp1(iCnt));
3663 WM.
PutCoef(15+iCnt, 29, -Tmp2(iCnt));
3670 WM.
Add(10, 10, FWedged1Wedge
3673 WM.
Add(10, 16, MDeltag2);
3675 WM.
Add(10, 25, O1Wedged1Wedge);
3678 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
3679 WM.
PutCoef(9+iCnt, 28, TmpPrime1(iCnt));
3680 WM.
PutCoef(9+iCnt, 29, TmpPrime2(iCnt));
3681 WM.
PutCoef(9+iCnt, 33, Tmp1(iCnt));
3682 WM.
PutCoef(9+iCnt, 34, Tmp2(iCnt));
3686 WM.
PutCoef(9+iCnt, 35, e3a(iCnt));
3694 WM.
Add(22, 25, O2Wedged2Wedge);
3697 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
3698 WM.
PutCoef(21+iCnt, 28, -TmpPrime1(iCnt));
3699 WM.
PutCoef(21+iCnt, 29, -TmpPrime2(iCnt));
3700 WM.
PutCoef(21+iCnt, 33, -Tmp1(iCnt));
3701 WM.
PutCoef(21+iCnt, 34, -Tmp2(iCnt));
3705 WM.
PutCoef(21+iCnt, 35, -e3a(iCnt));
3713 WM.
Add(30, 4, O1Wedged1Wedge);
3715 WM.
Add(30, 16, O2Wedged2Wedge);
3720 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
3730 d = Tmp2.dGet(iCnt);
3741 Vec3 O1mO2(Omega1 - Omega2);
3743 TmpPrime2 = e2b.
Cross(e3a.Cross(O1mO2));
3744 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
3745 WM.
PutCoef(33, 3+iCnt, TmpPrime1(iCnt));
3746 WM.
PutCoef(33, 15+iCnt, TmpPrime2(iCnt));
3750 TmpPrime2 = e1b.
Cross(e3a.Cross(O1mO2));
3751 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
3752 WM.
PutCoef(34, 3+iCnt, TmpPrime1(iCnt));
3753 WM.
PutCoef(34, 15+iCnt, TmpPrime2(iCnt));
3760 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
3761 WM.
PutCoef(35, 3+iCnt, Tmp(iCnt));
3776 DEBUGCOUT(
"Entering AxialRotationJoint::InitialAssRes()" << std::endl);
3786 integer iNode1FirstVelIndex = iNode1FirstPosIndex+6;
3788 integer iNode2FirstVelIndex = iNode2FirstPosIndex+6;
3790 integer iReactionPrimeIndex = iFirstReactionIndex+5;
3793 for (
int iCnt = 1; iCnt <= 6; iCnt++) {
3794 WorkVec.
PutRowIndex(iCnt, iNode1FirstPosIndex+iCnt);
3795 WorkVec.
PutRowIndex(6+iCnt, iNode1FirstVelIndex+iCnt);
3796 WorkVec.
PutRowIndex(12+iCnt, iNode2FirstPosIndex+iCnt);
3797 WorkVec.
PutRowIndex(18+iCnt, iNode2FirstVelIndex+iCnt);
3800 for (
int iCnt = 1; iCnt <= 5; iCnt++) {
3801 WorkVec.
PutRowIndex(24+iCnt, iFirstReactionIndex+iCnt);
3804 for (
int iCnt = 1; iCnt <= 6; iCnt++) {
3805 WorkVec.
PutRowIndex(29+iCnt, iReactionPrimeIndex+iCnt);
3819 F =
Vec3(XCurr, iFirstReactionIndex+1);
3820 M =
Vec3(XCurr(iFirstReactionIndex+4),
3821 XCurr(iFirstReactionIndex+5),
3823 Vec3 FPrime(XCurr, iReactionPrimeIndex+1);
3824 Vec3 MPrime(XCurr, iReactionPrimeIndex+4);
3833 Vec3 O1Wedged1(Omega1.Cross(d1Tmp));
3834 Vec3 O2Wedged2(Omega2.Cross(d2Tmp));
3843 Vec3 MPrimeTmp(e3a.Cross(MTmp.Cross(Omega2))+MTmp.Cross(Omega1.Cross(e3a))+
3844 e2b.Cross(e3a)*MPrime.
dGet(1)+e3a.Cross(e1b)*MPrime.
dGet(2));
3848 WorkVec.
Add(4, F.Cross(d1Tmp)-MTmp.Cross(e3a));
3851 WorkVec.
Sub(7, FPrime);
3852 WorkVec.
Add(10, FPrime.
Cross(d1Tmp)-O1Wedged1.
Cross(F)-MPrimeTmp-
3853 e3a*MPrime.
dGet(3));
3860 WorkVec.
Add(19, FPrime);
3861 WorkVec.
Add(22, d2Tmp.
Cross(FPrime)+O2Wedged2.
Cross(F)+MPrimeTmp+
3862 e3a*MPrime.
dGet(3));
3865 WorkVec.
Add(25, x1+d1Tmp-x2-d2Tmp);
3868 WorkVec.
Add(30, v1+O1Wedged1-v2-O2Wedged2);
3871 WorkVec.
PutCoef(28, e2b.Dot(e3a));
3872 WorkVec.
PutCoef(29, e1b.Dot(e3a));
3876 WorkVec.
PutCoef(33, e2b.Dot(Tmp));
3877 WorkVec.
PutCoef(34, e1b.Dot(Tmp));
3881 WorkVec.
PutCoef(35, Omega0-e3a.Dot(Omega2-Omega1));
3897 unsigned int idx = 0;
3966 silent_cerr(
"AxialRotationJoint(" <<
GetLabel() <<
"): "
3967 "illegal private data " << i << std::endl);
3981 flag fOut,
const bool _calcInitdTheta,
3984 Joint(uL, pDO, fOut),
3986 X0(X0Tmp), R0(R0Tmp), d(dTmp), Rh(RhTmp),
3988 calcInitdTheta(_calcInitdTheta),
3989 NTheta(0), dTheta(initDTheta), dThetaWrapped(0.)
4008 << prefix << iIndex + 1 <<
"->" << iIndex + 3 <<
": "
4009 "reaction forces [Fx,Fy,Fz]" << std::endl
4010 << prefix << iIndex + 4 <<
"->" << iIndex + 5 <<
": "
4011 "reaction couples [mx,my]" << std::endl;
4016 << prefix << iIndex + 1 <<
"->" << iIndex + 3 <<
": "
4017 "reaction force derivatives [FPx,FPy,FPz]" << std::endl
4018 << prefix << iIndex + 4 <<
"->" << iIndex + 5 <<
": "
4019 "reaction couple derivatives [mPx,mPy]" << std::endl;
4028 std::ostringstream os;
4029 os <<
"PlanePinJoint(" <<
GetLabel() <<
")";
4031 unsigned short nself = 5;
4038 std::string name = os.str();
4040 for (
unsigned i = 0; i < 3; i++) {
4042 os.seekp(0, std::ios_base::end);
4043 os <<
": reaction force f" <<
xyz[i];
4047 for (
unsigned i = 0; i < 2; i++) {
4049 os.seekp(0, std::ios_base::end);
4050 os <<
": reaction couple m" <<
xyz[i];
4051 desc[3 + i] = os.str();
4055 for (
unsigned i = 0; i < 3; i++) {
4057 os.seekp(0, std::ios_base::end);
4058 os <<
": reaction force derivative fP" <<
xyz[i];
4059 desc[5 + i] = os.str();
4062 for (
unsigned i = 0; i < 2; i++) {
4064 os.seekp(0, std::ios_base::end);
4065 os <<
": reaction couple derivative mP" <<
xyz[i];
4066 desc[8 + i] = os.str();
4087 os <<
": reaction force f" <<
xyz[i];
4092 os <<
": reaction couple m" << xyz[i - 3];
4098 os <<
": reaction force derivative fP" << xyz[i - 5];
4103 os <<
": reaction couple derivative mP" << xyz[i - 8];
4116 << prefix << iIndex + 1 <<
"->" << iIndex + 3 <<
": "
4117 "position constraints [Px=Px0,Py=Py0,Pz=Pz0]" << std::endl
4118 << prefix << iIndex + 4 <<
"->" << iIndex + 5 <<
": "
4119 "orientation constraints [gx=gx0,gy=gy0]" << std::endl;
4124 << prefix << iIndex + 1 <<
"->" << iIndex + 3 <<
": "
4125 "velocity constraints [vx=0,vy=0,vz=0]" << std::endl
4126 << prefix << iIndex + 4 <<
"->" << iIndex + 5 <<
": "
4127 "angular velocity constraints [wx=0,wy=0]" << std::endl;
4136 std::ostringstream os;
4137 os <<
"PlanePinJoint(" <<
GetLabel() <<
")";
4139 unsigned short nself = 5;
4146 std::string name = os.str();
4148 for (
unsigned i = 0; i < 3; i++) {
4150 os.seekp(0, std::ios_base::end);
4151 os <<
": position constraint P" <<
xyz[i];
4155 for (
unsigned i = 0; i < 2; i++) {
4157 os.seekp(0, std::ios_base::end);
4158 os <<
": orientation constraint g" <<
xyz[i];
4159 desc[3 + i] = os.str();
4163 for (
unsigned i = 0; i < 3; i++) {
4165 os.seekp(0, std::ios_base::end);
4166 os <<
": position constraint derivative v" <<
xyz[i];
4167 desc[5 + i] = os.str();
4170 for (
unsigned i = 0; i < 2; i++) {
4172 os.seekp(0, std::ios_base::end);
4173 os <<
": orientation constraint derivative w" <<
xyz[i];
4174 desc[8 + i] = os.str();
4195 os <<
": position constraint P" <<
xyz[i];
4200 os <<
": orientation constraint g" << xyz[i - 3];
4206 os <<
": position constraint derivative v" << xyz[i - 5];
4211 os <<
": orientation constraint derivative w" << xyz[i - 8];
4224 for (
unsigned i = 0; i < ph->size(); i++) {
4247 }
else if (dynamic_cast<Joint::ReactionsHint *>(pjh)) {
4262 if (strncasecmp(s,
"offset{" ,
STRLENOF(
"offset{" )) == 0) {
4265 if (strcmp(&s[1],
"}") != 0) {
4277 }
else if (strncasecmp(s,
"hinge{" ,
STRLENOF(
"hinge{" )) == 0) {
4280 if (strcmp(&s[1],
"}") != 0) {
4300 "INDEX ERROR in PlanePinJoint::GetEqType");
4340 <<
", reference, node, ",
d.
Write(out,
", ")
4341 <<
", hinge, reference, node, 1, ",
4344 <<
", reference, global, ",
X0.
Write(out,
", ")
4345 <<
",hinge, reference, global, 1, ",
4348 <<
"initial theta, " <<
dTheta <<
", "
4349 <<
"initial state, ",
F.
Write(out,
", ")
4350 <<
", " <<
M.
dGet(1) <<
", " <<
M.
dGet(2) <<
';' << std::endl;
4363 DEBUGCOUT(
"Entering PlanePinJoint::AssJac()" << std::endl);
4414 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
4415 WM.
PutItem(iCnt, iFirstMomentumIndex+iCnt,
4416 iFirstReactionIndex+iCnt, 1.);
4417 WM.
PutItem(3+iCnt, 3+iFirstMomentumIndex+iCnt,
4418 iFirstReactionIndex+4, Tmp1.dGet(iCnt));
4419 WM.
PutItem(6+iCnt, 3+iFirstMomentumIndex+iCnt,
4420 iFirstReactionIndex+5, Tmp2.
dGet(iCnt));
4423 WM.
PutCross(10, iFirstMomentumIndex+3,
4424 iFirstReactionIndex, dTmp);
4431 WM.
PutMat3x3(16, iFirstMomentumIndex+3, iFirstPositionIndex+3,
4437 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
4438 WM.
PutItem(24+iCnt, iFirstReactionIndex+iCnt,
4439 iFirstPositionIndex+iCnt, -1.);
4442 WM.
PutCross(28, iFirstReactionIndex,
4443 iFirstPositionIndex+3, dTmp);
4445 for (
int iCnt = 1; iCnt <= 3; iCnt ++) {
4446 WM.
PutItem(33+iCnt, iFirstReactionIndex+4,
4447 iFirstPositionIndex+3+iCnt, -Tmp1.dGet(iCnt));
4448 WM.
PutItem(36+iCnt, iFirstReactionIndex+5,
4449 iFirstPositionIndex+3+iCnt, Tmp2.
dGet(iCnt));
4462 DEBUGCOUT(
"Entering PlanePinJoint::AssRes()" << std::endl);
4474 for (
int iCnt = 1; iCnt <= 6; iCnt++) {
4475 WorkVec.
PutRowIndex(iCnt, iFirstMomentumIndex+iCnt);
4480 for (
int iCnt = 1; iCnt <= 5; iCnt++) {
4481 WorkVec.
PutRowIndex(6+iCnt, iFirstReactionIndex+iCnt);
4484 F =
Vec3(XCurr, iFirstReactionIndex+1);
4485 M =
Vec3(XCurr(iFirstReactionIndex+4),
4486 XCurr(iFirstReactionIndex+5),
4504 WorkVec.
Add(7, (x+dTmp-
X0)/dCoef);
4506 WorkVec.
PutCoef(10, e3.Dot(e2)/dCoef);
4507 WorkVec.
PutCoef(11, e3.Dot(e1)/dCoef);
4520 RTmp.MulTV(
F),
M,
F, RTmp*
M)
4544 integer iFirstVelocityIndex = iFirstPositionIndex+6;
4546 integer iReactionPrimeIndex = iFirstReactionIndex+5;
4549 for (
int iCnt = 1; iCnt <= 6; iCnt++) {
4556 for (
int iCnt = 1; iCnt <= 10; iCnt++) {
4557 WM.
PutRowIndex(12+iCnt, iFirstReactionIndex+iCnt);
4558 WM.
PutColIndex(12+iCnt, iFirstReactionIndex+iCnt);
4563 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
4565 WM.
PutCoef(iCnt, 12+iCnt, 1.);
4568 WM.
PutCoef(6+iCnt, 17+iCnt, 1.);
4571 WM.
PutCoef(12+iCnt, iCnt, -1.);
4574 WM.
PutCoef(17+iCnt, 6+iCnt, -1.);
4581 Vec3 FPrime(XCurr, iReactionPrimeIndex+1);
4582 Vec3 MPrime(XCurr(iReactionPrimeIndex+4),
4583 XCurr(iReactionPrimeIndex+5),
4595 Vec3 Tmp1(e2.Cross(e3));
4596 Vec3 Tmp2(e3.Cross(e1));
4604 if (Tmp1.Dot() <= std::numeric_limits<doublereal>::epsilon() || Tmp2.Dot() <= std::numeric_limits<doublereal>::epsilon()) {
4605 silent_cerr(
"PlanePinJoint(" <<
GetLabel() <<
"): "
4606 "node and fixed point hinge axes are (nearly) orthogonal"
4611 Vec3 TmpPrime1(e3.Cross(e2.Cross(Omega)));
4612 Vec3 TmpPrime2(e3.Cross(Omega.Cross(e1)));
4634 WM.
Add(10, 13, OWedgedWedge);
4637 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
4646 WM.
PutCoef(9+iCnt, 16, TmpPrime1(iCnt));
4647 WM.
PutCoef(9+iCnt, 17, TmpPrime2(iCnt));
4654 WM.
Add(18, 4, OWedgedWedge);
4658 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
4675 TmpPrime2 = e2.
Cross(Omega.Cross(e3));
4676 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
4677 WM.
PutCoef(21, 3+iCnt, TmpPrime2(iCnt));
4680 TmpPrime2 = e1.
Cross(Omega.Cross(e3));
4681 for (
int iCnt = 1; iCnt <= 3; iCnt++) {
4682 WM.
PutCoef(22, 3+iCnt, TmpPrime2(iCnt));
4694 DEBUGCOUT(
"Entering PlanePinJoint::InitialAssRes()" << std::endl);
4704 integer iFirstVelocityIndex = iFirstPositionIndex+6;
4706 integer iReactionPrimeIndex = iFirstReactionIndex+5;
4709 for (
int iCnt = 1; iCnt <= 6; iCnt++) {
4710 WorkVec.
PutRowIndex(iCnt, iFirstPositionIndex+iCnt);
4711 WorkVec.
PutRowIndex(6+iCnt, iFirstVelocityIndex+iCnt);
4714 for (
int iCnt = 1; iCnt <= 10; iCnt++) {
4715 WorkVec.
PutRowIndex(12+iCnt, iFirstReactionIndex+iCnt);
4726 F =
Vec3(XCurr, iFirstReactionIndex+1);
4727 M =
Vec3(XCurr(iFirstReactionIndex+4),
4728 XCurr(iFirstReactionIndex+5),
4730 Vec3 FPrime(XCurr, iReactionPrimeIndex+1);
4731 Vec3 MPrime(XCurr(iReactionPrimeIndex+4),
4732 XCurr(iReactionPrimeIndex+5),
4737 Vec3 e1(RhTmp.GetVec(1));
4738 Vec3 e2(RhTmp.GetVec(2));
4741 Vec3 Tmp1(e2.Cross(e3));
4742 Vec3 Tmp2(e3.Cross(e1));
4744 Vec3 TmpPrime1(e3.Cross(e2.Cross(Omega)));
4745 Vec3 TmpPrime2(e3.Cross(Omega.Cross(e1)));
4751 Vec3 OWedged(Omega.Cross(dTmp));
4756 Vec3 MPrimeTmp(e3.Cross(MTmp.Cross(Omega))+
4757 e2.Cross(e3)*MPrime.
dGet(1)+e3.Cross(e1)*MPrime.
dGet(2));
4764 WorkVec.
Sub(7, FPrime);
4768 WorkVec.
Add(13, x+dTmp-
X0);
4771 WorkVec.
PutCoef(16, e2.Dot(e3));
4772 WorkVec.
PutCoef(17, e1.Dot(e3));
4775 WorkVec.
Add(18, v+OWedged);
4778 Vec3 Tmp(e3.Cross(Omega));
4779 WorkVec.
PutCoef(21, e2.Dot(Tmp));
4780 WorkVec.
PutCoef(22, e1.Dot(Tmp));
4796 unsigned int idx = 0;
4869 silent_cerr(
"PlanePinJoint(" <<
GetLabel() <<
"): "
4870 "illegal private data " << i << std::endl);
virtual DofOrder::Order GetEqType(unsigned int i) const
virtual unsigned int iGetNumDof(void) const
void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
virtual Hint * ParseHint(DataManager *pDM, const char *s) const
const StructNode * pNode2
SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
void PutColIndex(integer iSubCol, integer iCol)
VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
void PutMat3x3(integer iSubIt, integer iFirstRow, integer iFirstCol, const Mat3x3 &m)
const Vec3 Zero3(0., 0., 0.)
Vec3 Cross(const Vec3 &v) const
virtual std::ostream & DescribeEq(std::ostream &out, const char *prefix="", bool bInitial=false) const
#define ASSERTMSGBREAK(expr, msg)
void Set(doublereal xx, integer i, integer iidx)
virtual void AssRes(SubVectorHandler &WorkVec, const unsigned int startdof, const unsigned int solution_startdof, const doublereal F, const doublereal v, const VectorHandler &X, const VectorHandler &XP)=0
VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
std::ostream & Write(std::ostream &out, const char *sFill=" ") const
static void sh(int signum)
virtual const Mat3x3 & GetRRef(void) const
virtual bool bToBeOutput(void) const
OrientationDescription od
virtual Hint * ParseHint(DataManager *pDM, const char *s) const
virtual void AfterConvergence(const VectorHandler &X, const VectorHandler &XP)
#define MBDYN_EXCEPT_ARGS
virtual void ResizeReset(integer)
void OutputPrepare(OutputHandler &OH)
const MatCross_Manip MatCross
bool UseNetCDF(int out) const
FullSubMatrixHandler & SetFull(void)
virtual const Mat3x3 & GetRCurr(void) const
virtual std::ostream & DescribeDof(std::ostream &out, const char *prefix="", bool bInitial=false) const
doublereal Norm(void) const
static const unsigned int NumDof
doublereal Dot(const Vec3 &v) const
void Output(OutputHandler &OH) const
void Add(integer iRow, integer iCol, const Vec3 &v)
PlaneRotationJoint(unsigned int uL, const DofOwner *pDO, const StructNode *pN1, const StructNode *pN2, const Mat3x3 &R1hTmp, const Mat3x3 &R2hTmp, const OrientationDescription &od, flag fOut)
virtual std::ostream & DescribeDof(std::ostream &out, const char *prefix="", bool bInitial=false) const
virtual std::ostream & Restart(std::ostream &out) const
virtual Hint * ParseHint(DataManager *pDM, const char *s) const
std::ostream & Write(std::ostream &out, const FullMatrixHandler &m, const char *s, const char *s2)
virtual void AfterConvergence(const VectorHandler &X, const VectorHandler &XP)
const StructNode * pNode2
BasicShapeCoefficient *const Sh_c
void Add(doublereal xx, integer i)
~PlaneRotationJoint(void)
void SetValue(DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)
void Set(doublereal xx, integer eq, integer block, integer block_col=1)
virtual void Sub(integer iRow, const Vec3 &v)
#define SAFEDELETEARR(pnt)
doublereal dGet(void) const
virtual unsigned int iGetNumDof(void) const
void PutCoef(integer iRow, integer iCol, const doublereal &dCoef)
SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
void Output(OutputHandler &OH) const
void Sub(doublereal xx, integer eq, integer block, integer block_col=1)
void ResizeReset(integer iNewRow, integer iNewCol)
virtual doublereal Sh_c(void) const =0
DofOrder::Order GetEqType(unsigned int i) const
virtual const Vec3 & GetWRef(void) const
void PutCross(integer iSubIt, integer iFirstRow, integer iFirstCol, const Vec3 &v)
virtual unsigned int iGetNumPrivData(void) const
std::vector< Hint * > Hints
void OutputPrepare(OutputHandler &OH)
virtual void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Vec3 GetVec(unsigned short int i) const
AxialRotationJoint(unsigned int uL, const DofOwner *pDO, const StructNode *pN1, const StructNode *pN2, const Vec3 &dTmp1, const Vec3 &dTmp2, const Mat3x3 &R1hTmp, const Mat3x3 &R2hTmp, const DriveCaller *pDC, const OrientationDescription &od, flag fOut, const doublereal rr=0., const doublereal pref=0., BasicShapeCoefficient *const sh=0, BasicFriction *const f=0)
virtual void SetValue(DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)
void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
virtual void SetValue(DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)
VariableSubMatrixHandler & InitialAssJac(VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
virtual std::ostream & Restart(std::ostream &out) const =0
virtual doublereal fc(void) const =0
Vec3 VecRot(const Mat3x3 &Phi)
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Vec3 MulTV(const Vec3 &v) const
DofOrder::Order GetDofType(unsigned int i) const
SubVectorHandler & InitialAssRes(SubVectorHandler &WorkVec, const VectorHandler &XCurr)
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
VariableSubMatrixHandler & InitialAssJac(VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
virtual void SetValue(DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)
SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
void PutItem(integer iSubIt, integer iRow, integer iCol, const doublereal &dCoef)
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
void OutputPrepare(OutputHandler &OH)
void ReDim(const integer n)
SubVectorHandler & InitialAssRes(SubVectorHandler &WorkVec, const VectorHandler &XCurr)
virtual void AfterConvergence(const doublereal F, const doublereal v, const VectorHandler &X, const VectorHandler &XP, const unsigned int solution_startdof)
virtual std::ostream & DescribeEq(std::ostream &out, const char *prefix="", bool bInitial=false) const
Vec3 MatR2EulerAngles313(const Mat3x3 &R)
virtual unsigned int iGetNumPrivData(void) const
virtual unsigned int iGetNumPrivData(void) const
SubVectorHandler & InitialAssRes(SubVectorHandler &WorkVec, const VectorHandler &XCurr)
virtual Hint * ParseHint(DataManager *pDM, const char *s) const
void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
virtual unsigned int iGetPrivDataIdx(const char *s) const
static const unsigned int NumDof
long GetCurrentStep(void) const
const doublereal & dGet(unsigned short int iRow) const
virtual void Output(OutputHandler &OH) const
virtual std::ostream & Restart(std::ostream &out) const
virtual unsigned int iGetNumPrivData(void) const
virtual std::ostream & DescribeDof(std::ostream &out, const char *prefix="", bool bInitial=false) const =0
Vec3 MatR2EulerAngles123(const Mat3x3 &R)
virtual std::ostream & DescribeEq(std::ostream &out, const char *prefix="", bool bInitial=false) const =0
virtual doublereal dGetPrivData(unsigned int i) const
virtual std::ostream & DescribeEq(std::ostream &out, const char *prefix="", bool bInitial=false) const
virtual Hint * ParseHint(DataManager *pDM, const char *s) const
virtual void AfterConvergence(const VectorHandler &X, const VectorHandler &XP)
virtual integer iGetFirstMomentumIndex(void) const =0
virtual integer iGetFirstPositionIndex(void) const
virtual const Vec3 & GetWCurr(void) const
DofOrder::Order GetEqType(unsigned int i) const
virtual std::ostream & Restart(std::ostream &out) const
virtual DofOrder::Order GetDofType(unsigned int i) const =0
std::ostream & Joints(void) const
DriveCaller * pCreateDrive(DataManager *pDM) const
void Add(doublereal xx, integer eq, integer block, integer block_col=1)
DotTraits< VectorExprLhs, VectorExprRhs, N_rows, N_rows >::ExpressionType Dot(const VectorExpression< VectorExprLhs, N_rows > &u, const VectorExpression< VectorExprRhs, N_rows > &v)
virtual void dSh_c(ExpandableRowVector &dShc, const doublereal f, const doublereal F, const doublereal v, const ExpandableRowVector &dfc, const ExpandableRowVector &dF, const ExpandableRowVector &dv) const =0
~AxialRotationJoint(void)
#define ASSERT(expression)
PlanePinJoint(unsigned int uL, const DofOwner *pDO, const StructNode *pN, const Vec3 &X0Tmp, const Mat3x3 &R0Tmp, const Vec3 &dTmp, const Mat3x3 &RhTmp, flag fOut, const bool _calcInitdTheta, const doublereal initDTheta)
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)
Vec3 MatR2EulerAngles(const Mat3x3 &R)
OrientationDescription od
DriveCaller * pGetDriveCaller(void) const
virtual const Vec3 & GetXCurr(void) const
virtual void Add(integer iRow, const Vec3 &v)
void Link(const integer i, const ExpandableRowVector *const xp, const integer rhs_block=1)
void ReDim(const integer n, const integer m)
virtual void ResizeReset(integer, integer)
virtual doublereal dGetPrivData(unsigned int i) const
virtual void ReadInitialState(MBDynParser &HP)
virtual doublereal dGet(const doublereal &dVar) const =0
virtual unsigned int iGetNumDof(void) const
virtual void AssJac(FullSubMatrixHandler &WorkMat, ExpandableRowVector &dfc, const unsigned int startdof, const unsigned int solution_startdof, const doublereal dCoef, const doublereal F, const doublereal v, const VectorHandler &X, const VectorHandler &XP, const ExpandableRowVector &dF, const ExpandableRowVector &dv) const =0
VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
BasicShapeCoefficient *const Sh_c
virtual unsigned int iGetNumDof(void) const =0
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
OrientationDescription od
const MatCrossCross_Manip MatCrossCross
virtual void AfterConvergence(const VectorHandler &X, const VectorHandler &XP)
virtual void Put(integer iRow, const Vec3 &v)
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
virtual std::ostream & Restart(std::ostream &out) const
SubVectorHandler & InitialAssRes(SubVectorHandler &WorkVec, const VectorHandler &XCurr)
virtual unsigned int iGetNumDof(void) const
virtual unsigned int iGetPrivDataIdx(const char *s) const
void PutRowIndex(integer iSubRow, integer iRow)
virtual doublereal dGetPrivData(unsigned int i) const
const doublereal * pGetVec(void) const
Vec3 MatR2EulerAngles321(const Mat3x3 &R)
void Set(const DriveCaller *pDC)
void Output(OutputHandler &OH) const
static const unsigned int NumSelfDof
void Sub(doublereal xx, integer i)
virtual std::ostream & Restart(std::ostream &out) const
virtual const Vec3 & GetVCurr(void) const
void Sub(integer iRow, integer iCol, const Vec3 &v)
#define SAFENEWARR(pnt, item, sz)
const StructNode * pNode1
PlaneHingeJoint(unsigned int uL, const DofOwner *pDO, const StructNode *pN1, const StructNode *pN2, const Vec3 &dTmp1, const Vec3 &dTmp2, const Mat3x3 &R1hTmp, const Mat3x3 &R2hTmp, const OrientationDescription &od, flag fOut, const bool _calcInitdTheta=true, const doublereal initDTheta=0., const doublereal rr=0., const doublereal pref=0., BasicShapeCoefficient *const sh=0, BasicFriction *const f=0)
VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
const StructNode * pNode2
SparseSubMatrixHandler & SetSparse(void)
virtual void ReadInitialState(MBDynParser &HP)
virtual integer iGetFirstIndex(void) const
DofOrder::Order GetEqType(unsigned int i) const
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
const StructNode * pNode1
void SetBlockDim(const integer block, const integer ncols)
virtual doublereal dGetPrivData(unsigned int i) const
void Link(const integer block, const ExpandableMatrix *const xp)
virtual std::ostream & DescribeDof(std::ostream &out, const char *prefix="", bool bInitial=false) const
virtual std::ostream & DescribeEq(std::ostream &out, const char *prefix="", bool bInitial=false) const
unsigned int GetLabel(void) const
virtual unsigned int iGetPrivDataIdx(const char *s) const
VariableSubMatrixHandler & InitialAssJac(VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
virtual Vec3 GetVec3(void)
const StructNode * pNode1
DofOrder::Order GetEqType(unsigned int i) const
virtual std::ostream & DescribeDof(std::ostream &out, const char *prefix="", bool bInitial=false) const
bool UseText(int out) const
virtual unsigned int iGetPrivDataIdx(const char *s) const
virtual void SetValue(DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)
virtual doublereal GetReal(const doublereal &dDefval=0.0)
static const unsigned int NumSelfDof
VariableSubMatrixHandler & InitialAssJac(VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)