|
| StructExtForce (unsigned int uL, DataManager *pDM, const StructNode *pRefNode, bool bUseReferenceNodeForces, bool bRotateReferenceNodeForces, std::vector< unsigned > &Labels, std::vector< const StructNode * > &Nodes, std::vector< Vec3 > &Offsets, bool bSorted, bool bLabels, bool bOutputAccelerations, unsigned bRot, ExtFileHandlerBase *pEFH, bool bSendAfterPredict, int iCoupling, unsigned uOutputFlags, flag fOut) |
|
virtual | ~StructExtForce (void) |
|
virtual Force::Type | GetForceType (void) const |
|
void | WorkSpaceDim (integer *piNumRows, integer *piNumCols) const |
|
SubVectorHandler & | AssRes (SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr) |
|
virtual void | Output (OutputHandler &OH) const |
|
virtual void | GetConnectedNodes (std::vector< const Node * > &connectedNodes) const |
|
| Elem (unsigned int uL, flag fOut) |
|
virtual | ~Elem (void) |
|
virtual unsigned int | iGetNumDof (void) const |
|
virtual std::ostream & | DescribeDof (std::ostream &out, const char *prefix="", bool bInitial=false) const |
|
virtual void | DescribeDof (std::vector< std::string > &desc, bool bInitial=false, int i=-1) const |
|
virtual std::ostream & | DescribeEq (std::ostream &out, const char *prefix="", bool bInitial=false) const |
|
virtual void | DescribeEq (std::vector< std::string > &desc, bool bInitial=false, int i=-1) const |
|
virtual DofOrder::Order | GetDofType (unsigned int) const |
|
virtual void | AssMats (VariableSubMatrixHandler &WorkMatA, VariableSubMatrixHandler &WorkMatB, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr) |
|
virtual bool | bInverseDynamics (void) const |
|
void | SetInverseDynamicsFlags (unsigned uIDF) |
|
unsigned | GetInverseDynamicsFlags (void) const |
|
bool | bIsErgonomy (void) const |
|
bool | bIsRightHandSide (void) const |
|
virtual VariableSubMatrixHandler & | AssJac (VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr) |
|
virtual SubVectorHandler & | AssRes (SubVectorHandler &WorkVec, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr, const VectorHandler &XPrimePrimeCurr, InverseDynamics::Order iOrder=InverseDynamics::INVERSE_DYNAMICS) |
|
virtual int | GetNumConnectedNodes (void) const |
|
| WithLabel (unsigned int uL=0, const std::string &sN="") |
|
virtual | ~WithLabel (void) |
|
void | PutLabel (unsigned int uL) |
|
void | PutName (const std::string &sN) |
|
unsigned int | GetLabel (void) const |
|
const std::string & | GetName (void) const |
|
| SimulationEntity (void) |
|
virtual | ~SimulationEntity (void) |
|
virtual bool | bIsValidIndex (unsigned int i) const |
|
virtual DofOrder::Order | GetEqType (unsigned int i) const |
|
virtual Hint * | ParseHint (DataManager *pDM, const char *s) const |
|
virtual void | BeforePredict (VectorHandler &, VectorHandler &, VectorHandler &, VectorHandler &) const |
|
virtual void | DerivativesUpdate (const VectorHandler &XCurr, const VectorHandler &XPrimeCurr) |
|
virtual void | Update (const VectorHandler &XCurr, InverseDynamics::Order iOrder) |
|
virtual void | AfterConvergence (const VectorHandler &X, const VectorHandler &XP, const VectorHandler &XPP) |
|
virtual unsigned int | iGetNumPrivData (void) const |
|
virtual unsigned int | iGetPrivDataIdx (const char *s) const |
|
virtual doublereal | dGetPrivData (unsigned int i) const |
|
virtual std::ostream & | OutputAppend (std::ostream &out) const |
|
virtual void | ReadInitialState (MBDynParser &HP) |
|
| ToBeOutput (flag fOut=fDefaultOut) |
|
virtual | ~ToBeOutput (void) |
|
virtual void | OutputPrepare (OutputHandler &OH) |
|
virtual void | Output (OutputHandler &OH, const VectorHandler &X, const VectorHandler &XP) const |
|
virtual flag | fToBeOutput (void) const |
|
virtual bool | bToBeOutput (void) const |
|
virtual void | SetOutputFlag (flag f=flag(1)) |
|
| ExtForce (unsigned int uL, DataManager *pDM, ExtFileHandlerBase *pEFH, bool bSendAfterPredict, int iCoupling, flag fOut) |
|
virtual | ~ExtForce (void) |
|
virtual void | SetValue (DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *h=0) |
|
virtual void | Update (const VectorHandler &XCurr, const VectorHandler &XPrimeCurr) |
|
virtual void | AfterConvergence (const VectorHandler &X, const VectorHandler &XP) |
|
virtual void | AfterPredict (VectorHandler &X, VectorHandler &XP) |
|
virtual void | InitialWorkSpaceDim (integer *piNumRows, integer *piNumCols) const |
|
virtual VariableSubMatrixHandler & | InitialAssJac (VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr) |
|
virtual SubVectorHandler & | InitialAssRes (SubVectorHandler &WorkVec, const VectorHandler &XCurr) |
|
| Force (unsigned int uL, flag fOut) |
|
virtual | ~Force (void) |
|
virtual Elem::Type | GetElemType (void) const |
|
virtual VariableSubMatrixHandler & | AssJac (VariableSubMatrixHandler &WorkMat, doublereal, const VectorHandler &, const VectorHandler &) |
|
virtual std::ostream & | Restart (std::ostream &out) const |
|
virtual unsigned int | iGetInitialNumDof (void) const |
|
| InitialAssemblyElem (unsigned int uL, flag fOut) |
|
virtual | ~InitialAssemblyElem (void) |
|
| SubjectToInitialAssembly (void) |
|
virtual | ~SubjectToInitialAssembly (void) |
|
Definition at line 44 of file strext.h.
StructExtForce::StructExtForce |
( |
unsigned int |
uL, |
|
|
DataManager * |
pDM, |
|
|
const StructNode * |
pRefNode, |
|
|
bool |
bUseReferenceNodeForces, |
|
|
bool |
bRotateReferenceNodeForces, |
|
|
std::vector< unsigned > & |
Labels, |
|
|
std::vector< const StructNode * > & |
Nodes, |
|
|
std::vector< Vec3 > & |
Offsets, |
|
|
bool |
bSorted, |
|
|
bool |
bLabels, |
|
|
bool |
bOutputAccelerations, |
|
|
unsigned |
bRot, |
|
|
ExtFileHandlerBase * |
pEFH, |
|
|
bool |
bSendAfterPredict, |
|
|
int |
iCoupling, |
|
|
unsigned |
uOutputFlags, |
|
|
flag |
fOut |
|
) |
| |
Definition at line 47 of file strext.cc.
References ASSERT, done, dynamics_size, WithLabel::GetLabel(), ExtFileHandlerBase::GetOutStream(), iobuf, iobuf_euler_123, iobuf_f, iobuf_labels, iobuf_m, iobuf_omega, iobuf_omegap, iobuf_R, iobuf_theta, iobuf_x, iobuf_xp, iobuf_xpp, m_Points, MBC_ROT_EULER_123, MBC_ROT_MAT, MBC_ROT_NONE, MBC_ROT_THETA, MBDYN_EXCEPT_ARGS, and Zero3.
102 silent_cerr(
"StructExtForce(" <<
GetLabel() <<
"): "
103 "unknown rotation format " <<
uRot
108 for (
unsigned i = 0; i <
nodes.size(); i++) {
126 for (
unsigned i = 0; i <
m_Points.size(); i++) {
129 silent_cerr(
"StructExtForce"
131 "point #" << i <<
" StructNode(" <<
m_Points[i].pNode->GetLabel() <<
") "
141 unsigned node_kinematics_size = 0;
142 unsigned labels_size = 0;
146 node_kinematics_size = 3 + 3;
153 node_kinematics_size += 9 + 3;
158 node_kinematics_size += 3 + 3;
166 node_kinematics_size += 3;
168 node_kinematics_size += 3;
185 iobuf.resize(node_kinematics_size*
m_Points.size() + labels_size);
188 char *ptr = &
iobuf[0];
const Vec3 Zero3(0., 0., 0.)
#define MBDYN_EXCEPT_ARGS
std::vector< char > iobuf
doublereal * iobuf_euler_123
ExtForce(unsigned int uL, DataManager *pDM, ExtFileHandlerBase *pEFH, bool bSendAfterPredict, int iCoupling, flag fOut)
bool bOutputAccelerations
std::vector< PointData > m_Points
bool bUseReferenceNodeForces
#define ASSERT(expression)
virtual std::ostream * GetOutStream(void)
doublereal * iobuf_omegap
Elem(unsigned int uL, flag fOut)
bool bRotateReferenceNodeForces
unsigned int GetLabel(void) const
const StructNode * pRefNode
Implements Elem.
Definition at line 1126 of file strext.cc.
References VectorHandler::Add(), bRotateReferenceNodeForces, ToBeOutput::bToBeOutput(), bUseReferenceNodeForces, ExtForce::COUPLING_NONE, grad::Cross(), StructExtForce::PointData::F, F0, F1, F2, StructNode::GetRCurr(), StructDispNode::GetXCurr(), ExtForce::iCoupling, StructDispNode::iGetFirstMomentumIndex(), StructExtForce::PointData::M, M0, M1, M2, m_Points, MBC_ROT_NONE, StructExtForce::PointData::Offset, StructExtForce::PointData::pNode, pRefNode, SubVectorHandler::PutRowIndex(), ExtForce::Recv(), VectorHandler::Resize(), VectorHandler::ResizeReset(), uRot, and Zero3.
1175 for (
unsigned i = 0; i <
m_Points.size(); i++) {
1176 const PointData& point =
m_Points[i];
1178 integer iFirstIndex = point.pNode->iGetFirstMomentumIndex();
1179 for (
int r = 1; r <= iOffset; r++) {
1180 WorkVec.
PutRowIndex(i*iOffset + r, iFirstIndex + r);
1183 Vec3 f(RRef*point.F);
1184 WorkVec.
Add(i*iOffset + 1, f);
1188 m = RRef*point.M + (point.pNode->GetRCurr()*point.Offset).
Cross(f);
1189 WorkVec.
Add(i*iOffset + 4, m);
1195 M2 += m + (point.pNode->GetXCurr() - xRef).
Cross(f);
1203 for (
int r = 1; r <= iOffset; r++) {
1204 WorkVec.
PutRowIndex(i*iOffset + r, iFirstIndex + r);
1210 WorkVec.
Add(i*iOffset + 1,
F1);
1212 WorkVec.
Add(i*iOffset + 4,
M1);
1219 for (
unsigned i = 0; i <
m_Points.size(); i++) {
1220 const PointData& point =
m_Points[i];
1222 integer iFirstIndex = point.pNode->iGetFirstMomentumIndex();
1223 for (
int r = 1; r <= iOffset; r++) {
1224 WorkVec.
PutRowIndex(i*iOffset + r, iFirstIndex + r);
1227 WorkVec.
Add(i*iOffset + 1, point.F);
1229 WorkVec.
Add(i*iOffset + 4, point.M + (point.pNode->GetRCurr()*point.Offset).
Cross(point.F));
const Vec3 Zero3(0., 0., 0.)
virtual bool bToBeOutput(void) const
virtual void ResizeReset(integer)
virtual const Mat3x3 & GetRCurr(void) const
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
std::vector< PointData > m_Points
bool bUseReferenceNodeForces
virtual integer iGetFirstMomentumIndex(void) const =0
VectorExpression< VectorCrossExpr< VectorLhsExpr, VectorRhsExpr >, 3 > Cross(const VectorExpression< VectorLhsExpr, 3 > &u, const VectorExpression< VectorRhsExpr, 3 > &v)
virtual const Vec3 & GetXCurr(void) const
virtual void Add(integer iRow, const Vec3 &v)
bool bRotateReferenceNodeForces
const StructNode * pRefNode
virtual void Resize(integer iNewSize)=0
Reimplemented from ToBeOutput.
Definition at line 1238 of file strext.cc.
References ToBeOutput::bToBeOutput(), Vec3::Cross(), dRaDegr, F0, F1, F2, OutputHandler::FORCES, OutputHandler::Forces(), WithLabel::GetLabel(), StructNode::GetRCurr(), StructDispNode::GetVCurr(), StructNode::GetWCurr(), StructDispNode::GetXCurr(), M0, M1, M2, m_Points, MatR2EulerAngles123(), MBC_ROT_EULER_123, MBC_ROT_MAT, MBC_ROT_NONE, MBC_ROT_THETA, Mat3x3::MulTM(), Mat3x3::MulTV(), ExtFileHandlerBase::OUTPUT_DYN, ExtFileHandlerBase::OUTPUT_KIN, ExtFileHandlerBase::OUTPUT_REF_DYN, pRefNode, R, uOutputFlags, uRot, OutputHandler::UseText(), and RotManip::VecRot().
1242 std::ostream& out = OH.
Forces();
1256 for (std::vector<PointData>::const_iterator point =
m_Points.begin(); point !=
m_Points.end(); ++point) {
1257 out <<
GetLabel() <<
"@" << point->uLabel
1273 for (std::vector<PointData>::const_iterator point =
m_Points.begin(); point !=
m_Points.end(); ++point) {
1274 Vec3 f(point->pNode->GetRCurr()*point->Offset);
1275 Vec3 x(point->pNode->GetXCurr() + f);
1278 Vec3 v(point->pNode->GetVCurr() + point->pNode->GetWCurr().Cross(f));
1280 const Vec3& w(point->pNode->GetWCurr());
1282 out <<
GetLabel() <<
"." << point->uLabel
1283 <<
" " << RRef.
MulTV(Dx);
1300 out <<
" " << RRef.
MulTV(Dv)
1301 <<
" " << RRef.
MulTV(w - wRef)
1306 for (std::vector<PointData>::const_iterator point =
m_Points.begin(); point !=
m_Points.end(); ++point) {
1307 const Mat3x3&
R = point->pNode->GetRCurr();
1308 Vec3 f = R*point->Offset;
1309 Vec3 x = point->pNode->GetXCurr() + f;
1310 const Vec3& w = point->pNode->GetWCurr();
1312 Vec3 v = point->pNode->GetVCurr() + wCrossf;
1314 out <<
GetLabel() <<
"." << point->uLabel
Vec3 Cross(const Vec3 &v) const
virtual bool bToBeOutput(void) const
virtual const Mat3x3 & GetRCurr(void) const
Vec3 VecRot(const Mat3x3 &Phi)
Vec3 MulTV(const Vec3 &v) const
std::vector< PointData > m_Points
Vec3 MatR2EulerAngles123(const Mat3x3 &R)
virtual const Vec3 & GetWCurr(void) const
Mat3x3 MulTM(const Mat3x3 &m) const
virtual const Vec3 & GetXCurr(void) const
virtual const Vec3 & GetVCurr(void) const
unsigned int GetLabel(void) const
const StructNode * pRefNode
std::ostream & Forces(void) const
bool UseText(int out) const
Implements ExtForce.
Definition at line 266 of file strext.cc.
References bLabels, bOutputAccelerations, buf, ExtFileHandlerBase::GetInFileDes(), ExtFileHandlerBase::GetInStream(), WithLabel::GetLabel(), ExtFileHandlerBase::GetOutFileDes(), ExtFileHandlerBase::GetOutStream(), ExtFileHandlerBase::GetRecvFlags(), ExtFileHandlerBase::GetSendFlags(), m_Points, MBC_ACCELS, MBC_LABELS, MBC_MODAL_NODAL_MASK, MBC_NODAL, MBC_REF_NODE, MBC_ROT_MASK, MBDYN_EXCEPT_ARGS, ExtFileHandlerBase::NEGOTIATE_CLIENT, ExtFileHandlerBase::NEGOTIATE_NO, ExtFileHandlerBase::NEGOTIATE_SERVER, ExtFileHandlerBase::NegotiateRequest(), pRefNode, and uRot.
280 char buf[
sizeof(uint32_t) +
sizeof(uint32_t)];
281 uint32_t *uint32_ptr;
283 uint32_ptr = (uint32_t *)&buf[0];
300 (
const void *)buf,
sizeof(buf),
303 int save_errno = errno;
304 char *err_msg = strerror(save_errno);
305 silent_cerr(
"StructExtForce(" <<
GetLabel() <<
"): "
306 "negotiation request send() failed "
307 "(" << save_errno <<
": " << err_msg <<
")"
311 }
else if (rc !=
sizeof(buf)) {
312 silent_cerr(
"StructExtForce(" <<
GetLabel() <<
"): "
313 "negotiation request send() failed "
314 "(sent " << rc <<
" of " <<
sizeof(buf) <<
" bytes)"
336 char buf[
sizeof(uint32_t) +
sizeof(uint32_t)];
337 uint32_t *uint32_ptr;
340 (
void *)buf,
sizeof(buf),
343 int save_errno = errno;
344 char *err_msg = strerror(save_errno);
345 silent_cerr(
"StructExtForce(" <<
GetLabel() <<
"): "
346 "negotiation response recv() failed "
347 "(" << save_errno <<
": " << err_msg <<
")"
351 }
else if (rc !=
sizeof(buf)) {
352 silent_cerr(
"StructExtForce(" <<
GetLabel() <<
"): "
353 "negotiation response recv() failed "
354 "(got " << rc <<
" of " <<
sizeof(buf) <<
" bytes)"
359 uint32_ptr = (uint32_t *)&buf[0];
371 silent_cerr(
"StructExtForce(" <<
GetLabel() <<
"): "
372 "negotiation response failed: expecting MBC_NODAL "
379 silent_cerr(
"StructExtForce(" <<
GetLabel() <<
"): "
380 "negotiation response failed: reference node configuration mismatch "
381 "(local=" << (
pRefNode != 0 ?
"yes" :
"no") <<
", remote=" << (bRef ?
"yes" :
"no") <<
")"
387 silent_cerr(
"StructExtForce(" <<
GetLabel() <<
"): "
388 "negotiation response failed: orientation output mismatch "
389 "(local=" <<
uRot <<
", remote=" << uR <<
")"
395 silent_cerr(
"StructExtForce(" <<
GetLabel() <<
"): "
396 "negotiation response failed: labels output mismatch "
397 "(local=" << (
bLabels ?
"yes" :
"no") <<
", remote=" << (bL ?
"yes" :
"no") <<
")"
403 silent_cerr(
"StructExtForce(" <<
GetLabel() <<
"): "
404 "negotiation response failed: acceleration output mismatch "
411 silent_cerr(
"StructExtForce(" <<
GetLabel() <<
"): "
412 "negotiation response failed: node number mismatch "
413 "(local=" <<
m_Points.size() <<
", remote=" << uN <<
")"
virtual std::istream * GetInStream(void)
#define MBDYN_EXCEPT_ARGS
virtual int GetInFileDes(void)
virtual int GetOutFileDes(void)
virtual Negotiate NegotiateRequest(void) const
bool bOutputAccelerations
std::vector< PointData > m_Points
virtual int GetRecvFlags(void) const
virtual std::ostream * GetOutStream(void)
virtual int GetSendFlags(void) const
static doublereal buf[BUFSIZE]
unsigned int GetLabel(void) const
const StructNode * pRefNode
void StructExtForce::RecvFromFileDes |
( |
int |
infd | ) |
|
|
protectedvirtual |
Reimplemented in StructExtEDGEForce.
Definition at line 961 of file strext.cc.
References ASSERT, bLabels, bSorted, buf, done, dynamics_size, StructExtForce::PointData::F, F0, WithLabel::GetLabel(), iobuf, iobuf_f, iobuf_labels, iobuf_m, StructExtForce::PointData::M, M0, m_Points, MBC_ROT_NONE, MBDYN_EXCEPT_ARGS, StructExtForce::PointData::pNode, pRefNode, WithLabel::uLabel, and uRot.
Referenced by Recv().
972 ulen = 2*
sizeof(uint32_t);
982 len = recv(infd, (
void *)buf, ulen, 0);
984 int save_errno = errno;
985 char *err_msg = strerror(save_errno);
986 silent_cerr(
"StructExtForce(" <<
GetLabel() <<
"): "
987 "recv() failed (" << save_errno <<
": "
988 << err_msg <<
")" << std::endl);
991 }
else if (
unsigned(len) != ulen) {
992 silent_cerr(
"StructExtForce(" <<
GetLabel() <<
"): "
993 "recv() failed (got " << len <<
" of "
994 << ulen <<
" bytes)" << std::endl);
999 uint32_t *uint32_ptr = (uint32_t *)buf;
1000 unsigned l = uint32_ptr[0];
1002 silent_cerr(
"StructExtForce(" <<
GetLabel() <<
"): "
1003 "invalid reference node label "
1022 int save_errno = errno;
1023 char *err_msg = strerror(save_errno);
1024 silent_cerr(
"StructExtForce(" <<
GetLabel() <<
"): "
1025 "recv() failed (" << save_errno <<
": "
1026 << err_msg <<
")" << std::endl);
1030 silent_cerr(
"StructExtForce(" <<
GetLabel() <<
"): "
1031 "recv() failed " "(got " << len <<
" of "
1040 fill(
done.begin(),
done.end(),
false);
1043 for (cnt = 0; cnt <
m_Points.size(); cnt++) {
1047 std::vector<PointData>::const_iterator p;
1049 if (p->uLabel == l) {
1055 silent_cerr(
"StructExtForce"
1057 "unknown label " << l
1058 <<
" as " << cnt <<
"-th node"
1066 silent_cerr(
"StructExtForce"
1068 "label " << l <<
" already done"
1082 silent_cerr(
"StructExtForce(" <<
GetLabel() <<
"): "
1083 "invalid node number " << cnt
1086 for (
unsigned i = 0; i <
m_Points.size(); i++) {
1088 silent_cerr(
"StructExtForce"
1091 <<
" not done" << std::endl);
1100 for (
unsigned i = 0; i <
m_Points.size(); i++) {
1105 if (point.pNode->GetLabel() != l) {
1106 silent_cerr(
"StructExtForce"
1108 "invalid " << i <<
"-th label " << l
1120 #else // ! USE_SOCKET
1122 #endif // ! USE_SOCKET
#define MBDYN_EXCEPT_ARGS
std::vector< char > iobuf
std::vector< PointData > m_Points
#define ASSERT(expression)
static doublereal buf[BUFSIZE]
unsigned int GetLabel(void) const
const StructNode * pRefNode
void StructExtForce::RecvFromStream |
( |
std::istream & |
inf | ) |
|
|
protectedvirtual |
Reimplemented in StructExtEDGEForce.
Definition at line 833 of file strext.cc.
References ASSERT, bLabels, bSorted, done, StructExtForce::PointData::F, F0, WithLabel::GetLabel(), StructExtForce::PointData::M, M0, m_Points, MBC_ROT_NONE, MBDYN_EXCEPT_ARGS, Vec3::pGetVec(), StructExtForce::PointData::pNode, pRefNode, WithLabel::uLabel, and uRot.
Referenced by Recv().
844 inf >> f[0] >> f[1] >> f[2];
846 inf >> m[0] >> m[1] >> m[2];
854 fill(
done.begin(),
done.end(),
false);
857 for (cnt = 0; inf; cnt++) {
863 >> f[0] >> f[1] >> f[2];
865 inf >> m[0] >> m[1] >> m[2];
872 for (i = 0; i <
m_Points.size(); i++) {
879 silent_cerr(
"StructExtForce"
881 "unknown label " << l
882 <<
" as " << cnt <<
"-th node"
888 silent_cerr(
"StructExtForce"
890 "label " << l <<
" already done"
904 silent_cerr(
"StructExtForce(" <<
GetLabel() <<
"): "
905 "invalid number of nodes " << cnt
908 for (
unsigned i = 0; i <
m_Points.size(); i++) {
910 silent_cerr(
"StructExtForce"
913 <<
" not done" << std::endl);
922 for (
unsigned i = 0; i <
m_Points.size(); i++) {
933 if (point.pNode->GetLabel() != l) {
934 silent_cerr(
"StructExtForce"
936 "invalid " << i <<
"-th label " << l
943 >> f[0] >> f[1] >> f[2];
945 inf >> m[0] >> m[1] >> m[2];
#define MBDYN_EXCEPT_ARGS
std::vector< PointData > m_Points
#define ASSERT(expression)
const doublereal * pGetVec(void) const
unsigned int GetLabel(void) const
const StructNode * pRefNode
Reimplemented in StructExtEDGEForce.
Definition at line 644 of file strext.cc.
References bLabels, bOutputAccelerations, Vec3::Cross(), dRaDegr, WithLabel::GetLabel(), StructNode::GetRCurr(), StructDispNode::GetVCurr(), StructNode::GetWCurr(), StructNode::GetWPCurr(), StructDispNode::GetXCurr(), StructDispNode::GetXPPCurr(), iobuf, iobuf_euler_123, iobuf_labels, iobuf_omega, iobuf_omegap, iobuf_R, iobuf_theta, iobuf_x, iobuf_xp, iobuf_xpp, m_Points, MatR2EulerAngles123(), MBC_ROT_EULER_123, MBC_ROT_MAT, MBC_ROT_NONE, MBC_ROT_THETA, MBDYN_EXCEPT_ARGS, Mat3x3::MulTM(), Mat3x3::MulTV(), StructExtForce::PointData::Offset, Mat3x3::pGetMat(), Vec3::pGetVec(), StructExtForce::PointData::pNode, pRefNode, R, uRot, and RotManip::VecRot().
Referenced by Send().
659 send(outfd, (
void *)&l[0],
sizeof(l), 0);
673 send(outfd, (
void *)Theta.pGetVec(), 3*
sizeof(
doublereal), 0);
678 send(outfd, (
void *)E.pGetVec(), 3*
sizeof(
doublereal), 0);
692 for (
unsigned i = 0; i <
m_Points.size(); i++) {
693 const PointData& point =
m_Points[i];
694 Vec3 f(point.pNode->GetRCurr()*point.Offset);
695 Vec3 x(point.pNode->GetXCurr() + f);
698 Vec3 v(point.pNode->GetVCurr() + point.pNode->GetWCurr().Cross(f));
700 const Vec3& w(point.pNode->GetWCurr());
704 uint32_t l = point.pNode->GetLabel();
739 const Vec3& xpp = point.pNode->GetXPPCurr();
740 const Vec3& wp = point.pNode->GetWPCurr();
755 for (
unsigned i = 0; i <
m_Points.size(); i++) {
766 const PointData& point =
m_Points[i];
767 const Mat3x3&
R = point.pNode->GetRCurr();
768 Vec3 f = R*point.Offset;
769 Vec3 x = point.pNode->GetXCurr() + f;
770 const Vec3& w = point.pNode->GetWCurr();
772 Vec3 v = point.pNode->GetVCurr() + wCrossf;
775 uint32_t l = point.pNode->GetLabel();
803 const Vec3& wp = point.pNode->GetWPCurr();
804 Vec3 xpp = point.pNode->GetXPPCurr() + wp.
Cross(f) + w.
Cross(wCrossf);
815 #else // ! USE_SOCKET
817 #endif // ! USE_SOCKET
Vec3 Cross(const Vec3 &v) const
#define MBDYN_EXCEPT_ARGS
std::vector< char > iobuf
doublereal * iobuf_euler_123
virtual const Mat3x3 & GetRCurr(void) const
Vec3 VecRot(const Mat3x3 &Phi)
Vec3 MulTV(const Vec3 &v) const
bool bOutputAccelerations
std::vector< PointData > m_Points
Vec3 MatR2EulerAngles123(const Mat3x3 &R)
virtual const Vec3 & GetWCurr(void) const
virtual const Vec3 & GetWPCurr(void) const
Mat3x3 MulTM(const Mat3x3 &m) const
virtual const Vec3 & GetXCurr(void) const
const doublereal * pGetMat(void) const
doublereal * iobuf_omegap
const doublereal * pGetVec(void) const
virtual const Vec3 & GetVCurr(void) const
virtual const Vec3 & GetXPPCurr(void) const
unsigned int GetLabel(void) const
const StructNode * pRefNode
Reimplemented in StructExtEDGEForce.
Definition at line 442 of file strext.cc.
References a, bLabels, bOutputAccelerations, Vec3::Cross(), dRaDegr, WithLabel::GetLabel(), StructNode::GetRCurr(), StructDispNode::GetVCurr(), StructNode::GetWCurr(), StructNode::GetWPCurr(), StructDispNode::GetXCurr(), StructDispNode::GetXPPCurr(), m_Points, MatR2EulerAngles123(), MBC_ROT_EULER_123, MBC_ROT_MAT, MBC_ROT_NONE, MBC_ROT_THETA, Mat3x3::MulTM(), Mat3x3::MulTV(), pRefNode, R, uRot, and RotManip::VecRot().
Referenced by ReadStructExtForce(), and Send().
452 outf <<
"# reference node" << std::endl;
502 outf <<
"# regular nodes" << std::endl;
504 for (std::vector<PointData>::const_iterator point =
m_Points.begin(); point !=
m_Points.end(); ++point) {
505 Vec3 f(point->pNode->GetRCurr()*point->Offset);
506 Vec3 x(point->pNode->GetXCurr() + f);
509 Vec3 v(point->pNode->GetVCurr() + point->pNode->GetWCurr().Cross(f));
511 const Vec3& w(point->pNode->GetWCurr());
517 << point->pNode->GetLabel()
545 <<
" " << RRef.
MulTV(Dv);
549 <<
" " << RRef.
MulTV(w - wRef);
553 const Vec3& xpp(point->pNode->GetXPPCurr());
554 const Vec3& wp(point->pNode->GetWPCurr());
557 <<
" " << RRef.
MulTV(xpp - xppRef - wpRef.
Cross(Dx)
562 <<
" " << RRef.
MulTV(wp - wpRef - wRef.
Cross(w));
569 outf <<
"# regular nodes" << std::endl;
571 for (std::vector<PointData>::const_iterator point =
m_Points.begin(); point !=
m_Points.end(); ++point) {
582 const Mat3x3&
R = point->pNode->GetRCurr();
583 Vec3 f = R*point->Offset;
584 Vec3 x = point->pNode->GetXCurr() + f;
585 const Vec3& w = point->pNode->GetWCurr();
587 Vec3 v = point->pNode->GetVCurr() + wCrossf;
591 << point->pNode->GetLabel()
626 const Vec3& wp = point->pNode->GetWPCurr();
Vec3 Cross(const Vec3 &v) const
virtual const Mat3x3 & GetRCurr(void) const
Vec3 VecRot(const Mat3x3 &Phi)
Vec3 MulTV(const Vec3 &v) const
bool bOutputAccelerations
std::vector< PointData > m_Points
Vec3 MatR2EulerAngles123(const Mat3x3 &R)
virtual const Vec3 & GetWCurr(void) const
virtual const Vec3 & GetWPCurr(void) const
Mat3x3 MulTM(const Mat3x3 &m) const
virtual const Vec3 & GetXCurr(void) const
virtual const Vec3 & GetVCurr(void) const
static const doublereal a
virtual const Vec3 & GetXPPCurr(void) const
unsigned int GetLabel(void) const
const StructNode * pRefNode