47 static const char xyz[] =
"xyz";
54 "momentum definition B",
62 "position constraint P",
63 "position constraint derivative v"
68 "incremental rotation parameter g",
74 "momenta moment definition G",
76 "moment equilibrium M"
79 "linear velocity definition v",
80 "angular velocity definition w",
81 "force equilibrium F",
82 "moment equilibrium M"
86 "incremental rotation parameter g",
92 "orientation constraint g",
94 "orientation constraint derivative w"
112 :
Node(uL, pDO, fOut),
129 dPositionStiffness(dPosStiff),
130 dVelocityStiffness(dVelStiff),
205 << prefix << iIndex + 1 <<
"->" << iIndex + 3 <<
": "
206 "position [px,py,pz]" << std::endl;
211 << prefix << iIndex + 1 <<
"->" << iIndex + 3 <<
": "
212 "linear velocity [vx,vy,vz]" << std::endl;
233 std::ostringstream os;
234 os <<
"StructDispNode(" <<
GetLabel() <<
")";
238 int iend = bInitial ? 6 : 3;
240 std::string name = os.str();
242 for (i = 0; i < iend; i++) {
244 os.seekp(0, std::ios_base::end);
250 if (i < 0 || i >= iend) {
265 << prefix << iIndex + 1 <<
"->" << iIndex + 3 <<
": "
266 "position [Px,Py,Pz]" << std::endl
267 << prefix << iIndex + 7 <<
"->" << iIndex + 9 <<
": "
268 "linear velocity [vx,vy,vz]" << std::endl;
270 if (dynamic_cast<const DynamicStructDispNode*>(
this) != 0) {
275 << prefix << iIndex + 1 <<
"->" << iIndex + 3 <<
": "
276 "force equilibrium [Fx,Fy,Fz]" << std::endl;
297 std::ostringstream os;
298 os <<
"StructDispNode(" <<
GetLabel() <<
")";
301 std::string name(os.str());
304 for (i = 0; i < 6; i++) {
306 os.seekp(0, std::ios_base::end);
312 for (i = 0; i < 3; i++) {
314 os.seekp(0, std::ios_base::end);
315 os <<
": " <<
sdn_eq[1 + i/3] <<
xyz[i%3];
322 if (i < 0 || i >= 6) {
329 if (i < 0 || i >= 3) {
333 os <<
": " <<
sdn_eq[1 + i/3] <<
xyz[i%3];
343 out <<
" structural displacement: " <<
GetLabel() <<
", ";
349 out <<
", reference, global, ";
351 <<
", reference, global, ",
374 ASSERT(iDof >= 1 && iDof <= 3);
375 ASSERT(iOrder == 0 || iOrder == 1);
376 if (iDof >= 1 && iDof <= 3) {
379 }
else if (iOrder == 1) {
383 silent_cerr(
"StructDispNode(" <<
GetLabel() <<
"): "
384 "required dof " << iDof <<
" (order " << iOrder <<
") "
385 "is not available." << std::endl);
399 ASSERT(iDof >= 1 && iDof <= 3);
400 ASSERT(iOrder == 0 || iOrder == 1);
401 if (iDof >= 1 && iDof <= 3) {
404 }
else if (iOrder == 1) {
408 silent_cerr(
"StructDispNode(" <<
GetLabel() <<
"): "
409 "required dof " << iDof <<
" (order " << iOrder <<
") "
410 "is not available." << std::endl);
424 unsigned int iOrder )
426 ASSERT(iDof >= 1 && iDof <= 6);
427 ASSERT(iOrder == 0 || iOrder == 1);
428 if (iDof >= 1 && iDof <= 3) {
430 XCurr(iDof) = dValue;
432 }
else if (iOrder == 1) {
433 VCurr(iDof) = dValue;
437 silent_cerr(
"StructDispNode(" <<
GetLabel() <<
"): "
438 "required dof " << iDof <<
" (order " << iOrder <<
") "
439 "is not available." << std::endl);
464 pedantic_cerr(
"StructDispNode::OutputPrepare(" <<
GetLabel() <<
"): "
465 "warning, unknown node type?" << std::endl);
470 std::ostringstream os;
472 (void)OH.CreateVar(os.str(), type);
476 std::string name = os.str();
478 Var_X = OH.CreateVar<
Vec3>(name +
"X",
"m",
479 "global position vector (X, Y, Z)");
481 Var_Phi = OH.CreateRotationVar(name,
"",
od,
"global");
483 Var_XP = OH.CreateVar<
Vec3>(name +
"XP",
"m/s",
484 "global velocity vector (v_X, v_Y, v_Z)");
486 Var_Omega = OH.CreateVar<
Vec3>(name +
"Omega",
"radian/s",
487 "global angular velocity vector (omega_X, omega_Y, omega_Z)");
491 Var_XPP = OH.CreateVar<
Vec3>(name +
"XPP",
"m/s^2",
492 "global acceleration vector (a_X, a_Y, a_Z)");
494 Var_OmegaP = OH.CreateVar<
Vec3>(name +
"OmegaP",
"radian/s^2",
495 "global angular acceleration vector (omegaP_X, omegaP_Y, omegaP_Z)");
540 <<
" " <<
XCurr <<
" ";
643 #ifdef MBDYN_X_RELATIVE_PREDICTION
652 RPrev = R0.
MulTM(RCurr);
654 WPrev = R0.
MulTV(WCurr - W0);
657 std::cout <<
"StructNode(" <<
GetLabel() <<
"): "
658 "SetValue: X=" <<
XPrev
685 #ifdef MBDYN_X_RELATIVE_PREDICTION
705 RCurr = R0.
MulTM(RCurr);
707 WCurr = R0.
MulTV(WCurr - W0);
716 std::cout <<
"StructNode(" <<
GetLabel() <<
"): "
717 "BeforePredict: X=" <<
XCurr
739 #ifdef MBDYN_X_RELATIVE_PREDICTION
757 WCurr = W0 + R0*WCurr;
772 X.
Put(iFirstIndex + 1, XCurr);
773 XP.
Put(iFirstIndex + 1, VCurr);
776 std::cout <<
"StructNode(" <<
GetLabel() <<
"): "
777 "AfterPredict: X=" << XCurr
840 std::string sDataName(s);
842 const char *brk = std::strchr(s,
'[' );
847 size_t len = brk - s;;
851 idx = strtol(brk, &next, 10);
852 int save_errno = errno;
853 if (next == brk || strcmp(next,
"]") != 0) {
857 if (save_errno == ERANGE) {
858 silent_cerr(
"StructNode(" <<
GetLabel() <<
"): "
859 "warning, private data index "
860 << std::string(brk, next - brk)
861 <<
" overflows" << std::endl);
884 if (strncmp(s,
"PE", len) == 0) {
885 if (idx < 0 || idx > 3) {
892 if (idx < 1 || idx > 3) {
896 if (strncmp(s,
"X", len) == 0) {
900 if (strncmp(s,
"x", len) == 0) {
904 if (strncmp(s,
"Phi", len) == 0) {
908 if (strncmp(s,
"XP", len) == 0) {
912 if (strncmp(s,
"xP", len) == 0) {
916 if (strncmp(s,
"Omega", len) == 0) {
920 if (strncmp(s,
"omega", len) == 0) {
924 if (strncmp(s,
"E", len) == 0
925 || strncmp(s,
"E123", len) == 0)
930 if (strncmp(s,
"E313", len) == 0) {
934 if (strncmp(s,
"E321", len) == 0) {
940 if (strncmp(s,
"XPP", len) == 0) {
944 }
else if (strncmp(s,
"xPP", len) == 0) {
948 }
else if (strncmp(s,
"OmegaP", len) == 0) {
952 }
else if (strncmp(s,
"omegaP", len) == 0) {
965 silent_cerr(
"StructNode(" <<
GetLabel() <<
"): "
966 "request to compute accelerations failed, requested by private data \"" << sDataName <<
"\""
1002 return VCurr(i - 9);
1007 return VCurr(i - 12);
1087 StructDispNode(uL, pDO, X0, V0, pRN, pRBK, dPosStiff, dVelStiff, ood, fOut),
1088 bComputeAccels((fOut & OUTPUT_ACCELERATIONS) == OUTPUT_ACCELERATIONS),
1120 if (bInitial ==
false) {
1122 << prefix << iIndex + 4 <<
"->" << iIndex + 6 <<
": "
1123 "momentum [Bx,By,Bz]" << std::endl;
1132 if (bInitial || i == -1 || (i >= 0 && i < 3)) {
1135 if (bInitial || (i >= 0 && i < 3)) {
1147 std::ostringstream os;
1148 os <<
"StructDispNode(" <<
GetLabel() <<
")";
1151 std::string name = os.str();
1153 for (i = 3; i < 6; i++) {
1155 os.seekp(0, std::ios_base::end);
1161 if (i < 3 || i >= 6) {
1173 if (bInitial ==
false) {
1177 << prefix << iIndex + 1 <<
"->" << iIndex + 3 <<
": "
1178 "momentum definition [Bx,By,Bz]" << std::endl;
1189 if (bInitial || i == -1 || (i >= 3 && i < 6)) {
1191 if (!bInitial && i != -1) {
1196 if (bInitial || (i >= 3 && i < 6)) {
1203 for (
int j = 0; j < 3; j++) {
1204 desc[3 + j] = desc[j];
1211 std::ostringstream os;
1212 os <<
"StructDispNode(" <<
GetLabel() <<
")";
1215 std::string name(os.str());
1217 for (i = 0; i < 3; i++) {
1219 os.seekp(0, std::ios_base::end);
1225 if (i < 0 || i >= 3) {
1305 ASSERT(iDof >= 1 && iDof <= 3);
1306 ASSERT(iOrder >= 0 && iOrder <= 2);
1312 silent_cerr(
"DynamicStructDispNode::dGetDofValue("
1313 << iDof <<
"," << iOrder <<
"): "
1314 "accelerations are not computed while they should"
1338 ASSERT(iDof >= 1 && iDof <= 3);
1339 ASSERT(iOrder == 0 || iOrder == 1);
1345 silent_cerr(
"DynamicStructDispNode::dGetDofValuePrev("
1346 << iDof <<
"," << iOrder <<
"): "
1347 "accelerations are not computed while they should"
1363 unsigned int iOrder )
1365 ASSERT(iDof >= 1 && iDof <= 3);
1366 ASSERT(iOrder == 0 || iOrder == 1);
1372 silent_cerr(
"DynamicStructNode::SetDofValue("
1373 << dValue <<
"," << iDof <<
"," << iOrder <<
"): "
1374 "accelerations are not computed while they should"
1418 StructDispNode(uL, pDO, X0, V0, pRN, pRBK, dPosStiff, dVelStiff, ood, fOut)
1452 :
StructDispNode(uL, pDO, X0, V0, pRN, pRBK, dPosStiff, dVelStiff, ood, fOut),
1467 ,bUpdateRotation(
true)
1504 << prefix << iIndex + 1 <<
"->" << iIndex + 3 <<
": "
1505 "position [px,py,pz]" << std::endl
1506 << prefix << iIndex + 4 <<
"->" << iIndex + 6 <<
": "
1507 "orientation parameters [gx,gy,gz]" << std::endl;
1512 << prefix << iIndex + 1 <<
"->" << iIndex + 3 <<
": "
1513 "linear velocity [vx,vy,vz]" << std::endl
1514 << prefix << iIndex + 4 <<
"->" << iIndex + 6 <<
": "
1515 "angular velocity [wx,wy,wz]" << std::endl;
1536 std::ostringstream os;
1537 os <<
"StructNode(" <<
GetLabel() <<
")";
1541 int iend = bInitial ? 12 : 6;
1543 std::string name = os.str();
1545 for (i = 0; i < iend; i++) {
1547 os.seekp(0, std::ios_base::end);
1553 if (i < 0 || i >= iend) {
1568 << prefix << iIndex + 1 <<
"->" << iIndex + 3 <<
": "
1569 "position [Px,Py,Pz]" << std::endl
1570 << prefix << iIndex + 4 <<
"->" << iIndex + 6 <<
": "
1571 "orientation [gx,gy,gz]" << std::endl
1572 << prefix << iIndex + 7 <<
"->" << iIndex + 9 <<
": "
1573 "linear velocity [vx,vy,vz]" << std::endl
1574 << prefix << iIndex + 10 <<
"->" << iIndex + 12 <<
": "
1575 "angular velocity [wx,wy,wz]" << std::endl;
1577 if (dynamic_cast<const DynamicStructNode*>(
this) != 0
1578 || dynamic_cast<const ModalNode*>(
this) != 0)
1584 << prefix << iIndex + 1 <<
"->" << iIndex + 3 <<
": "
1585 "force equilibrium [Fx,Fy,Fz]" << std::endl
1586 << prefix << iIndex + 4 <<
"->" << iIndex + 6 <<
": "
1587 "moment equilibrium [Mx,My,Mz]" << std::endl;
1608 std::ostringstream os;
1609 os <<
"StructNode(" <<
GetLabel() <<
")";
1612 std::string name(os.str());
1615 for (i = 0; i < 12; i++) {
1617 os.seekp(0, std::ios_base::end);
1623 for (i = 0; i < 6; i++) {
1625 os.seekp(0, std::ios_base::end);
1626 os <<
": " <<
sn_eq[2 + i/3] <<
xyz[i%3];
1633 if (i < 0 || i >= 12) {
1640 if (i < 0 || i >= 6) {
1644 os <<
": " <<
sn_eq[2 + i/3] <<
xyz[i%3];
1654 out <<
" structural: " <<
GetLabel() <<
", ";
1660 out <<
", reference, global, ";
1664 <<
", reference, global, ",
1666 <<
", reference, global, ",
1682 ASSERT(iDof >= 1 && iDof <= 6);
1683 ASSERT(iOrder == 0 || iOrder == 1);
1684 if (iDof >= 1 && iDof <= 3) {
1687 }
else if (iOrder == 1) {
1690 }
else if (iDof >= 4 && iDof <= 6) {
1692 return WCurr(iDof - 3);
1693 }
else if (iOrder == 0) {
1694 silent_cerr(
"StructNode(" <<
GetLabel() <<
"): "
1695 "unable to return angles" << std::endl);
1699 silent_cerr(
"StructNode(" <<
GetLabel() <<
"): "
1700 "required dof " << iDof <<
" (order " << iOrder <<
") "
1701 "is not available." << std::endl);
1715 ASSERT(iDof >= 1 && iDof <= 6);
1716 ASSERT(iOrder == 0 || iOrder == 1);
1717 if (iDof >= 1 && iDof <= 3) {
1720 }
else if (iOrder == 1) {
1723 }
else if (iDof >= 4 && iDof <= 6) {
1725 return WPrev(iDof - 3);
1726 }
else if (iOrder == 0) {
1727 silent_cerr(
"StructNode(" <<
GetLabel() <<
"): "
1728 "unable to return angles" << std::endl);
1732 silent_cerr(
"StructNode(" <<
GetLabel() <<
"): "
1733 "required dof " << iDof <<
" (order " << iOrder <<
") "
1734 "is not available." << std::endl);
1748 unsigned int iOrder )
1750 ASSERT(iDof >= 1 && iDof <= 6);
1751 ASSERT(iOrder == 0 || iOrder == 1);
1752 if (iDof >= 1 && iDof <= 3) {
1754 XCurr(iDof) = dValue;
1756 }
else if (iOrder == 1) {
1757 VCurr(iDof) = dValue;
1760 }
else if (iDof >= 4 && iDof <= 6) {
1762 WCurr(iDof - 3) = dValue;
1764 }
else if (iOrder == 0) {
1765 silent_cerr(
"StructNode(" <<
GetLabel() <<
"): "
1766 "unable to set angles" << std::endl);
1771 silent_cerr(
"StructNode(" <<
GetLabel() <<
"): "
1772 "required dof " << iDof <<
" (order " << iOrder <<
") "
1773 "is not available." << std::endl);
1806 pedantic_cerr(
"StructNode::OutputPrepare(" <<
GetLabel() <<
"): "
1807 "warning, unknown node type?" << std::endl);
1812 std::ostringstream os;
1813 os <<
"node.struct." <<
GetLabel();
1814 (void)OH.CreateVar(os.str(), type);
1818 std::string name = os.str();
1820 Var_X = OH.CreateVar<
Vec3>(name +
"X",
"m",
1821 "global position vector (X, Y, Z)");
1823 Var_Phi = OH.CreateRotationVar(name,
"",
od,
"global");
1825 Var_XP = OH.CreateVar<
Vec3>(name +
"XP",
"m/s",
1826 "global velocity vector (v_X, v_Y, v_Z)");
1828 Var_Omega = OH.CreateVar<
Vec3>(name +
"Omega",
"radian/s",
1829 "global angular velocity vector (omega_X, omega_Y, omega_Z)");
1833 Var_XPP = OH.CreateVar<
Vec3>(name +
"XPP",
"m/s^2",
1834 "global acceleration vector (a_X, a_Y, a_Z)");
1836 Var_OmegaP = OH.CreateVar<
Vec3>(name +
"OmegaP",
"radian/s^2",
1837 "global angular acceleration vector (omegaP_X, omegaP_Y, omegaP_Z)");
1840 #endif // USE_NETCDF
1908 <<
" " <<
XCurr <<
" ";
1942 bUpdateRotation =
true;
1957 silent_cerr(
"StructNode(" <<
GetLabel() <<
"): "
1958 "incremental rotation too large, YMMV" << std::endl);
1990 using namespace grad;
1999 iFirstIndexLocal = -1;
2010 iFirstIndexLocal + i,
2011 MapVectorBase::LOCAL,
2017 using namespace grad;
2026 iFirstIndexLocal = -1;
2040 iFirstIndexLocal + i,
2041 MapVectorBase::LOCAL,
2046 template <
typename T>
2047 void StructNode::UpdateRotation(
const Mat3x3&
RRef,
const Vec3&
WRef,
const grad::Vector<T, 3>& g,
const grad::Vector<T, 3>& gP,
grad::Matrix<T, 3, 3>&
R,
grad::Vector<T, 3>& W,
enum grad::FunctionCall func)
const
2049 using namespace grad;
2051 const T d = 4. / (4. +
Dot(g, g));
2055 const T tmp1 = -g(3) * g(3);
2056 const T tmp2 = -g(2) * g(2);
2057 const T tmp3 = -g(1) * g(1);
2058 const T tmp4 = g(1) * g(2) * 0.5;
2059 const T tmp5 = g(2) * g(3) * 0.5;
2060 const T tmp6 = g(1) * g(3) * 0.5;
2062 RDelta(1,1) = (tmp1 + tmp2) * d * 0.5 + 1;
2063 RDelta(1,2) = (tmp4 - g(3)) * d;
2064 RDelta(1,3) = (tmp6 + g(2)) * d;
2065 RDelta(2,1) = (g(3) + tmp4) * d;
2066 RDelta(2,2) = (tmp1 + tmp3) * d * 0.5 + 1.;
2067 RDelta(2,3) = (tmp5 - g(1)) * d;
2068 RDelta(3,1) = (tmp6 - g(2)) * d;
2069 RDelta(3,2) = (tmp5 + g(1)) * d;
2070 RDelta(3,3) = (tmp2 + tmp3) * d * 0.5 + 1.;
2084 const T tmp7 = 0.5 * g(1) * d;
2085 const T tmp8 = 0.5 * g(2) * d;
2086 const T tmp9 = 0.5 * g(3) * d;
2098 W = G * gP + RDelta *
WRef;
2110 using namespace grad;
2112 if (bUpdateRotation || dCoef != dCoefGrad) {
2113 #ifdef USE_MULTITHREAD
2114 if (!gradInUse.bIsInUse()) {
2118 while (!gradInUse.bIsInUse()) {
2119 DEBUGCOUT(
"StructNode::UpdateRotation: StructNode(" <<
GetLabel() <<
") is in use!\n");
2122 if (!bUpdateRotation && dCoef == dCoefGrad) {
2123 gradInUse.ReSetInUse();
2141 UpdateRotation(RRef, WRef, gCurr_grad, gPCurr_grad, RCurr_grad, WCurr_grad, func);
2143 #if GRADIENT_DEBUG > 0
2145 const double dTol = 10 * std::numeric_limits<doublereal>::epsilon();
2155 if (std::abs(RCurr_grad(i, j).
dGetValue() - RCurr_tmp(i, j)) > dTol) {
2163 if (std::abs(RCurr_grad(i, j).
dGetValue() -
RCurr(i, j)) > dTol) {
2174 std::cerr <<
"gCurr=" <<
gCurr << std::endl;
2175 std::cerr <<
"RCurr=" << std::endl;
2176 for (
integer i = 1; i <= 3; ++i) {
2177 for (
integer j = 1; j <= 3; ++j) {
2178 std::cerr <<
RCurr(i, j) <<
" ";
2180 std::cerr << std::endl;
2183 std::cerr <<
"RCurr_grad=" << std::endl;
2185 std::cerr <<
"RRef=" << std::endl;
2186 for (
integer i = 1; i <= 3; ++i) {
2187 for (
integer j = 1; j <= 3; ++j) {
2188 std::cerr <<
RRef(i, j) <<
" ";
2190 std::cerr << std::endl;
2193 std::cerr <<
"RPrev=" << std::endl;
2194 for (
integer i = 1; i <= 3; ++i) {
2195 for (
integer j = 1; j <= 3; ++j) {
2196 std::cerr <<
RPrev(i, j) <<
" ";
2198 std::cerr << std::endl;
2201 std::cerr <<
"RCurr_grad=" << std::endl;
2203 for (
integer i = 1; i <= 3; ++i) {
2204 for (
integer j = 1; j <= 3; ++j) {
2205 std::cerr << RCurr_grad(i, j).dGetValue() <<
" ";
2207 std::cerr << std::endl;
2210 std::cerr <<
"WCurr=" <<
WCurr << std::endl;
2211 std::cerr <<
"WCurr_grad=";
2212 for (
integer i = 1; i <= 3; ++i) {
2213 std::cerr << WCurr_grad(i).dGetValue() <<
" ";
2215 std::cerr << std::endl;
2221 bUpdateRotation =
false;
2226 gradInUse.ReSetInUse();
2230 gradInUse.ReSetInUse();
2243 bUpdateRotation =
true;
2261 bUpdateRotation =
true;
2283 bUpdateRotation =
true;
2337 bUpdateRotation =
true;
2340 #ifdef MBDYN_X_RELATIVE_PREDICTION
2353 std::cout <<
"StructNode(" <<
GetLabel() <<
"): "
2354 "SetValue: X=" <<
XPrev
2396 #ifdef MBDYN_X_RELATIVE_PREDICTION
2424 std::cout <<
"StructNode(" <<
GetLabel() <<
"): "
2425 "BeforePredict: X=" <<
XCurr
2450 XPr.
Put(iFirstPos + 4, gPrev);
2463 <<
" " << std::setw(16) <<
"prev" << std::setw(16) <<
"curr" << std::setw(16) <<
GetLabel() << std::endl
2464 <<
"x:" << std::setw(16) <<
XPrev(1) << std::setw(16) <<
XCurr(1) << std::endl
2465 <<
" " << std::setw(16) <<
XPrev(2) << std::setw(16) <<
XCurr(2) << std::endl
2466 <<
" " << std::setw(16) <<
XPrev(3) << std::setw(16) <<
XCurr(3) << std::endl
2467 <<
"v:" << std::setw(16) <<
VPrev(1) << std::setw(16) <<
VCurr(1) << std::endl
2468 <<
" " << std::setw(16) <<
VPrev(2) << std::setw(16) <<
VCurr(2) << std::endl
2469 <<
" " << std::setw(16) <<
VPrev(3) << std::setw(16) <<
VCurr(3) << std::endl
2470 <<
"g:" << std::setw(16) << gPrev(1) << std::setw(16) << 0 << std::endl
2471 <<
" " << std::setw(16) << gPrev(2) << std::setw(16) << 0 << std::endl
2472 <<
" " << std::setw(16) << gPrev(3) << std::setw(16) << 0 << std::endl
2473 <<
"w:" << std::setw(16) << XP(iFirstPos+4) << std::setw(16) <<
WCurr(1) << std::endl
2474 <<
" " << std::setw(16) << XP(iFirstPos+5) << std::setw(16) <<
WCurr(2) << std::endl
2475 <<
" " << std::setw(16) << XP(iFirstPos+6) << std::setw(16) <<
WCurr(3) << std::endl;
2495 bUpdateRotation =
true;
2525 #ifdef MBDYN_X_RELATIVE_PREDICTION
2557 X.
Put(iFirstIndex + 1, XCurr);
2558 XP.
Put(iFirstIndex + 1, VCurr);
2561 std::cout <<
"StructNode(" <<
GetLabel() <<
"): "
2562 "AfterPredict: X=" << XCurr
2581 for (
int r = 1; r <= 3; r++) {
2582 for (
int c = 1;
c <= 3;
c++) {
2583 dmax = std::max(dmax,
fabs(RRT(r,
c)));
2586 silent_cout(
"### StructNode(" <<
GetLabel() <<
") " << dmax << std::endl);
2597 bUpdateRotation =
true;
2666 std::string sDataName(s);
2668 const char *brk = std::strchr(s,
'[' );
2673 size_t len = brk - s;;
2677 idx = strtol(brk, &next, 10);
2678 int save_errno = errno;
2679 if (next == brk || strcmp(next,
"]") != 0) {
2683 if (save_errno == ERANGE) {
2684 silent_cerr(
"StructNode(" <<
GetLabel() <<
"): "
2685 "warning, private data index "
2686 << std::string(brk, next - brk)
2687 <<
" overflows" << std::endl);
2710 if (strncmp(s,
"PE", len) == 0) {
2711 if (idx < 0 || idx > 3) {
2718 if (idx < 1 || idx > 3) {
2722 if (strncmp(s,
"X", len) == 0) {
2726 if (strncmp(s,
"x", len) == 0) {
2730 if (strncmp(s,
"Phi", len) == 0) {
2734 if (strncmp(s,
"XP", len) == 0) {
2738 if (strncmp(s,
"xP", len) == 0) {
2742 if (strncmp(s,
"Omega", len) == 0) {
2746 if (strncmp(s,
"omega", len) == 0) {
2750 if (strncmp(s,
"E", len) == 0
2751 || strncmp(s,
"E123", len) == 0)
2756 if (strncmp(s,
"E313", len) == 0) {
2760 if (strncmp(s,
"E321", len) == 0) {
2766 if (strncmp(s,
"XPP", len) == 0) {
2770 }
else if (strncmp(s,
"xPP", len) == 0) {
2774 }
else if (strncmp(s,
"OmegaP", len) == 0) {
2778 }
else if (strncmp(s,
"omegaP", len) == 0) {
2791 silent_cerr(
"StructNode(" <<
GetLabel() <<
"): "
2792 "request to compute accelerations failed, requested by private data \"" << sDataName <<
"\""
2830 return VCurr(i - 9);
2840 return WCurr(i - 15);
2929 StructDispNode(uL, pDO, X0, V0, pRN, pRBK, dPosStiff, dVelStiff, ood, fOut),
2930 DynamicStructDispNode(uL, pDO, X0, V0, pRN, pRBK, dPosStiff, dVelStiff, ood, fOut),
2931 StructNode(uL, pDO, X0, R0, V0, W0, pRN, pRBK, dPosStiff, dVelStiff, bOmRot, ood, fOut)
2964 if (bInitial ==
false) {
2966 << prefix << iIndex + 7 <<
"->" << iIndex + 9 <<
": "
2967 "momentum [Bx,By,Bz]" << std::endl
2968 << prefix << iIndex + 10 <<
"->" << iIndex + 12 <<
": "
2969 "momenta moment [Gx,Gy,Gz]" << std::endl;
2978 if (bInitial || i == -1 || (i >= 0 && i < 6)) {
2981 if (bInitial || (i >= 0 && i < 6)) {
2993 std::ostringstream os;
2994 os <<
"StructNode(" <<
GetLabel() <<
")";
2997 std::string name = os.str();
2999 for (i = 6; i < 12; i++) {
3001 os.seekp(0, std::ios_base::end);
3007 if (i < 6 || i >= 12) {
3019 if (bInitial ==
false) {
3023 << prefix << iIndex + 1 <<
"->" << iIndex + 3 <<
": "
3024 "momentum definition [Bx,By,Bz]" << std::endl
3025 << prefix << iIndex + 4 <<
"->" << iIndex + 6 <<
": "
3026 "momenta moment definition [Gx,Gy,Gz]" << std::endl;
3037 if (bInitial || i == -1 || (i >= 6 && i < 12)) {
3039 if (!bInitial && i != -1) {
3044 if (bInitial || (i >= 6 && i < 12)) {
3051 for (
int j = 0; j < 6; j++) {
3052 desc[6 + j] = desc[j];
3059 std::ostringstream os;
3060 os <<
"StructNode(" <<
GetLabel() <<
")";
3063 std::string name(os.str());
3065 for (i = 0; i < 6; i++) {
3067 os.seekp(0, std::ios_base::end);
3068 os <<
": " <<
sn_eq[i/3] <<
xyz[i%3];
3073 if (i < 0 || i >= 6) {
3077 os <<
": " <<
sn_eq[i/3] <<
xyz[i%3];
3161 ASSERT(iDof >= 1 && iDof <= 6);
3162 ASSERT(iOrder >= 0 && iOrder <= 2);
3168 silent_cerr(
"DynamicStructNode::dGetDofValue("
3169 << iDof <<
"," << iOrder <<
"): "
3170 "accelerations are not computed while they should"
3183 if (iDof >= 1 && iDof <= 3) {
3198 ASSERT(iDof >= 1 && iDof <= 6);
3199 ASSERT(iOrder == 0 || iOrder == 1);
3205 silent_cerr(
"DynamicStructNode::dGetDofValuePrev("
3206 << iDof <<
"," << iOrder <<
"): "
3207 "accelerations are not computed while they should"
3212 if (iDof >= 1 && iDof <= 3) {
3227 unsigned int iOrder )
3229 ASSERT(iDof >= 1 && iDof <= 6);
3230 ASSERT(iOrder == 0 || iOrder == 1);
3236 silent_cerr(
"DynamicStructNode::SetDofValue("
3237 << dValue <<
"," << iDof <<
"," << iOrder <<
"): "
3238 "accelerations are not computed while they should"
3243 if (iDof >= 1 && iDof <= 3) {
3247 WPCurr(iDof - 3) = dValue;
3275 StructDispNode(uL, pDO, X0, V0, pRN, pRBK, dPosStiff, dVelStiff, ood, fOut),
3276 StaticStructDispNode(uL, pDO, X0, V0, pRN, pRBK, dPosStiff, dVelStiff, ood, fOut),
3277 StructNode(uL, pDO, X0, R0, V0, W0, pRN, pRBK, dPosStiff, dVelStiff, bOmRot,
3316 StructDispNode(uL, pDO, X0, V0, 0, pRBK, dPosStiff, dVelStiff, ood, fOut),
3318 dPosStiff, dVelStiff, bOmRot, ood, fOut)
3353 if (bInitial ==
false) {
3357 << prefix << iIndex + 7 <<
"->" << iIndex + 9 <<
": "
3358 "velocity [vx,vy,vz]" << std::endl
3359 << prefix << iIndex + 10 <<
"->" << iIndex + 12 <<
": "
3360 "angular velocity [wx,wy,wz]" << std::endl;
3369 if (bInitial || i == -1 || (i >= 0 && i < 6)) {
3372 if (bInitial || (i >= 0 && i < 6)) {
3373 for (
size_t ii = 0; ii < desc.size(); ii++) {
3374 desc[ii] =
"Modal" + desc[ii];
3387 std::ostringstream os;
3388 os <<
"ModalStructNode(" <<
GetLabel() <<
")";
3391 std::string name = os.str();
3393 for (i = 0; i < 6; i++) {
3394 desc[i] =
"Modal" + desc[i];
3397 for (i = 6; i < 12; i++) {
3399 os.seekp(0, std::ios_base::end);
3405 if (i < 6 || i >= 12) {
3418 if (bInitial ==
false) {
3422 << prefix << iIndex + 1 <<
"->" << iIndex + 3 <<
": "
3423 "linear velocity definition [vx,vy,vz]" << std::endl
3424 << prefix << iIndex + 4 <<
"->" << iIndex + 6 <<
": "
3425 "angular velocity definition [wx,wy,wz]" << std::endl;
3436 if (bInitial || i == -1 || (i >= 6 && i < 12)) {
3438 if (!bInitial && i != -1) {
3443 if (bInitial || (i >= 6 && i < 12)) {
3444 for (
size_t ii = 0; ii < desc.size(); ii++) {
3445 desc[ii] =
"Modal" + desc[ii];
3453 for (
int j = 0; j < 6; j++) {
3454 desc[6 + j] =
"Modal" + desc[j];
3461 std::ostringstream os;
3462 os <<
"ModalStructNode(" <<
GetLabel() <<
")";
3470 std::string name = os.str();
3472 for (i = 0; i < 6; i++) {
3474 os.seekp(0, std::ios_base::end);
3475 os <<
": " << xeq[i/3] <<
xyz[i%3];
3480 if (i < 0 || i >= 6) {
3484 os <<
": " << xeq[i/3] <<
xyz[i%3];
3522 StructDispNode(uL, pDO, ::
Zero3, ::
Zero3, 0, 0, 0., 0., ood, fOut),
3523 StructNode(uL, pDO, ::
Zero3, ::
Zero3x3, ::
Zero3, ::
Zero3, 0, 0, 0., 0., 0, ood, fOut),
3555 silent_cerr(
"DummyStructNode(" <<
GetLabel() <<
") has no dofs"
3566 silent_cerr(
"DummyStructNode(" <<
GetLabel() <<
") has no dofs"
3576 unsigned int iDof,
unsigned int iOrder)
3578 silent_cerr(
"DummyStructNode(" <<
GetLabel() <<
") has no dofs"
3659 StructDispNode(uL, pDO, ::
Zero3, ::
Zero3, 0, 0, 0., 0., ood, fOut),
3733 StructDispNode(uL, pDO, ::
Zero3, ::
Zero3, 0, 0, 0., 0., ood, fOut),
3858 StructDispNode(uL, pDO, ::
Zero3, ::
Zero3, 0, 0, 0., 0., ood, fOut),
3860 pNodeRef2(pNR2), Rh2(Rh2), fh2(fh2)
3981 unsigned int uLabel)
3983 DEBUGCOUT(
"Entering ReadStructNode(" << uLabel <<
")" << std::endl);
3985 const char* sKeyWords[] = {
3986 "static" "displacement",
3987 "dynamic" "displacement",
4024 silent_cerr(
"StructNode(" << uLabel <<
"): "
4033 std::cout <<
"Static structural displacement node" << std::endl;
4036 std::cout <<
"Dynamic structural displacement node" << std::endl;
4039 std::cout <<
"Static structural node" << std::endl;
4042 std::cout <<
"Dynamic structural node" << std::endl;
4045 std::cout <<
"Dummy structural node" << std::endl;
4048 std::cout <<
"Modal node" << std::endl;
4051 std::cout <<
"Unknown structural node" << std::endl;
4059 if (CurrType == DUMMY) {
4063 switch (DummyType) {
4078 case RELATIVEFRAME: {
4116 pNode, pNodeRef, fh, Rh,
4117 pNodeRef2, fh2, Rh2, od, fOut));
4123 pNode, pNodeRef, fh, Rh, od, fOut));
4128 silent_cerr(
"StructNode(" << uLabel <<
"): "
4129 "unknown dummy node type "
4137 if (CurrType == STATIC_DISP || CurrType == DYNAMIC_DISP) {
4143 pedantic_cerr(
"StructNode(" << uLabel <<
"): "
4144 "missing keyword \"position\" at line "
4148 DEBUGCOUT(
"X0 =" << std::endl << X0 << std::endl);
4154 pedantic_cerr(
"StructNode(" << uLabel <<
"): "
4155 "missing keyword \"orientation\" at line "
4162 DEBUGCOUT(
"R0 =" << std::endl << R0 << std::endl);
4168 pedantic_cerr(
"StructNode(" << uLabel <<
"): "
4169 "missing keyword \"velocity\" at line "
4173 DEBUGCOUT(
"Xprime0 =" << std::endl << XPrime0 << std::endl);
4177 if (!HP.
IsKeyWord(
"angular" "velocity")) {
4178 pedantic_cerr(
"StructNode(" << uLabel <<
"): "
4179 "missing keyword \"angular velocity\" at line "
4183 DEBUGCOUT(
"Omega0 =" << std::endl << Omega0 << std::endl);
4187 if (HP.
IsKeyWord(
"prediction" "node")) {
4196 silent_cerr(
"StructNode(" << uLabel <<
"): "
4197 "prediction node allowed "
4198 "for static and dynamic nodes only, "
4205 #ifndef MBDYN_X_RELATIVE_PREDICTION
4206 silent_cerr(
"warning, relative prediction disabled; "
4207 "absolute prediction will be used" << std::endl);
4221 dPosStiff = HP.
GetReal(dPosStiff);
4222 dVelStiff = HP.
GetReal(dVelStiff);
4224 DEBUGCOUT(
"Initial position stiffness: " << dPosStiff << std::endl);
4225 DEBUGCOUT(
"Initial velocity stiffness: " << dVelStiff << std::endl);
4230 DEBUGCOUT(
"Omega rotates? : " << (bOmRot ?
"yes" :
"no") << std::endl);
4243 bool bGotAccels(
false);
4246 bool bGotInertia(
false);
4247 bool bInertia(
false);
4249 while (HP.
IsArg()) {
4252 silent_cerr(
"StructNode(" << uLabel <<
"): "
4253 "\"accelerations\" already set, "
4270 silent_cout(
"StructNode(" << uLabel <<
"): "
4271 "warning, \"accelerations\" needs \"yes\" or \"no\" "
4276 }
else if (HP.
IsKeyWord(
"output" "inertia")) {
4278 silent_cerr(
"StructNode(" << uLabel <<
"): "
4279 "\"inertia\" already set, "
4287 silent_cerr(
"StructNode(" << uLabel <<
"): "
4288 "\"inertia\" needs \"yes\" or \"no\" "
4326 pedantic_cout(
"DynamicStructNode(" << uLabel <<
") turned into static" << std::endl);
4330 pedantic_cout(
"DynamicStructDispNode(" << uLabel <<
") turned into static" << std::endl);
4331 CurrType = STATIC_DISP;
4336 silent_cerr(
"ReadStructNode(" << uLabel <<
"): semicolon expected "
4350 dPosStiff, dVelStiff,
4361 dPosStiff, dVelStiff,
4375 dPosStiff, dVelStiff,
4386 dPosStiff, dVelStiff,
4399 dPosStiff, dVelStiff,
4411 const char *description =
"structural node: ";
4417 description =
"relative frame structural node: ";
4429 out << description << uLabel
flag fReadOutput(MBDynParser &HP, const T &t) const
static const char * sdn_initial_eq[]
const MatGm1_Manip MatGm1
virtual void DerivativesUpdate(const VectorHandler &X, const VectorHandler &XP)
Mat3x3 GetRotRel(const ReferenceFrame &rf)
scalar_func_type dGetValue(scalar_func_type d)
virtual integer iGetFirstRowIndex(void) const
virtual StructDispNode::Type GetStructDispNodeType(void) const
const Vec3 & GetW(void) const
virtual std::ostream & DescribeEq(std::ostream &out, const char *prefix="", bool bInitial=false) const
StaticStructDispNode(unsigned int uL, const DofOwner *pDO, const Vec3 &X0, const Vec3 &V0, const StructNode *pRN, const RigidBodyKinematics *pRBK, doublereal dPosStiff, doublereal dVelStiff, OrientationDescription od, flag fOut)
virtual std::ostream & DescribeEq(std::ostream &out, const char *prefix="", bool bInitial=false) const
const Vec3 Zero3(0., 0., 0.)
Vec3 Cross(const Vec3 &v) const
virtual const doublereal & dGetDofValue(int iDof, int iOrder=0) const
doublereal dVelocityStiffness
std::ostream & Write(std::ostream &out, const char *sFill=" ") const
virtual StructDispNode::Type GetStructDispNodeType(void) const =0
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 bComputeAccelerations(void) const
virtual ~DynamicStructDispNode(void)
#define MBDYN_EXCEPT_ARGS
virtual bool bComputeAccelerations(void) const
const doublereal & dGetInitialVelocityStiffness(void) const
virtual const Vec3 & GetGPCurr(void) const
virtual StructNode::Type GetStructNodeType(void) const
virtual std::ostream & DescribeDof(std::ostream &out, const char *prefix="", bool bInitial=false) const
virtual std::ostream & DescribeDof(std::ostream &out, const char *prefix="", bool bInitial=false) const
bool UseNetCDF(int out) const
const Vec3 & GetWP(void) const
virtual const Vec3 & GetgCurr(void) const
virtual const Mat3x3 & GetRCurr(void) const
Mat3x3 GetRotAbs(const ReferenceFrame &rf)
virtual void BeforePredict(VectorHandler &X, VectorHandler &XP, VectorHandler &XPrev, VectorHandler &XPPrev) const
virtual Node::Type GetNodeType(void) const
virtual void AfterPredict(VectorHandler &X, VectorHandler &XP)
doublereal Norm(void) const
virtual void InitialUpdate(const VectorHandler &X)
static const char * sdn_initial_dof[]
virtual void SetDofValue(const doublereal &dValue, unsigned int iDof, unsigned int iOrder=0)
const Vec3 & GetX(void) const
std::ostream & Write(std::ostream &out, const FullMatrixHandler &m, const char *s, const char *s2)
virtual bool ComputeAccelerations(bool b)
virtual void SetInitialValue(VectorHandler &X)
virtual void AfterConvergence(const VectorHandler &X, const VectorHandler &XP)
virtual ~DummyStructNode(void)
virtual const Vec3 & GetGCurr(void) const
virtual ~PivotRelFrameDummyStructNode(void)
virtual void SetValue(DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)
virtual void SetInitialValue(VectorHandler &X)
Vec3 GetVelAbs(const ReferenceFrame &rf, const Vec3 &x)
std::ostream & StrNodes(void) const
virtual ~OffsetDummyStructNode(void)
const Mat3x3 Eye3(1., 0., 0., 0., 1., 0., 0., 0., 1.)
virtual ~StructDispNode(void)
virtual const doublereal & dGetDofValuePrev(int iDof, int iOrder=0) const
StaticStructNode(unsigned int uL, const DofOwner *pDO, const Vec3 &X0, const Mat3x3 &R0, const Vec3 &V0, const Vec3 &W0, const StructNode *pRN, const RigidBodyKinematics *pRBK, doublereal dPosStiff, doublereal dVelStiff, bool bOmRot, OrientationDescription ood, flag fOut)
virtual void SetValue(DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)
virtual const doublereal & dGetDofValue(int iDof, int iOrder=0) const
virtual const doublereal & dGetDofValuePrev(int iDof, int iOrder=0) const
virtual void SetDofValue(const doublereal &dValue, unsigned int iDof, unsigned int iOrder=0)
virtual bool ComputeAccelerations(bool b)
virtual void AfterPredict(VectorHandler &X, VectorHandler &XP)
virtual unsigned int iGetPrivDataIdx(const char *s) const
OrientationDescription ReadOptionalOrientationDescription(DataManager *pDM, MBDynParser &HP)
virtual const doublereal & dGetDofValuePrev(int iDof, int iOrder=0) const
const Vec3 & GetXPP(void) const
virtual StructDispNode::Type GetStructDispNodeType(void) const
std::vector< Hint * > Hints
virtual std::ostream & DescribeDof(std::ostream &out, const char *prefix="", bool bInitial=false) const
const Vec3 & GetWP(void) const
DynamicStructNode(unsigned int uL, const DofOwner *pDO, const Vec3 &X0, const Mat3x3 &R0, const Vec3 &V0, const Vec3 &W0, const StructNode *pRN, const RigidBodyKinematics *pRBK, doublereal dPosStiff, doublereal dVelStiff, bool bOmRot, OrientationDescription ood, flag fOut)
bool bIsStaticModel(void) const
virtual void AfterPredict(VectorHandler &X, VectorHandler &XP)
virtual void AfterConvergence(const VectorHandler &X, const VectorHandler &XP)
virtual void SetDofValue(const doublereal &dValue, unsigned int iDof, unsigned int iOrder=0)
GradientExpression< UnaryExpr< FuncFabs, Expr > > fabs(const GradientExpression< Expr > &u)
virtual void AddInertia(const doublereal &dm)
Vec3 GetVec(unsigned short int i) const
virtual ~DynamicStructNode(void)
virtual void SetDofValue(const doublereal &dValue, unsigned int iDof, unsigned int iOrder=0)
static const char * sdn_dof[]
virtual DofOrder::Order GetDofType(unsigned int) const
Vec3 VecRot(const Mat3x3 &Phi)
virtual bool GetYesNoOrBool(bool bDefval=false)
virtual void Output(OutputHandler &OH) const
virtual void AfterConvergence(const VectorHandler &X, const VectorHandler &XP)
const RigidBodyKinematics * pRefRBK
virtual ~StaticStructNode(void)
Vec3 MulTV(const Vec3 &v) const
virtual void BeforePredict(VectorHandler &X, VectorHandler &XP, VectorHandler &XPrev, VectorHandler &XPPrev) const
void func(const T &u, const T &v, const T &w, doublereal e, T &f)
virtual void ComputeAccelerations(Vec3 &XPP) const
virtual bool bComputeAccelerations(void) const
const Mat3x3 Zero3x3(0., 0., 0., 0., 0., 0., 0., 0., 0.)
virtual const DofOwner * pGetDofOwner(void) const
virtual StructNode::Type GetStructNodeType(void) const
doublereal dReadScale(MBDynParser &HP, enum DofOwner::Type t) const
virtual const Vec3 & GetBCurr(void) const
void SetScale(const doublereal &d)
virtual const Vec3 & GetGCurr(void) 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)
doublereal dGetScale(void) const
virtual StructNode::Type GetStructNodeType(void) const =0
Vec3 MatR2EulerAngles313(const Mat3x3 &R)
virtual void DerivativesUpdate(const VectorHandler &X, const VectorHandler &XP)
virtual const Vec3 & GetBPCurr(void) const
void IncElemCount(Elem::Type type)
const StructNode * pRefNode
static const char * sn_initial_eq[]
static const char * sdn_eq[]
const StructNode * pNodeRef2
virtual void InitialUpdate(const VectorHandler &X)
Vec3 GetPosRel(const ReferenceFrame &rf)
virtual void BeforePredict(VectorHandler &X, VectorHandler &XP, VectorHandler &XPrev, VectorHandler &XPPrev) const
virtual void SetValue(DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)
static const char * sn_modal_eq[]
virtual bool bOutputAccelerations(void) const
virtual bool IsKeyWord(const char *sKeyWord)
virtual const Mat3x3 & GetRPrev(void) const
PivotRelFrameDummyStructNode(unsigned int uL, const DofOwner *pDO, const StructNode *pNode, const StructNode *pNodeRef, const Vec3 &fh, const Mat3x3 &Rh, const StructNode *pNodeRef2, const Vec3 &fh2, const Mat3x3 &Rh2, OrientationDescription ood, flag fOut)
virtual std::ostream & Restart(std::ostream &out) const
static const char * sn_dof[]
OrientationDescription od
virtual void Update(void)
Vec3 GetOmeAbs(const ReferenceFrame &rf)
long GetCurrentStep(void) const
virtual void BeforePredict(VectorHandler &X, VectorHandler &XP, VectorHandler &XPrev, VectorHandler &XPPrev) const
DummyStructNode(unsigned int uL, const DofOwner *pDO, const StructNode *pNode, OrientationDescription ood, flag fOut)
virtual const Vec3 & GetBCurr(void) const
AutomaticStructDispElem * pAutoStr
void SetValuePreserve(scalar_func_type dVal)
bool bDoesOmegaRotate(void) const
Vec3 GetPosAbs(const ReferenceFrame &rf)
Vec3 MatR2EulerAngles123(const Mat3x3 &R)
const Mat3x3 & GetR(void) const
virtual ~RelFrameDummyStructNode(void)
const StructNode * pNodeRef
const Vec3 & GetV(void) const
virtual StructNode::Type GetStructNodeType(void) const
virtual integer iGetFirstMomentumIndex(void) const =0
virtual const Vec3 & GetWCurr(void) const
virtual std::ostream & DescribeEq(std::ostream &out, const char *prefix="", bool bInitial=false) const
virtual void DerivativesUpdate(const VectorHandler &X, const VectorHandler &XP)
DotTraits< VectorExprLhs, VectorExprRhs, N_rows, N_rows >::ExpressionType Dot(const VectorExpression< VectorExprLhs, N_rows > &u, const VectorExpression< VectorExprRhs, N_rows > &v)
virtual const Vec3 & GetWPCurr(void) const
bool IsOpen(int out) const
virtual void AfterConvergence(const VectorHandler &X, const VectorHandler &XP, const VectorHandler &XPP)
virtual StructDispNode::Type GetStructDispNodeType(void) const
#define ASSERT(expression)
OffsetDummyStructNode(unsigned int uL, const DofOwner *pDO, const StructNode *pNode, const Vec3 &f, const Mat3x3 &R, OrientationDescription ood, flag fOut)
const RigidBodyKinematics * pGetRBK(void) const
Mat3x3 MulTM(const Mat3x3 &m) const
virtual doublereal dGetPrivData(unsigned int i) const
static const char * sn_initial_dof[]
virtual void AfterConvergence(const VectorHandler &X, const VectorHandler &XP, const VectorHandler &XPP)
doublereal dPositionStiffness
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
virtual const Vec3 & GetXCurr(void) const
virtual unsigned int iGetPrivDataIdx(const char *s) const
void DerivativeResizeReset(LocalDofMap *pMap, index_type iStartGlobal, index_type iEndGlobal, MapVectorBase::GlobalScope s, scalar_deriv_type dVal)
virtual void InitialUpdate(const VectorHandler &X)
virtual ~StructNode(void)
virtual DummyStructNode::Type GetDummyType(void) const
virtual bool ComputeAccelerations(bool b)
virtual void OutputPrepare(OutputHandler &OH)
virtual const Vec3 & GetBPCurr(void) const
static std::stack< cleanup * > c
virtual unsigned int iGetNumDof(void) const =0
const Vec3 & GetXPP(void) const
virtual bool ComputeAccelerations(bool b)
virtual const Vec3 & GetGPCurr(void) const
const doublereal * pGetMat(void) const
virtual void Put(integer iRow, const Vec3 &v)
virtual const doublereal & dGetDofValue(int iDof, int iOrder=0) const
const RigidBodyKinematics * pGetRBK(void) const
virtual bool ComputeAccelerations(bool b)
static const char * sn_eq[]
virtual void SetDofValue(const doublereal &dValue, unsigned int iDof, unsigned int iOrder=0)
virtual doublereal dGetPrivData(unsigned int i) const
virtual ~StaticStructDispNode(void)
virtual const doublereal & dGetDofValuePrev(int iDof, int iOrder=0) const
virtual void OutputPrepare(OutputHandler &OH)
virtual unsigned int iGetNumPrivData(void) const
const doublereal & dGetInitialPositionStiffness(void) const
virtual int GetWord(void)
Node * ReadStructNode(DataManager *pDM, MBDynParser &HP, DofOwner *pDO, unsigned int uLabel)
const doublereal * pGetVec(void) const
std::ostream & GetLogFile(void) const
virtual integer iGetFirstRowIndex(void) const
virtual void BeforePredict(VectorHandler &X, VectorHandler &XP, VectorHandler &XPrev, VectorHandler &XPPrev) const
Vec3 MatR2EulerAngles321(const Mat3x3 &R)
virtual const Vec3 & GetgPCurr(void) const
DynamicStructDispNode(unsigned int uL, const DofOwner *pDO, const Vec3 &X0, const Vec3 &V0, const StructNode *pRN, const RigidBodyKinematics *pRBK, doublereal dPosStiff, doublereal dVelStiff, OrientationDescription od, flag fOut)
virtual const doublereal & dGetDofValuePrev(int iDof, int iOrder=0) const
virtual const Vec3 & GetVCurr(void) const
virtual integer iGetFirstRowIndex(void) const
virtual std::ostream & DescribeEq(std::ostream &out, const char *prefix="", bool bInitial=false) const
virtual void SetInitialValue(VectorHandler &X)
ModalNode(unsigned int uL, const DofOwner *pDO, const Vec3 &X0, const Mat3x3 &R0, const Vec3 &V0, const Vec3 &W0, const RigidBodyKinematics *pRBK, doublereal dPosStiff, doublereal dVelStiff, bool bOmRot, OrientationDescription ood, flag fOut)
StructNode(unsigned int uL, const DofOwner *pDO, const Vec3 &X0, const Mat3x3 &R0, const Vec3 &V0, const Vec3 &W0, const StructNode *pRN, const RigidBodyKinematics *pRBK, doublereal dPosStiff, doublereal dVelStiff, bool bOmRot, OrientationDescription ood, flag fOut)
virtual DummyStructNode::Type GetDummyType(void) const
Mat3x3 MulMT(const Mat3x3 &m) const
virtual const Vec3 & GetXPPCurr(void) const
StructDispNode(unsigned int uL, const DofOwner *pDO, const Vec3 &X0, const Vec3 &V0, const StructNode *pRN, const RigidBodyKinematics *pRBK, doublereal dPosStiff, doublereal dVelStiff, OrientationDescription od, flag fOut)
virtual const doublereal & dGetDofValue(int iDof, int iOrder=0) const
virtual const doublereal & dGetDofValue(int iDof, int iOrder=0) const
virtual void SetOutputFlag(flag f=flag(1))
virtual integer iGetFirstIndex(void) const
const Vec3 & GetW(void) const
virtual integer iGetFirstMomentumIndex(void) const
virtual std::ostream & Restart(std::ostream &out) const
const Vec3 & GetWP(void) const
virtual std::ostream & DescribeDof(std::ostream &out, const char *prefix="", bool bInitial=false) const
virtual void AddInertia(const doublereal &dm) const
virtual HighParser::ErrOut GetLineData(void) const
std::ostream & Write(std::ostream &out, const char *sFill=" ", const char *sFill2=NULL) const
void MatR2EulerParams(const Mat3x3 &R, doublereal &e0, Vec3 &e)
virtual StructNode::Type GetStructNodeType(void) const
unsigned int GetLabel(void) const
#define GRADIENT_ASSERT(expr)
virtual void SetOutputFlag(flag f=flag(1))
virtual unsigned int iGetNumPrivData(void) const
Node * ReadNode(MBDynParser &HP, Node::Type type) const
RelFrameDummyStructNode(unsigned int uL, const DofOwner *pDO, const StructNode *pNode, const StructNode *pNodeRef, const Vec3 &fh, const Mat3x3 &Rh, OrientationDescription ood, flag fOut)
const Mat3x3 & GetR(void) const
virtual DummyStructNode::Type GetDummyType(void) const
virtual bool bComputeAccelerations(void) const
virtual std::ostream & DescribeEq(std::ostream &out, const char *prefix="", bool bInitial=false) const
virtual std::ostream & DescribeDof(std::ostream &out, const char *prefix="", bool bInitial=false) const
bool UseText(int out) const
virtual void AddInertia(const doublereal &dm, const Vec3 &dS, const Mat3x3 &dJ) const
bool bOutputAccelerations(void) const
virtual integer iGetFirstMomentumIndex(void) const
virtual doublereal GetReal(const doublereal &dDefval=0.0)