MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
StructDispNode Class Referenceabstract

#include <strnode.h>

Inheritance diagram for StructDispNode:
Collaboration diagram for StructDispNode:

Classes

class  ErrGeneric
 

Public Types

enum  Type { UNKNOWN = -1, DYNAMIC = 0, STATIC, LASTSTRUCTDISPNODETYPE }
 
enum  Output { OUTPUT_ACCELERATIONS = (ToBeOutput::OUTPUT_PRIVATE << 0), OUTPUT_INERTIA = (ToBeOutput::OUTPUT_PRIVATE << 1) }
 
- Public Types inherited from Node
enum  Type {
  UNKNOWN = -1, ABSTRACT = 0, STRUCTURAL, ELECTRIC,
  THERMAL, PARAMETER, HYDRAULIC, LASTNODETYPE
}
 
- Public Types inherited from SimulationEntity
typedef std::vector< Hint * > Hints
 
- Public Types inherited from ToBeOutput
enum  { OUTPUT = 0x1U, OUTPUT_MASK = 0xFU, OUTPUT_PRIVATE = 0x10U, OUTPUT_PRIVATE_MASK = ~OUTPUT_MASK }
 

Public Member Functions

 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 ~StructDispNode (void)
 
virtual Node::Type GetNodeType (void) const
 
const RigidBodyKinematicspGetRBK (void) const
 
const Vec3GetX (void) const
 
const Mat3x3GetR (void) const
 
const Vec3GetV (void) const
 
const Vec3GetW (void) const
 
const Vec3GetXPP (void) const
 
const Vec3GetWP (void) const
 
virtual integer iGetFirstPositionIndex (void) const
 
virtual integer iGetFirstMomentumIndex (void) const =0
 
virtual StructDispNode::Type GetStructDispNodeType (void) const =0
 
virtual std::ostream & Restart (std::ostream &out) 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 const doublerealdGetDofValue (int iDof, int iOrder=0) const
 
virtual const doublerealdGetDofValuePrev (int iDof, int iOrder=0) const
 
virtual void SetDofValue (const doublereal &dValue, unsigned int iDof, unsigned int iOrder=0)
 
virtual DofOrder::Order GetDofType (unsigned int) const
 
virtual const Vec3GetXPrev (void) const
 
virtual const Vec3GetXCurr (void) const
 
virtual const Vec3GetVPrev (void) const
 
virtual const Vec3GetVCurr (void) const
 
virtual const Vec3GetXPPPrev (void) const
 
virtual const Vec3GetXPPCurr (void) const
 
virtual const doublerealdGetPositionStiffness (void) const
 
virtual const doublerealdGetVelocityStiffness (void) const
 
virtual bool ComputeAccelerations (bool b)
 
virtual bool bComputeAccelerations (void) const
 
virtual bool bOutputAccelerations (void) const
 
virtual void OutputAccelerations (bool bOut)
 
virtual void OutputPrepare (OutputHandler &OH)
 
virtual void Output (OutputHandler &OH) const
 
virtual void Update (const VectorHandler &X, const VectorHandler &XP)
 
virtual void DerivativesUpdate (const VectorHandler &X, const VectorHandler &XP)
 
virtual unsigned int iGetInitialNumDof (void) const
 
virtual void InitialUpdate (const VectorHandler &X)
 
void Update (const VectorHandler &X, InverseDynamics::Order iOrder)
 
virtual void SetInitialValue (VectorHandler &X)
 
virtual void SetValue (DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)
 
virtual void BeforePredict (VectorHandler &X, VectorHandler &XP, VectorHandler &XPrev, VectorHandler &XPPrev) const
 
virtual void AfterPredict (VectorHandler &X, VectorHandler &XP)
 
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
 
- Public Member Functions inherited from Node
 Node (unsigned int uL, const DofOwner *pDO, flag fOut)
 
virtual ~Node (void)
 
const NodeGetNode (void) const
 
virtual integer iGetFirstRowIndex (void) const
 
virtual integer iGetFirstColIndex (void) const
 
- Public Member Functions inherited from WithLabel
 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
 
- Public Member Functions inherited from SimulationEntity
 SimulationEntity (void)
 
virtual ~SimulationEntity (void)
 
virtual unsigned int iGetNumDof (void) const =0
 
virtual bool bIsValidIndex (unsigned int i) const
 
virtual DofOrder::Order GetEqType (unsigned int i) const
 
virtual HintParseHint (DataManager *pDM, const char *s) const
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP)
 
virtual std::ostream & OutputAppend (std::ostream &out) const
 
virtual void ReadInitialState (MBDynParser &HP)
 
- Public Member Functions inherited from DofOwnerOwner
 DofOwnerOwner (const DofOwner *pDO)
 
virtual ~DofOwnerOwner ()
 
virtual const DofOwnerpGetDofOwner (void) const
 
virtual integer iGetFirstIndex (void) const
 
- Public Member Functions inherited from ToBeOutput
 ToBeOutput (flag fOut=fDefaultOut)
 
virtual ~ToBeOutput (void)
 
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))
 
- Public Member Functions inherited from RigidBodyKinematics
virtual ~RigidBodyKinematics (void)
 
virtual void Update (void)
 

Protected Attributes

Vec3 XPrev
 
Vec3 XCurr
 
Vec3 VPrev
 
Vec3 VCurr
 
Vec3 XPPCurr
 
Vec3 XPPPrev
 
const StructNodepRefNode
 
OrientationDescription od
 
doublereal dPositionStiffness
 
doublereal dVelocityStiffness
 
const RigidBodyKinematicspRefRBK
 
bool bOutputAccels
 
- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 
- Protected Attributes inherited from ToBeOutput
flag fOutput
 

Detailed Description

Definition at line 67 of file strnode.h.

Member Enumeration Documentation

Enumerator
OUTPUT_ACCELERATIONS 
OUTPUT_INERTIA 

Definition at line 83 of file strnode.h.

Enumerator
UNKNOWN 
DYNAMIC 
STATIC 
LASTSTRUCTDISPNODETYPE 

Definition at line 74 of file strnode.h.

Constructor & Destructor Documentation

StructDispNode::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 
)

Definition at line 102 of file strnode.cc.

References NO_OP.

112 : Node(uL, pDO, fOut),
113 XPrev(X0),
114 XCurr(X0),
115 VPrev(V0),
116 VCurr(V0),
117 XPPCurr(Zero3),
118 XPPPrev(Zero3),
119 pRefNode(pRN),
120 #ifdef USE_NETCDF
121 Var_X(0),
122 Var_Phi(0),
123 Var_XP(0),
124 Var_Omega(0),
125 Var_XPP(0),
126 Var_OmegaP(0),
127 #endif /* USE_NETCDF */
128 od(od),
129 dPositionStiffness(dPosStiff),
130 dVelocityStiffness(dVelStiff),
131 pRefRBK(pRBK),
132 bOutputAccels(false)
133 {
134  NO_OP;
135 }
const Vec3 Zero3(0., 0., 0.)
doublereal dVelocityStiffness
Definition: strnode.h:115
Vec3 XPrev
Definition: strnode.h:89
#define NO_OP
Definition: myassert.h:74
Vec3 XPPCurr
Definition: strnode.h:95
const RigidBodyKinematics * pRefRBK
Definition: strnode.h:118
const StructNode * pRefNode
Definition: strnode.h:98
OrientationDescription od
Definition: strnode.h:111
Vec3 XPPPrev
Definition: strnode.h:96
bool bOutputAccels
Definition: strnode.h:122
doublereal dPositionStiffness
Definition: strnode.h:114
Vec3 VCurr
Definition: strnode.h:93
Vec3 XCurr
Definition: strnode.h:90
Node(unsigned int uL, const DofOwner *pDO, flag fOut)
Definition: node.cc:42
Vec3 VPrev
Definition: strnode.h:92
StructDispNode::~StructDispNode ( void  )
virtual

Definition at line 138 of file strnode.cc.

References NO_OP.

139 {
140  NO_OP;
141 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

void StructDispNode::AfterConvergence ( const VectorHandler X,
const VectorHandler XP,
const VectorHandler XPP 
)
virtual

Reimplemented from SimulationEntity.

Reimplemented in StructNode.

Definition at line 789 of file strnode.cc.

References VCurr, VPrev, XCurr, XPPCurr, XPPPrev, and XPrev.

792 {
793  XPrev = XCurr;
794  VPrev = VCurr;
795  XPPPrev = XPPCurr;
796 }
Vec3 XPrev
Definition: strnode.h:89
Vec3 XPPCurr
Definition: strnode.h:95
Vec3 XPPPrev
Definition: strnode.h:96
Vec3 VCurr
Definition: strnode.h:93
Vec3 XCurr
Definition: strnode.h:90
Vec3 VPrev
Definition: strnode.h:92
void StructDispNode::AfterPredict ( VectorHandler X,
VectorHandler XP 
)
virtual

Reimplemented from SimulationEntity.

Reimplemented in DummyStructNode, and StructNode.

Definition at line 731 of file strnode.cc.

References Vec3::Cross(), WithLabel::GetLabel(), StructNode::GetRCurr(), StructNode::GetRPrev(), GetVCurr(), StructNode::GetWCurr(), GetXCurr(), DofOwnerOwner::iGetFirstIndex(), CGR_Rot::MatGm1, Mat3x3::MulMT(), CGR_Rot::Param, pRefNode, VectorHandler::Put(), VCurr, and XCurr.

732 {
733  integer iFirstIndex = iGetFirstIndex();
734 
735  /* Spostamento e velocita' aggiornati */
736  XCurr = Vec3(X, iFirstIndex + 1);
737  VCurr = Vec3(XP, iFirstIndex + 1);
738 
739 #ifdef MBDYN_X_RELATIVE_PREDICTION
740  if (pRefNode) {
741  // FIXME
742 
743  /*
744  x = x_0 + R_0 * x_r
745  R = R_0 * R_r
746  v = v_0 + omega_0 \times ( R_0 * x_r ) + R_0 * v_r
747  omega = omega_0 + R_0 * omega_r
748  */
749  Vec3 X0 = pRefNode->GetXCurr();
750  Mat3x3 R0 = pRefNode->GetRCurr();
751  Vec3 V0 = pRefNode->GetVCurr();
752  Vec3 W0 = pRefNode->GetWCurr();
753 
754  XCurr = R0*XCurr; /* temporary */
755  RCurr = R0*RCurr;
756  VCurr = V0 + W0.Cross(XCurr) + R0*VCurr;
757  WCurr = W0 + R0*WCurr;
758  XCurr += X0; /* plus reference */
759 
760  /* alcuni usano anche le predizioni dei parametri
761  * di rotazione e delle loro derivate come riferimento
762  * (approccio updated-updated); quindi calcolo
763  * i parametri di riferimento come i parametri
764  * che danno una predizione pari alla variazione
765  * di R0 piu' l'incremento relativo, e le derivate
766  * dei parametri corrispondenti */
767  gRef = Vec3(CGR_Rot::Param, R0*RDelta.MulMT(pRefNode->GetRPrev()));
768  gPRef = Mat3x3(CGR_Rot::MatGm1, gRef)*WCurr;
769 
770  /* to be safe, the correct values are put back
771  * in the state vectors */
772  X.Put(iFirstIndex + 1, XCurr);
773  XP.Put(iFirstIndex + 1, VCurr);
774 
775 #if 0
776  std::cout << "StructNode(" << GetLabel() << "): "
777  "AfterPredict: X=" << XCurr
778  << ", R=" << RCurr
779  << ", V=" << VCurr
780  << ", W=" << WCurr
781  << std::endl;
782 #endif
783  }
784 #endif /* MBDYN_X_RELATIVE_PREDICTION */
785 }
const MatGm1_Manip MatGm1
Definition: matvec3.cc:647
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
const Param_Manip Param
Definition: matvec3.cc:644
Definition: matvec3.h:98
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
const StructNode * pRefNode
Definition: strnode.h:98
virtual const Mat3x3 & GetRPrev(void) const
Definition: strnode.h:1000
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
virtual void Put(integer iRow, const Vec3 &v)
Definition: vh.cc:93
Vec3 VCurr
Definition: strnode.h:93
Vec3 XCurr
Definition: strnode.h:90
virtual const Vec3 & GetVCurr(void) const
Definition: strnode.h:322
Mat3x3 MulMT(const Mat3x3 &m) const
Definition: matvec3.cc:444
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
long int integer
Definition: colamd.c:51
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

void StructDispNode::BeforePredict ( VectorHandler X,
VectorHandler XP,
VectorHandler XPrev,
VectorHandler XPPrev 
) const
virtual

Reimplemented from SimulationEntity.

Reimplemented in DummyStructNode, DynamicStructNode, StructNode, and DynamicStructDispNode.

Definition at line 680 of file strnode.cc.

References Vec3::Cross(), WithLabel::GetLabel(), StructNode::GetRCurr(), GetVCurr(), StructNode::GetWCurr(), GetXCurr(), DofOwnerOwner::iGetFirstIndex(), Mat3x3::MulTM(), Mat3x3::MulTV(), pRefNode, VectorHandler::Put(), VCurr, VPrev, XCurr, and XPrev.

Referenced by DynamicStructDispNode::BeforePredict().

684 {
685 #ifdef MBDYN_X_RELATIVE_PREDICTION
686  // FIXME
687  integer iFirstPos = iGetFirstIndex();
688 
689  /* If pRefNode is defined, the prediction is made
690  * on the data in the reference frame it provides */
691  if (pRefNode) {
692 
693  /*
694  x_r = R_0^T * ( x - x_0 )
695  R_r = R_0^T * R
696  v_r = R_0^T * ( v - v_0 - omega_0 \times ( x - x_0 ) )
697  omega_r = R_0^T * ( omega - omega_0 )
698  */
699  Vec3 Xtmp = XCurr - pRefNode->GetXCurr();
700  const Mat3x3& R0 = pRefNode->GetRCurr();
701  const Vec3& V0 = pRefNode->GetVCurr();
702  const Vec3& W0 = pRefNode->GetWCurr();
703 
704  XCurr = R0.MulTV(Xtmp);
705  RCurr = R0.MulTM(RCurr);
706  VCurr = R0.MulTV(VCurr - V0 - W0.Cross(Xtmp));
707  WCurr = R0.MulTV(WCurr - W0);
708 
709  /* update state vectors with relative position and velocity */
710  X.Put(iFirstPos + 1, XCurr);
711  XP.Put(iFirstPos + 1, VCurr);
712  XPr.Put(iFirstPos + 1, XPrev);
713  XPPr.Put(iFirstPos + 1, VPrev);
714 
715 #if 0
716  std::cout << "StructNode(" << GetLabel() << "): "
717  "BeforePredict: X=" << XCurr
718  << ", R=" << RCurr
719  << ", V=" << VCurr
720  << ", W=" << WCurr
721  << std::endl;
722 #endif
723  }
724 #endif /* MBDYN_X_RELATIVE_PREDICTION */
725 
726  XPrev = XCurr;
727  VPrev = VCurr;
728 }
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
Definition: matvec3.h:98
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
Vec3 MulTV(const Vec3 &v) const
Definition: matvec3.cc:482
const StructNode * pRefNode
Definition: strnode.h:98
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
Mat3x3 MulTM(const Mat3x3 &m) const
Definition: matvec3.cc:500
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
virtual void Put(integer iRow, const Vec3 &v)
Definition: vh.cc:93
Vec3 VCurr
Definition: strnode.h:93
Vec3 XCurr
Definition: strnode.h:90
virtual const Vec3 & GetVCurr(void) const
Definition: strnode.h:322
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
Vec3 VPrev
Definition: strnode.h:92
long int integer
Definition: colamd.c:51
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

bool StructDispNode::bOutputAccelerations ( void  ) const
inlinevirtual
void StructDispNode::DerivativesUpdate ( const VectorHandler X,
const VectorHandler XP 
)
virtual

Reimplemented from SimulationEntity.

Reimplemented in DummyStructNode, and StructNode.

Definition at line 582 of file strnode.cc.

References DofOwnerOwner::iGetFirstIndex(), VCurr, and XCurr.

583 {
584  integer iFirstIndex = iGetFirstIndex();
585 
586  /* Forza configurazione e velocita' al valore iniziale */
587  const_cast<VectorHandler &>(X).Put(iFirstIndex + 1, XCurr);
588  const_cast<VectorHandler &>(XP).Put(iFirstIndex + 1, VCurr);
589 }
Vec3 VCurr
Definition: strnode.h:93
Vec3 XCurr
Definition: strnode.h:90
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

std::ostream & StructDispNode::DescribeDof ( std::ostream &  out,
const char *  prefix = "",
bool  bInitial = false 
) const
virtual

Reimplemented from Node.

Reimplemented in ModalNode, DynamicStructNode, StructNode, and DynamicStructDispNode.

Definition at line 200 of file strnode.cc.

References DofOwnerOwner::iGetFirstIndex().

Referenced by DynamicStructDispNode::DescribeDof(), and DataManager::InitialJointAssembly().

201 {
202  integer iIndex = iGetFirstIndex();
203 
204  out
205  << prefix << iIndex + 1 << "->" << iIndex + 3 << ": "
206  "position [px,py,pz]" << std::endl;
207 
208  if (bInitial) {
209  iIndex += 3;
210  out
211  << prefix << iIndex + 1 << "->" << iIndex + 3 << ": "
212  "linear velocity [vx,vy,vz]" << std::endl;
213  }
214 
215  return out;
216 }
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

void StructDispNode::DescribeDof ( std::vector< std::string > &  desc,
bool  bInitial = false,
int  i = -1 
) const
virtual

Reimplemented from Node.

Reimplemented in ModalNode, DynamicStructNode, StructNode, and DynamicStructDispNode.

Definition at line 219 of file strnode.cc.

References WithLabel::GetLabel(), MBDYN_EXCEPT_ARGS, sdn_initial_dof, and xyz.

220 {
221  if (i == -1) {
222  if (bInitial) {
223  desc.resize(6);
224 
225  } else {
226  desc.resize(3);
227  }
228 
229  } else {
230  desc.resize(1);
231  }
232 
233  std::ostringstream os;
234  os << "StructDispNode(" << GetLabel() << ")";
235 
236  // always uses initial_dof[] becuase dof[]
237  // and initial_dof[] are the same up to 6
238  int iend = bInitial ? 6 : 3;
239  if (i == -1) {
240  std::string name = os.str();
241 
242  for (i = 0; i < iend; i++) {
243  os.str(name);
244  os.seekp(0, std::ios_base::end);
245  os << ": " << sdn_initial_dof[i/3] << xyz[i%3];
246  desc[i] = os.str();
247  }
248 
249  } else {
250  if (i < 0 || i >= iend) {
252  }
253  os << ": " << sdn_initial_dof[i/3] << xyz[i%3];
254  desc[0] = os.str();
255  }
256 }
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
static const char * sdn_initial_dof[]
Definition: strnode.cc:57
static const char xyz[]
Definition: strnode.cc:47
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

std::ostream & StructDispNode::DescribeEq ( std::ostream &  out,
const char *  prefix = "",
bool  bInitial = false 
) const
virtual

Reimplemented from Node.

Reimplemented in ModalNode, DynamicStructNode, StructNode, and DynamicStructDispNode.

Definition at line 259 of file strnode.cc.

References DofOwnerOwner::iGetFirstIndex().

Referenced by DynamicStructDispNode::DescribeEq(), and DataManager::InitialJointAssembly().

260 {
261  integer iIndex = iGetFirstIndex();
262 
263  if (bInitial) {
264  out
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;
269  } else {
270  if (dynamic_cast<const DynamicStructDispNode*>(this) != 0) {
271  iIndex += 3;
272  }
273 
274  out
275  << prefix << iIndex + 1 << "->" << iIndex + 3 << ": "
276  "force equilibrium [Fx,Fy,Fz]" << std::endl;
277  }
278 
279  return out;
280 }
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

void StructDispNode::DescribeEq ( std::vector< std::string > &  desc,
bool  bInitial = false,
int  i = -1 
) const
virtual

Reimplemented from Node.

Reimplemented in ModalNode, DynamicStructNode, StructNode, and DynamicStructDispNode.

Definition at line 283 of file strnode.cc.

References WithLabel::GetLabel(), MBDYN_EXCEPT_ARGS, sdn_eq, sdn_initial_eq, and xyz.

284 {
285  if (i == -1) {
286  if (bInitial) {
287  desc.resize(6);
288 
289  } else {
290  desc.resize(3);
291  }
292 
293  } else {
294  desc.resize(1);
295  }
296 
297  std::ostringstream os;
298  os << "StructDispNode(" << GetLabel() << ")";
299 
300  if (i == -1) {
301  std::string name(os.str());
302 
303  if (bInitial) {
304  for (i = 0; i < 6; i++) {
305  os.str(name);
306  os.seekp(0, std::ios_base::end);
307  os << ": " << sdn_initial_eq[i/3] << xyz[i%3];
308  desc[i] = os.str();
309  }
310 
311  } else {
312  for (i = 0; i < 3; i++) {
313  os.str(name);
314  os.seekp(0, std::ios_base::end);
315  os << ": " << sdn_eq[1 + i/3] << xyz[i%3];
316  desc[i] = os.str();
317  }
318  }
319 
320  } else {
321  if (bInitial) {
322  if (i < 0 || i >= 6) {
324  }
325 
326  os << ": " << sdn_initial_eq[i/3] << xyz[i%3];
327 
328  } else {
329  if (i < 0 || i >= 3) {
331  }
332 
333  os << ": " << sdn_eq[1 + i/3] << xyz[i%3];
334  }
335  desc[0] = os.str();
336  }
337 }
static const char * sdn_initial_eq[]
Definition: strnode.cc:61
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
static const char * sdn_eq[]
Definition: strnode.cc:53
static const char xyz[]
Definition: strnode.cc:47
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

const doublereal & StructDispNode::dGetDofValue ( int  iDof,
int  iOrder = 0 
) const
virtual

Implements Node.

Reimplemented in DummyStructNode, DynamicStructNode, StructNode, and DynamicStructDispNode.

Definition at line 372 of file strnode.cc.

References ASSERT, WithLabel::GetLabel(), MBDYN_EXCEPT_ARGS, VCurr, and XCurr.

Referenced by DynamicStructDispNode::dGetDofValue().

373 {
374  ASSERT(iDof >= 1 && iDof <= 3);
375  ASSERT(iOrder == 0 || iOrder == 1);
376  if (iDof >= 1 && iDof <= 3) {
377  if (iOrder == 0) {
378  return XCurr(iDof);
379  } else if (iOrder == 1) {
380  return VCurr(iDof);
381  }
382  } else {
383  silent_cerr("StructDispNode(" << GetLabel() << "): "
384  "required dof " << iDof << " (order " << iOrder << ") "
385  "is not available." << std::endl);
387  }
388 
389  /* dummy return value to workaround compiler complains */
390  static doublereal dmy = 0.;
391  return dmy;
392 }
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
#define ASSERT(expression)
Definition: colamd.c:977
Vec3 VCurr
Definition: strnode.h:93
Vec3 XCurr
Definition: strnode.h:90
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

const doublereal & StructDispNode::dGetDofValuePrev ( int  iDof,
int  iOrder = 0 
) const
virtual

Implements Node.

Reimplemented in DummyStructNode, DynamicStructNode, StructNode, and DynamicStructDispNode.

Definition at line 397 of file strnode.cc.

References ASSERT, WithLabel::GetLabel(), MBDYN_EXCEPT_ARGS, VPrev, and XPrev.

Referenced by DynamicStructDispNode::dGetDofValuePrev().

398 {
399  ASSERT(iDof >= 1 && iDof <= 3);
400  ASSERT(iOrder == 0 || iOrder == 1);
401  if (iDof >= 1 && iDof <= 3) {
402  if (iOrder == 0) {
403  return XPrev(iDof);
404  } else if (iOrder == 1) {
405  return VPrev(iDof);
406  }
407  } else {
408  silent_cerr("StructDispNode(" << GetLabel() << "): "
409  "required dof " << iDof << " (order " << iOrder << ") "
410  "is not available." << std::endl);
412  }
413 
414  /* dummy return value to workaround compiler complains */
415  static doublereal dmy = 0.;
416  return dmy;
417 }
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
Vec3 XPrev
Definition: strnode.h:89
#define ASSERT(expression)
Definition: colamd.c:977
Vec3 VPrev
Definition: strnode.h:92
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

const doublereal & StructDispNode::dGetPositionStiffness ( void  ) const
inlinevirtual

Definition at line 421 of file strnode.h.

References dPositionStiffness.

Referenced by DataManager::InitialJointAssembly().

422 {
423  return dPositionStiffness;
424 }
doublereal dPositionStiffness
Definition: strnode.h:114
doublereal StructDispNode::dGetPrivData ( unsigned int  i) const
virtual

Reimplemented from Node.

Reimplemented in StructNode.

Definition at line 980 of file strnode.cc.

References ASSERT, bComputeAccelerations(), MBDYN_EXCEPT_ARGS, VCurr, XCurr, and XPPCurr.

981 {
982  switch (i) {
983  case 1:
984  case 2:
985  case 3:
986  return XCurr(i);
987 
988  case 4:
989  case 5:
990  case 6:
991  return XCurr(i - 3);
992 
993  case 7:
994  case 8:
995  case 9: {
996  return 0.;
997  }
998 
999  case 10:
1000  case 11:
1001  case 12:
1002  return VCurr(i - 9);
1003 
1004  case 13:
1005  case 14:
1006  case 15:
1007  return VCurr(i - 12);
1008 
1009  case 16:
1010  case 17:
1011  case 18:
1012  return 0.;
1013 
1014  case 19:
1015  case 20:
1016  case 21:
1017  return 0.;
1018 
1019  case 22:
1020  case 23:
1021  case 24:
1022  return 0.;
1023 
1024  case 25:
1025  case 26:
1026  case 27:
1027  return 0.;
1028 
1029  case 28:
1030  case 29:
1031  case 30:
1032  return 0.;
1033 
1034  case 31:
1035  case 32:
1036  case 33:
1037  case 34:
1038  return 0.;
1039 
1040  case 35:
1041  case 36:
1042  case 37:
1043  ASSERT(bComputeAccelerations() == true);
1044  return XPPCurr(i - 34);
1045 
1046  case 38:
1047  case 39:
1048  case 40:
1049  ASSERT(bComputeAccelerations() == true);
1050  return XPPCurr(i - 37);
1051 
1052  case 41:
1053  case 42:
1054  case 43:
1055  ASSERT(bComputeAccelerations() == true);
1056  return 0.;
1057 
1058  case 44:
1059  case 45:
1060  case 46:
1061  ASSERT(bComputeAccelerations() == true);
1062  return 0.;
1063  }
1064 
1066 }
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
Vec3 XPPCurr
Definition: strnode.h:95
#define ASSERT(expression)
Definition: colamd.c:977
Vec3 VCurr
Definition: strnode.h:93
Vec3 XCurr
Definition: strnode.h:90
virtual bool bComputeAccelerations(void) const
Definition: strnode.h:433

Here is the call graph for this function:

const doublereal & StructDispNode::dGetVelocityStiffness ( void  ) const
inlinevirtual

Definition at line 427 of file strnode.h.

References dVelocityStiffness.

Referenced by DataManager::InitialJointAssembly().

428 {
429  return dVelocityStiffness;
430 }
doublereal dVelocityStiffness
Definition: strnode.h:115
DofOrder::Order StructDispNode::GetDofType ( unsigned int  i) const
virtual

Implements SimulationEntity.

Definition at line 362 of file strnode.cc.

References ASSERT, DofOrder::DIFFERENTIAL, and SimulationEntity::iGetNumDof().

363 {
364  ASSERT(i >= 0 && i < iGetNumDof());
365  return DofOrder::DIFFERENTIAL;
366 }
#define ASSERT(expression)
Definition: colamd.c:977
virtual unsigned int iGetNumDof(void) const =0

Here is the call graph for this function:

const Mat3x3 & StructDispNode::GetR ( void  ) const
virtual

Implements RigidBodyKinematics.

Reimplemented in StructNode.

Definition at line 164 of file strnode.cc.

References Eye3.

165 {
167 }
const Mat3x3 Eye3(1., 0., 0., 0., 1., 0., 0., 0., 1.)
virtual StructDispNode::Type StructDispNode::GetStructDispNodeType ( void  ) const
pure virtual
const Vec3 & StructDispNode::GetV ( void  ) const
virtual

Implements RigidBodyKinematics.

Definition at line 170 of file strnode.cc.

References GetVCurr().

171 {
172  return GetVCurr();
173 }
virtual const Vec3 & GetVCurr(void) const
Definition: strnode.h:322

Here is the call graph for this function:

const Vec3 & StructDispNode::GetVCurr ( void  ) const
inlinevirtual

Definition at line 322 of file strnode.h.

References VCurr.

Referenced by ModuleNonsmoothNode::AfterPredict(), ViscousBody::AfterPredict(), AfterPredict(), ViscoElasticBeam2::AfterPredict(), ViscousDispJoint::AfterPredict(), ViscousJoint::AfterPredict(), ViscoElasticDispJoint::AfterPredict(), ViscoElasticJoint::AfterPredict(), ViscoElasticBeam::AfterPredict(), StructNode::AfterPredict(), DataManager::AssConstrRes(), HydrodynamicPlainBearing::AssJac(), Accelerometer::AssJac(), InlineFriction::AssJac(), ContactJoint::AssJac(), Actuator::AssJac(), TranslAccel::AssJac(), AerodynamicModal::AssJac(), TotalEquation::AssJac(), TotalJoint::AssJac(), ViscoElasticRod::AssJac(), AutomaticStructElem::AssJac(), AerodynamicBody::AssJac(), RodWithOffset::AssJac(), ModuleIMUConstraint::AssJac(), DeformableDispJoint::AssMatFDEPrime(), DynamicVariableBody::AssMats(), AutomaticStructElem::AssMats(), DynamicBody::AssMats(), VariableBody::AssMatsRBK_int(), Body::AssMatsRBK_int(), Accelerometer::AssRes(), LinearAccelerationJoint::AssRes(), InlineFriction::AssRes(), LinearVelocityJoint::AssRes(), Actuator::AssRes(), Wheel2::AssRes(), TranslAccel::AssRes(), ContactJoint::AssRes(), DynamicMass::AssRes(), DynamicVariableBody::AssRes(), AerodynamicModal::AssRes(), ModuleNonsmoothNode::AssRes(), TotalEquation::AssRes(), TotalJoint::AssRes(), ViscoElasticRod::AssRes(), AutomaticStructElem::AssRes(), Modal::AssRes(), Wheel4::AssRes(), DynamicBody::AssRes(), ModuleIMUConstraint::AssRes(), TotalPinJoint::AssRes(), ViscoElasticBeam2::AssStiffnessVec(), ViscoElasticBeam::AssStiffnessVec(), ViscousBody::AssVec(), Rod::AssVec(), GenericAerodynamicForce::AssVec(), RodBezier::AssVec(), AerodynamicModal::AssVec(), AerodynamicBody::AssVec(), RodWithOffset::AssVec(), ViscousDispJoint::AssVec(), ViscousJoint::AssVec(), ViscoElasticJoint::AssVec(), ViscoElasticDispJoint::AssVec(), VariableBody::AssVecRBK_int(), Body::AssVecRBK_int(), BeforePredict(), StructNode::BeforePredict(), AutomaticStructElem::ComputeAccelerations(), HydrodynamicPlainBearing::ComputeResidual(), NodeDistDriveCaller::dGetP(), InlineFriction::dGetPrivData(), Mass::dGetPrivData(), VariableBody::dGetPrivData(), ViscousBody::dGetPrivData(), DeformableDispJoint::dGetPrivData(), DeformableJoint::dGetPrivData(), AutomaticStructDispElem::dGetPrivData(), TotalEquation::dGetPrivData(), TotalJoint::dGetPrivData(), AutomaticStructElem::dGetPrivData(), Body::dGetPrivData(), Modal::dGetPrivData(), TotalReaction::dGetPrivData(), TotalPinJoint::dGetPrivData(), DynamicMass::GetB_int(), DynamicVariableBody::GetB_int(), Modal::GetB_int(), DynamicBody::GetB_int(), Modal::GetCurrFEMNodesVelocity(), DynamicVariableBody::GetG_int(), DynamicBody::GetG_int(), GetV(), PosRel::GetVelGlob(), getvnvt(), InlineFriction::InitialAssJac(), DistanceJoint::InitialAssJac(), InLineJoint::InitialAssJac(), InPlaneJoint::InitialAssJac(), InLineWithOffsetJoint::InitialAssJac(), TotalEquation::InitialAssJac(), InPlaneWithOffsetJoint::InitialAssJac(), TotalJoint::InitialAssJac(), ViscoElasticRod::InitialAssJac(), RodWithOffset::InitialAssJac(), TotalReaction::InitialAssJac(), TotalPinJoint::InitialAssJac(), TotalForce::InitialAssJac(), InlineFriction::InitialAssRes(), DistanceJoint::InitialAssRes(), LinearVelocityJoint::InitialAssRes(), InLineJoint::InitialAssRes(), UniversalHingeJoint::InitialAssRes(), InPlaneJoint::InitialAssRes(), SphericalHingeJoint::InitialAssRes(), DriveDisplacementJoint::InitialAssRes(), PlaneHingeJoint::InitialAssRes(), InLineWithOffsetJoint::InitialAssRes(), AerodynamicModal::InitialAssRes(), DistanceJointWithOffset::InitialAssRes(), PinJoint::InitialAssRes(), TotalEquation::InitialAssRes(), InPlaneWithOffsetJoint::InitialAssRes(), TotalJoint::InitialAssRes(), ViscoElasticRod::InitialAssRes(), DriveDisplacementPinJoint::InitialAssRes(), UniversalPinJoint::InitialAssRes(), Modal::InitialAssRes(), ClampJoint::InitialAssRes(), TotalReaction::InitialAssRes(), TotalPinJoint::InitialAssRes(), AxialRotationJoint::InitialAssRes(), TotalForce::InitialAssRes(), ViscoElasticDispJoint::InitialAssRes(), PlanePinJoint::InitialAssRes(), DataManager::InitialJointAssembly(), Rotor::InitParam(), ModuleNonsmoothNode::ModuleNonsmoothNode(), StructExtForce::Output(), TotalEquation::Output(), TotalJoint::Output(), TotalReaction::Output(), TotalPinJoint::Output(), ModalMappingExt::Send(), ModalExt::Send(), StructExtForce::SendToFileDes(), StructMappingExtForce::SendToFileDes(), StructMembraneMappingExtForce::SendToFileDes(), StructExtEDGEForce::SendToStream(), StructExtForce::SendToStream(), StructMappingExtForce::SendToStream(), StructMembraneMappingExtForce::SendToStream(), DistanceJointWithOffset::SetInitialValue(), Modal::SetInitialValue(), DispMeasure::SetValue(), Accelerometer::SetValue(), LinearAccelerationJoint::SetValue(), TranslAccel::SetValue(), DynamicMass::SetValue(), DynamicVariableBody::SetValue(), SetValue(), Modal::SetValue(), ModuleIMUConstraint::SetValue(), DynamicBody::SetValue(), StructNode::SetValue(), AircraftInstruments::Update(), OffsetDummyStructNode::Update_int(), RelFrameDummyStructNode::Update_int(), PivotRelFrameDummyStructNode::Update_int(), velocity(), and vrel().

323 {
324  return VCurr;
325 }
Vec3 VCurr
Definition: strnode.h:93
const Vec3 & StructDispNode::GetVPrev ( void  ) const
inlinevirtual

Definition at line 316 of file strnode.h.

References VPrev.

Referenced by DataManager::AssConstrRes(), ModuleNonsmoothNode::AssRes(), DataManager::InitialJointAssembly(), velocity(), and vrel().

317 {
318  return VPrev;
319 }
Vec3 VPrev
Definition: strnode.h:92
const Vec3 & StructDispNode::GetW ( void  ) const
virtual

Implements RigidBodyKinematics.

Reimplemented in StructNode.

Definition at line 176 of file strnode.cc.

References Zero3.

177 {
179 }
const Vec3 Zero3(0., 0., 0.)
const Vec3 & StructDispNode::GetWP ( void  ) const
virtual

Implements RigidBodyKinematics.

Reimplemented in DynamicStructNode, and StructNode.

Definition at line 188 of file strnode.cc.

References Zero3.

189 {
191 }
const Vec3 Zero3(0., 0., 0.)
const Vec3 & StructDispNode::GetX ( void  ) const
virtual

Implements RigidBodyKinematics.

Definition at line 158 of file strnode.cc.

References GetXCurr().

Referenced by DataManager::OutputEigGeometry().

159 {
160  return GetXCurr();
161 }
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310

Here is the call graph for this function:

const Vec3 & StructDispNode::GetXCurr ( void  ) const
inlinevirtual

Definition at line 310 of file strnode.h.

References XCurr.

Referenced by CyclocopterUniform1D::AddForce(), CyclocopterUniform2D::AddForce(), CyclocopterPolimi::AddForce(), AerodynamicModal::AerodynamicModal(), AeroDynModule::AeroDynModule(), Wheel4::AfterConvergence(), ModuleNonsmoothNode::AfterPredict(), ElasticDispJoint::AfterPredict(), HBeam::AfterPredict(), Beam2::AfterPredict(), ElasticJoint::AfterPredict(), AfterPredict(), ElasticDispJointInv::AfterPredict(), Beam::AfterPredict(), ElasticJointInv::AfterPredict(), ViscoElasticBeam2::AfterPredict(), ViscousDispJoint::AfterPredict(), ViscousJoint::AfterPredict(), ViscoElasticDispJoint::AfterPredict(), ViscoElasticJoint::AfterPredict(), ViscoElasticBeam::AfterPredict(), StructNode::AfterPredict(), DataManager::AssConstrRes(), HydrodynamicPlainBearing::AssJac(), InlineFriction::AssJac(), InLineJoint::AssJac(), InPlaneJoint::AssJac(), ContactJoint::AssJac(), Actuator::AssJac(), RodBezier::AssJac(), DynamicMass::AssJac(), DynamicVariableBody::AssJac(), AerodynamicModal::AssJac(), InLineWithOffsetJoint::AssJac(), TotalEquation::AssJac(), TotalJoint::AssJac(), InPlaneWithOffsetJoint::AssJac(), AerodynamicBody::AssJac(), TotalReaction::AssJac(), DynamicBody::AssJac(), AerodynamicBeam::AssJac(), ModalBody::AssJac(), AerodynamicBeam2::AssJac(), TotalForce::AssJac(), DeformableJoint::AssMatCommon(), DynamicMass::AssMats(), DynamicVariableBody::AssMats(), ElasticDispJoint::AssMats(), StaticMass::AssMats(), StaticVariableBody::AssMats(), ElasticDispJointInv::AssMats(), DynamicBody::AssMats(), ViscousDispJoint::AssMats(), ModalBody::AssMats(), StaticBody::AssMats(), ViscoElasticDispJoint::AssMats(), VariableBody::AssMatsRBK_int(), Body::AssMatsRBK_int(), DispMeasure::AssRes(), InlineFriction::AssRes(), InLineJoint::AssRes(), DistanceJoint::AssRes(), UniversalHingeJoint::AssRes(), SphericalHingeJoint::AssRes(), InPlaneJoint::AssRes(), Actuator::AssRes(), Wheel2::AssRes(), StructExtForce::AssRes(), StructMappingExtForce::AssRes(), Brake::AssRes(), ContactJoint::AssRes(), PlaneHingeJoint::AssRes(), DynamicMass::AssRes(), DynamicVariableBody::AssRes(), BeamSliderJoint::AssRes(), AerodynamicModal::AssRes(), ModuleNonsmoothNode::AssRes(), InLineWithOffsetJoint::AssRes(), TotalEquation::AssRes(), TotalJoint::AssRes(), DistanceJointWithOffset::AssRes(), PinJoint::AssRes(), AeroDynModule::AssRes(), InPlaneWithOffsetJoint::AssRes(), StaticMass::AssRes(), ViscoElasticRod::AssRes(), StaticVariableBody::AssRes(), UniversalPinJoint::AssRes(), UniformRotor::AssRes(), Modal::AssRes(), ClampJoint::AssRes(), Wheel4::AssRes(), TotalReaction::AssRes(), DynamicBody::AssRes(), TotalPinJoint::AssRes(), ModalBody::AssRes(), AxialRotationJoint::AssRes(), ManglerRotor::AssRes(), StaticBody::AssRes(), TotalForce::AssRes(), PlanePinJoint::AssRes(), DynamicInflowRotor::AssRes(), PetersHeRotor::AssRes(), Beam2::AssStiffnessMat(), HBeam::AssStiffnessMat(), Beam::AssStiffnessMat(), ViscoElasticBeam2::AssStiffnessMat(), ViscoElasticBeam::AssStiffnessMat(), Beam2::AssStiffnessVec(), HBeam::AssStiffnessVec(), Beam::AssStiffnessVec(), ViscoElasticBeam2::AssStiffnessVec(), ViscoElasticBeam::AssStiffnessVec(), DriveDisplacementJoint::AssVec(), PointSurfaceContact::AssVec(), Rod::AssVec(), GenericAerodynamicForce::AssVec(), RodBezier::AssVec(), AerodynamicModal::AssVec(), ElasticDispJoint::AssVec(), DriveDisplacementPinJoint::AssVec(), ElasticJoint::AssVec(), AerodynamicBody::AssVec(), ElasticDispJointInv::AssVec(), RodWithOffset::AssVec(), ElasticJointInv::AssVec(), AerodynamicBeam::AssVec(), ViscousDispJoint::AssVec(), ViscousJoint::AssVec(), AerodynamicBeam2::AssVec(), ViscoElasticJoint::AssVec(), ViscoElasticDispJoint::AssVec(), Mass::AssVecRBK_int(), VariableBody::AssVecRBK_int(), Body::AssVecRBK_int(), BeforePredict(), StructNode::BeforePredict(), Shell4EAS::ComputeInitialNodeAndIptOrientation(), Shell4EASANS::ComputeInitialNodeOrientation(), HydrodynamicPlainBearing::ComputeResidual(), ContactJoint::ContactJoint(), NodeDistDriveCaller::dGet(), NodeDistDriveCaller::dGetP(), InlineFriction::dGetPrivData(), Mass::dGetPrivData(), VariableBody::dGetPrivData(), DeformableDispJoint::dGetPrivData(), DeformableJoint::dGetPrivData(), TotalEquation::dGetPrivData(), TotalJoint::dGetPrivData(), Body::dGetPrivData(), Modal::dGetPrivData(), TotalReaction::dGetPrivData(), TotalPinJoint::dGetPrivData(), distance(), HBeam::DsDxi(), Beam2::DsDxi(), Beam::DsDxi(), Modal::GetCurrFEMNodesPosition(), RotorTrimGeneric::GetData(), getelemparams(), DynamicVariableBody::GetG_int(), DynamicBody::GetG_int(), CyclocopterPolimi::GetInducedVelocity(), Mass::GetJ_int(), VariableBody::GetJ_int(), Modal::GetJ_int(), Body::GetJ_int(), PosRel::GetPosGlob(), Mass::GetS_int(), VariableBody::GetS_int(), Modal::GetS_int(), Body::GetS_int(), MBDynParser::GetVecAbs(), MBDynParser::GetVecRel(), GetX(), Rotor::GetXCurr(), InducedVelocity::GetXCurr(), Beam::Init(), InlineFriction::InitialAssJac(), InLineJoint::InitialAssJac(), InPlaneJoint::InitialAssJac(), RodBezier::InitialAssJac(), InLineWithOffsetJoint::InitialAssJac(), TotalEquation::InitialAssJac(), InPlaneWithOffsetJoint::InitialAssJac(), TotalJoint::InitialAssJac(), TotalReaction::InitialAssJac(), TotalForce::InitialAssJac(), InlineFriction::InitialAssRes(), DistanceJoint::InitialAssRes(), InLineJoint::InitialAssRes(), UniversalHingeJoint::InitialAssRes(), InPlaneJoint::InitialAssRes(), SphericalHingeJoint::InitialAssRes(), DriveDisplacementJoint::InitialAssRes(), PlaneHingeJoint::InitialAssRes(), DynamicVariableBody::InitialAssRes(), InLineWithOffsetJoint::InitialAssRes(), DistanceJointWithOffset::InitialAssRes(), AerodynamicModal::InitialAssRes(), PinJoint::InitialAssRes(), TotalEquation::InitialAssRes(), InPlaneWithOffsetJoint::InitialAssRes(), TotalJoint::InitialAssRes(), ViscoElasticRod::InitialAssRes(), DriveDisplacementPinJoint::InitialAssRes(), UniversalPinJoint::InitialAssRes(), ClampJoint::InitialAssRes(), TotalReaction::InitialAssRes(), DynamicBody::InitialAssRes(), TotalPinJoint::InitialAssRes(), AxialRotationJoint::InitialAssRes(), TotalForce::InitialAssRes(), ViscoElasticDispJoint::InitialAssRes(), PlanePinJoint::InitialAssRes(), DataManager::InitialJointAssembly(), Rotor::InitParam(), ModalMappingExt::ModalMappingExt(), ModuleNonsmoothNode::ModuleNonsmoothNode(), AbsoluteDispForce::Output(), DriveDisplacementJoint::Output(), StructExtForce::Output(), AbsoluteInternalDispForce::Output(), TotalEquation::Output(), TotalJoint::Output(), DriveDisplacementPinJoint::Output(), AbsoluteForce::Output(), FollowerForce::Output(), TotalReaction::Output(), TotalPinJoint::Output(), AbsoluteInternalForce::Output(), FollowerInternalForce::Output(), NodeResForces::Pole(), position(), ReadBeam(), ReadBeam2(), ReadHBeam(), ReadJoint(), ReadModal(), ReadStructMappingExtForce(), ReadStructNode(), ModalMappingExt::Recv(), InducedVelocity::ResetForce(), Rod::Rod(), RodBezier::RodBezier(), RodWithOffset::RodWithOffset(), ModalMappingExt::Send(), ModalExt::Send(), StructExtForce::SendToFileDes(), StructMappingExtForce::SendToFileDes(), StructMembraneMappingExtForce::SendToFileDes(), StructExtEDGEForce::SendToStream(), StructExtForce::SendToStream(), StructMappingExtForce::SendToStream(), StructMembraneMappingExtForce::SendToStream(), DistanceJoint::SetInitialValue(), DistanceJointWithOffset::SetInitialValue(), DispMeasure::SetValue(), DriveDisplacementJoint::SetValue(), SphericalHingeJoint::SetValue(), DeformableDispJoint::SetValue(), DistanceJoint::SetValue(), DeformableJoint::SetValue(), PlaneHingeJoint::SetValue(), TotalEquation::SetValue(), TotalJoint::SetValue(), DistanceJointWithOffset::SetValue(), DriveDisplacementPinJoint::SetValue(), SetValue(), TotalReaction::SetValue(), TotalPinJoint::SetValue(), AxialRotationJoint::SetValue(), PlanePinJoint::SetValue(), StructNode::SetValue(), unitvec(), AircraftInstruments::Update(), OffsetDummyStructNode::Update_int(), RelFrameDummyStructNode::Update_int(), PivotRelFrameDummyStructNode::Update_int(), Membrane4EAS::UpdateNodalAndAveragePos(), Shell4EAS::UpdateNodalAndAveragePosAndOrientation(), Shell4EASANS::UpdateNodalAndAveragePosAndOrientation(), and Wheel4::Wheel4().

311 {
312  return XCurr;
313 }
Vec3 XCurr
Definition: strnode.h:90
const Vec3 & StructDispNode::GetXPP ( void  ) const
virtual

Implements RigidBodyKinematics.

Reimplemented in DynamicStructDispNode.

Definition at line 182 of file strnode.cc.

References MBDYN_EXCEPT_ARGS.

183 {
185 }
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
const Vec3 & StructDispNode::GetXPPPrev ( void  ) const
inlinevirtual

Definition at line 328 of file strnode.h.

References XPPPrev.

Referenced by DataManager::AssConstrRes().

329 {
330  return XPPPrev;
331 }
Vec3 XPPPrev
Definition: strnode.h:96
const Vec3 & StructDispNode::GetXPrev ( void  ) const
inlinevirtual

Definition at line 304 of file strnode.h.

References XPrev.

Referenced by DataManager::AssConstrRes(), ModuleNonsmoothNode::AssRes(), distance(), DataManager::InitialJointAssembly(), position(), and unitvec().

305 {
306  return XPrev;
307 }
Vec3 XPrev
Definition: strnode.h:89
virtual integer StructDispNode::iGetFirstMomentumIndex ( void  ) const
pure virtual

Implemented in DummyStructNode, StaticStructNode, DynamicStructNode, StaticStructDispNode, and DynamicStructDispNode.

Referenced by HydrodynamicPlainBearing::AssJac(), InLineJoint::AssJac(), InlineFriction::AssJac(), LinearVelocityJoint::AssJac(), DistanceJoint::AssJac(), UniversalHingeJoint::AssJac(), PrismaticJoint::AssJac(), SphericalHingeJoint::AssJac(), InPlaneJoint::AssJac(), ContactJoint::AssJac(), Actuator::AssJac(), asynchronous_machine::AssJac(), RodBezier::AssJac(), GimbalRotationJoint::AssJac(), PiezoActuatorBeam2::AssJac(), Rod::AssJac(), PiezoActuatorBeam::AssJac(), Motor::AssJac(), PointSurfaceContact::AssJac(), DriveDisplacementJoint::AssJac(), ViscousBody::AssJac(), Brake::AssJac(), DriveHingeJoint::AssJac(), DynamicMass::AssJac(), DeformableDispJoint::AssJac(), PlaneHingeJoint::AssJac(), DynamicVariableBody::AssJac(), BeamSliderJoint::AssJac(), ModuleNonsmoothNode::AssJac(), AngularVelocityJoint::AssJac(), InLineWithOffsetJoint::AssJac(), DeformableJoint::AssJac(), TotalJoint::AssJac(), DistanceJointWithOffset::AssJac(), UniversalRotationJoint::AssJac(), PinJoint::AssJac(), InPlaneWithOffsetJoint::AssJac(), ElasticAxialJoint::AssJac(), PiezoActuatorVEBeam2::AssJac(), StaticMass::AssJac(), ViscoElasticRod::AssJac(), ElasticHingeJoint::AssJac(), PiezoActuatorVEBeam::AssJac(), HBeam::AssJac(), AbsoluteForce::AssJac(), StaticVariableBody::AssJac(), Beam2::AssJac(), DriveDisplacementPinJoint::AssJac(), Membrane4EAS::AssJac(), UniversalPinJoint::AssJac(), PlaneRotationJoint::AssJac(), AerodynamicBody::AssJac(), ClampJoint::AssJac(), RodWithOffset::AssJac(), FollowerForce::AssJac(), ViscousAxialJoint::AssJac(), Wheel4::AssJac(), Beam::AssJac(), TotalReaction::AssJac(), Shell4EAS::AssJac(), DynamicBody::AssJac(), ModuleIMUConstraint::AssJac(), TotalPinJoint::AssJac(), AerodynamicBeam::AssJac(), Shell4EASANS::AssJac(), ViscousHingeJoint::AssJac(), FollowerCouple::AssJac(), ViscoElasticAxialJoint::AssJac(), AxialRotationJoint::AssJac(), StaticBody::AssJac(), AerodynamicBeam2::AssJac(), AbsoluteInternalForce::AssJac(), TotalForce::AssJac(), ViscoElasticHingeJoint::AssJac(), LoadIncForce::AssJac(), FollowerInternalForce::AssJac(), PlanePinJoint::AssJac(), FollowerInternalCouple::AssJac(), Rod::AssMats(), ViscousBody::AssMats(), DynamicMass::AssMats(), DeformableDispJoint::AssMats(), DynamicVariableBody::AssMats(), DeformableJoint::AssMats(), ElasticAxialJoint::AssMats(), ElasticDispJoint::AssMats(), StaticMass::AssMats(), ElasticHingeJoint::AssMats(), StaticVariableBody::AssMats(), ElasticJoint::AssMats(), ElasticDispJointInv::AssMats(), ViscousAxialJoint::AssMats(), ElasticJointInv::AssMats(), Beam::AssMats(), DynamicBody::AssMats(), ViscousHingeJoint::AssMats(), ViscoElasticAxialJoint::AssMats(), StaticBody::AssMats(), ViscoElasticHingeJoint::AssMats(), AbsoluteDispForce::AssRes(), ModalForce::AssRes(), InlineFriction::AssRes(), InLineJoint::AssRes(), LinearVelocityJoint::AssRes(), DistanceJoint::AssRes(), HydrodynamicPlainBearing::AssRes(), UniversalHingeJoint::AssRes(), PrismaticJoint::AssRes(), SphericalHingeJoint::AssRes(), InPlaneJoint::AssRes(), Actuator::AssRes(), asynchronous_machine::AssRes(), Wheel2::AssRes(), ModalMappingExt::AssRes(), RodBezier::AssRes(), GimbalRotationJoint::AssRes(), Motor::AssRes(), Rod::AssRes(), StructExtForce::AssRes(), PointSurfaceContact::AssRes(), StructMappingExtForce::AssRes(), GenericAerodynamicForce::AssRes(), AbsoluteInternalDispForce::AssRes(), Brake::AssRes(), DriveDisplacementJoint::AssRes(), DriveHingeJoint::AssRes(), ViscousBody::AssRes(), ContactJoint::AssRes(), PlaneHingeJoint::AssRes(), BeamSliderJoint::AssRes(), AerodynamicModal::AssRes(), AngularVelocityJoint::AssRes(), InLineWithOffsetJoint::AssRes(), ModuleNonsmoothNode::AssRes(), ModalExt::AssRes(), TotalJoint::AssRes(), DistanceJointWithOffset::AssRes(), DeformableJoint::AssRes(), UniversalRotationJoint::AssRes(), PinJoint::AssRes(), InPlaneWithOffsetJoint::AssRes(), ElasticAxialJoint::AssRes(), ElasticDispJoint::AssRes(), StaticMass::AssRes(), ViscoElasticRod::AssRes(), HBeam::AssRes(), ElasticHingeJoint::AssRes(), AbsoluteForce::AssRes(), Beam2::AssRes(), StaticVariableBody::AssRes(), Membrane4EAS::AssRes(), DriveDisplacementPinJoint::AssRes(), UniversalPinJoint::AssRes(), PlaneRotationJoint::AssRes(), AerodynamicBody::AssRes(), RodWithOffset::AssRes(), FollowerForce::AssRes(), ClampJoint::AssRes(), Wheel4::AssRes(), ElasticDispJointInv::AssRes(), Beam::AssRes(), ViscousAxialJoint::AssRes(), Shell4EAS::AssRes(), TotalReaction::AssRes(), AbsoluteCouple::AssRes(), Shell4EASANS::AssRes(), ModuleIMUConstraint::AssRes(), TotalPinJoint::AssRes(), AerodynamicBeam::AssRes(), FollowerCouple::AssRes(), ViscousHingeJoint::AssRes(), ViscousDispJoint::AssRes(), ViscoElasticAxialJoint::AssRes(), AxialRotationJoint::AssRes(), StaticBody::AssRes(), AerodynamicBeam2::AssRes(), AbsoluteInternalForce::AssRes(), TotalForce::AssRes(), ViscoElasticDispJoint::AssRes(), LoadIncForce::AssRes(), PlanePinJoint::AssRes(), ViscoElasticHingeJoint::AssRes(), FollowerInternalForce::AssRes(), AbsoluteInternalCouple::AssRes(), FollowerInternalCouple::AssRes(), DataManager::DofOwnerInit(), ModalNode::iGetFirstRowIndex(), PointSurfaceContact::InitialAssJac(), PointSurfaceContact::InitialAssRes(), DynamicMass::SetValue(), DynamicVariableBody::SetValue(), and DynamicBody::SetValue().

integer StructDispNode::iGetFirstPositionIndex ( void  ) const
inlinevirtual

Reimplemented in DummyStructNode.

Definition at line 452 of file strnode.h.

References DofOwnerOwner::iGetFirstIndex().

Referenced by HydrodynamicPlainBearing::AssJac(), Accelerometer::AssJac(), InLineJoint::AssJac(), InlineFriction::AssJac(), LinearVelocityJoint::AssJac(), DistanceJoint::AssJac(), UniversalHingeJoint::AssJac(), SphericalHingeJoint::AssJac(), PrismaticJoint::AssJac(), InPlaneJoint::AssJac(), ContactJoint::AssJac(), Actuator::AssJac(), asynchronous_machine::AssJac(), GimbalRotationJoint::AssJac(), RodBezier::AssJac(), PiezoActuatorBeam2::AssJac(), Rod::AssJac(), PiezoActuatorBeam::AssJac(), Motor::AssJac(), PointSurfaceContact::AssJac(), DriveDisplacementJoint::AssJac(), ViscousBody::AssJac(), Brake::AssJac(), DriveHingeJoint::AssJac(), AutomaticStructDispElem::AssJac(), DynamicMass::AssJac(), DeformableDispJoint::AssJac(), PlaneHingeJoint::AssJac(), DynamicVariableBody::AssJac(), BeamSliderJoint::AssJac(), InLineWithOffsetJoint::AssJac(), ModuleNonsmoothNode::AssJac(), AngularVelocityJoint::AssJac(), TotalEquation::AssJac(), DeformableJoint::AssJac(), TotalJoint::AssJac(), DistanceJointWithOffset::AssJac(), UniversalRotationJoint::AssJac(), PinJoint::AssJac(), InPlaneWithOffsetJoint::AssJac(), ElasticAxialJoint::AssJac(), PiezoActuatorVEBeam2::AssJac(), StaticMass::AssJac(), ViscoElasticRod::AssJac(), ElasticHingeJoint::AssJac(), PiezoActuatorVEBeam::AssJac(), HBeam::AssJac(), AbsoluteForce::AssJac(), StaticVariableBody::AssJac(), Beam2::AssJac(), AutomaticStructElem::AssJac(), DriveDisplacementPinJoint::AssJac(), Membrane4EAS::AssJac(), UniversalPinJoint::AssJac(), PlaneRotationJoint::AssJac(), AerodynamicBody::AssJac(), ClampJoint::AssJac(), RodWithOffset::AssJac(), FollowerForce::AssJac(), ViscousAxialJoint::AssJac(), Wheel4::AssJac(), Beam::AssJac(), TotalReaction::AssJac(), Shell4EAS::AssJac(), DynamicBody::AssJac(), ModuleIMUConstraint::AssJac(), TotalPinJoint::AssJac(), AerodynamicBeam::AssJac(), Shell4EASANS::AssJac(), ViscousHingeJoint::AssJac(), FollowerCouple::AssJac(), ViscoElasticAxialJoint::AssJac(), AxialRotationJoint::AssJac(), StaticBody::AssJac(), AerodynamicBeam2::AssJac(), AbsoluteInternalForce::AssJac(), TotalForce::AssJac(), ViscoElasticHingeJoint::AssJac(), LoadIncForce::AssJac(), FollowerInternalForce::AssJac(), PlanePinJoint::AssJac(), FollowerInternalCouple::AssJac(), Rod::AssMats(), ViscousBody::AssMats(), AutomaticStructDispElem::AssMats(), DynamicMass::AssMats(), DeformableDispJoint::AssMats(), DynamicVariableBody::AssMats(), DeformableJoint::AssMats(), ElasticAxialJoint::AssMats(), ElasticDispJoint::AssMats(), StaticMass::AssMats(), ElasticHingeJoint::AssMats(), StaticVariableBody::AssMats(), ElasticJoint::AssMats(), AutomaticStructElem::AssMats(), ElasticDispJointInv::AssMats(), ViscousAxialJoint::AssMats(), ElasticJointInv::AssMats(), Beam::AssMats(), DynamicBody::AssMats(), ViscousHingeJoint::AssMats(), ViscoElasticAxialJoint::AssMats(), StaticBody::AssMats(), ViscoElasticHingeJoint::AssMats(), AutomaticStructDispElem::AssRes(), ViscousBody::AssRes(), DynamicMass::AssRes(), DynamicVariableBody::AssRes(), DeformableJoint::AssRes(), ElasticAxialJoint::AssRes(), ElasticDispJoint::AssRes(), StaticMass::AssRes(), AbsoluteForce::AssRes(), ElasticHingeJoint::AssRes(), StaticVariableBody::AssRes(), AutomaticStructElem::AssRes(), FollowerForce::AssRes(), Beam::AssRes(), ElasticDispJointInv::AssRes(), ViscousAxialJoint::AssRes(), AbsoluteCouple::AssRes(), DynamicBody::AssRes(), FollowerCouple::AssRes(), ViscousHingeJoint::AssRes(), ViscousDispJoint::AssRes(), ViscoElasticAxialJoint::AssRes(), ModalBody::AssRes(), StaticBody::AssRes(), AbsoluteInternalForce::AssRes(), ViscoElasticDispJoint::AssRes(), TotalForce::AssRes(), FollowerInternalForce::AssRes(), ViscoElasticHingeJoint::AssRes(), AbsoluteInternalCouple::AssRes(), FollowerInternalCouple::AssRes(), DataManager::DofOwnerInit(), DistanceJoint::InitialAssJac(), LinearVelocityJoint::InitialAssJac(), InLineJoint::InitialAssJac(), UniversalHingeJoint::InitialAssJac(), InPlaneJoint::InitialAssJac(), PrismaticJoint::InitialAssJac(), SphericalHingeJoint::InitialAssJac(), RodBezier::InitialAssJac(), GimbalRotationJoint::InitialAssJac(), PointSurfaceContact::InitialAssJac(), Rod::InitialAssJac(), DriveDisplacementJoint::InitialAssJac(), DriveHingeJoint::InitialAssJac(), PlaneHingeJoint::InitialAssJac(), DynamicVariableBody::InitialAssJac(), ViscousBody::InitialAssJac(), AngularVelocityJoint::InitialAssJac(), InLineWithOffsetJoint::InitialAssJac(), DistanceJointWithOffset::InitialAssJac(), UniversalRotationJoint::InitialAssJac(), PinJoint::InitialAssJac(), TotalEquation::InitialAssJac(), InPlaneWithOffsetJoint::InitialAssJac(), TotalJoint::InitialAssJac(), ViscoElasticRod::InitialAssJac(), ElasticAxialJoint::InitialAssJac(), ElasticDispJoint::InitialAssJac(), AbsoluteForce::InitialAssJac(), ElasticHingeJoint::InitialAssJac(), ElasticJoint::InitialAssJac(), HBeam::InitialAssJac(), DriveDisplacementPinJoint::InitialAssJac(), UniversalPinJoint::InitialAssJac(), PlaneRotationJoint::InitialAssJac(), RodWithOffset::InitialAssJac(), Beam2::InitialAssJac(), FollowerForce::InitialAssJac(), ClampJoint::InitialAssJac(), ElasticDispJointInv::InitialAssJac(), ViscousAxialJoint::InitialAssJac(), ElasticJointInv::InitialAssJac(), TotalReaction::InitialAssJac(), DynamicBody::InitialAssJac(), Beam::InitialAssJac(), FollowerCouple::InitialAssJac(), TotalPinJoint::InitialAssJac(), ViscousHingeJoint::InitialAssJac(), ViscousJoint::InitialAssJac(), ViscousDispJoint::InitialAssJac(), ViscoElasticAxialJoint::InitialAssJac(), AxialRotationJoint::InitialAssJac(), ViscoElasticJoint::InitialAssJac(), AbsoluteInternalForce::InitialAssJac(), TotalForce::InitialAssJac(), ViscoElasticDispJoint::InitialAssJac(), PlanePinJoint::InitialAssJac(), FollowerInternalForce::InitialAssJac(), ViscoElasticHingeJoint::InitialAssJac(), FollowerInternalCouple::InitialAssJac(), AbsoluteDispForce::InitialAssRes(), DistanceJoint::InitialAssRes(), LinearVelocityJoint::InitialAssRes(), InLineJoint::InitialAssRes(), UniversalHingeJoint::InitialAssRes(), InPlaneJoint::InitialAssRes(), PrismaticJoint::InitialAssRes(), SphericalHingeJoint::InitialAssRes(), GimbalRotationJoint::InitialAssRes(), RodBezier::InitialAssRes(), Rod::InitialAssRes(), AbsoluteInternalDispForce::InitialAssRes(), ViscousBody::InitialAssRes(), DriveDisplacementJoint::InitialAssRes(), DriveHingeJoint::InitialAssRes(), PlaneHingeJoint::InitialAssRes(), DynamicVariableBody::InitialAssRes(), AngularVelocityJoint::InitialAssRes(), InLineWithOffsetJoint::InitialAssRes(), DeformableJoint::InitialAssRes(), DistanceJointWithOffset::InitialAssRes(), UniversalRotationJoint::InitialAssRes(), PinJoint::InitialAssRes(), TotalEquation::InitialAssRes(), InPlaneWithOffsetJoint::InitialAssRes(), TotalJoint::InitialAssRes(), ViscoElasticRod::InitialAssRes(), ElasticAxialJoint::InitialAssRes(), ElasticDispJoint::InitialAssRes(), AbsoluteForce::InitialAssRes(), ElasticHingeJoint::InitialAssRes(), HBeam::InitialAssRes(), DriveDisplacementPinJoint::InitialAssRes(), AerodynamicBody::InitialAssRes(), UniversalPinJoint::InitialAssRes(), PlaneRotationJoint::InitialAssRes(), RodWithOffset::InitialAssRes(), Beam2::InitialAssRes(), FollowerForce::InitialAssRes(), ClampJoint::InitialAssRes(), ElasticDispJointInv::InitialAssRes(), ViscousAxialJoint::InitialAssRes(), AbsoluteCouple::InitialAssRes(), TotalReaction::InitialAssRes(), DynamicBody::InitialAssRes(), AerodynamicBeam::InitialAssRes(), Beam::InitialAssRes(), TotalPinJoint::InitialAssRes(), FollowerCouple::InitialAssRes(), ViscousHingeJoint::InitialAssRes(), ViscousDispJoint::InitialAssRes(), ViscoElasticAxialJoint::InitialAssRes(), AxialRotationJoint::InitialAssRes(), AerodynamicBeam2::InitialAssRes(), AbsoluteInternalForce::InitialAssRes(), TotalForce::InitialAssRes(), ViscoElasticDispJoint::InitialAssRes(), PlanePinJoint::InitialAssRes(), FollowerInternalForce::InitialAssRes(), ViscoElasticHingeJoint::InitialAssRes(), AbsoluteInternalCouple::InitialAssRes(), FollowerInternalCouple::InitialAssRes(), and DataManager::InitialJointAssembly().

453 {
455 }
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127

Here is the call graph for this function:

unsigned int StructDispNode::iGetInitialNumDof ( void  ) const
inlinevirtual

Reimplemented in DummyStructNode, and StructNode.

Definition at line 298 of file strnode.h.

Referenced by DataManager::InitialJointAssembly().

299 {
300  return 6;
301 }
unsigned int StructDispNode::iGetNumPrivData ( void  ) const
virtual

Reimplemented from Node.

Reimplemented in StructNode.

Definition at line 804 of file strnode.cc.

References bComputeAccelerations().

805 {
806  unsigned i =
807  3 // X
808  + 3 // x (R^T * X)
809  + 3 // Phi
810  + 3 // XP
811  + 3 // xP (R^T * XP)
812  + 3 // Omega
813  + 3 // omega (R^T * Omega)
814  + 3 // Euler angles (123)
815  + 3 // Euler angles (313)
816  + 3 // Euler angles (321)
817  + 4; // Euler parameters
818 
819  if (bComputeAccelerations()) {
820  i +=
821  3 // XPP
822  + 3 // xPP (R^T * XPP)
823  + 3 // OmegaP
824  + 3; // omegaP (R^T * OmegaP)
825  }
826 
827  return i;
828 }
virtual bool bComputeAccelerations(void) const
Definition: strnode.h:433

Here is the call graph for this function:

unsigned int StructDispNode::iGetPrivDataIdx ( const char *  s) const
virtual

Reimplemented from Node.

Reimplemented in StructNode.

Definition at line 836 of file strnode.cc.

References ComputeAccelerations(), WithLabel::GetLabel(), and MBDYN_EXCEPT_ARGS.

837 {
838  long idx;
839  char *next;
840  std::string sDataName(s);
841 
842  const char *brk = std::strchr(s, '[' /*]*/ );
843  if (brk == 0) {
844  return 0;
845  }
846 
847  size_t len = brk - s;;
848  brk++;
849 
850  errno = 0;
851  idx = strtol(brk, &next, 10);
852  int save_errno = errno;
853  if (next == brk || strcmp(next, /*[*/ "]") != 0) {
854  return 0;
855  }
856 
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);
862  return 0;
863  }
864 
865  /*
866  X 0 + idx idx = {1,3}
867  x 3 + idx idx = {1,3}
868  Phi 6 + idx idx = {1,3}
869  XP 9 + idx idx = {1,3}
870  x 12 + idx idx = {1,3}
871  Omega 15 + idx idx = {1,3}
872  omega 18 + idx idx = {1,3}
873  E | E123 21 + idx idx = {1,3}
874  E313 24 + idx idx = {1,3}
875  E321 27 + idx idx = {1,3}
876  PE 31 + idx idx = {0,3}
877  -------------------------------------------
878  XPP 34 + idx idx = {1,3}
879  xPP 37 + idx idx = {1,3}
880  OmegaP 40 + idx idx = {1,3}
881  omegaP 43 + idx idx = {1,3}
882  */
883 
884  if (strncmp(s, "PE", len) == 0) {
885  if (idx < 0 || idx > 3) {
886  return 0;
887  }
888 
889  return 31 + idx;
890  }
891 
892  if (idx < 1 || idx > 3) {
893  return 0;
894  }
895 
896  if (strncmp(s, "X", len) == 0) {
897  return 0 + idx;
898  }
899 
900  if (strncmp(s, "x", len) == 0) {
901  return 3 + idx;
902  }
903 
904  if (strncmp(s, "Phi", len) == 0) {
905  return 6 + idx;
906  }
907 
908  if (strncmp(s, "XP", len) == 0) {
909  return 9 + idx;
910  }
911 
912  if (strncmp(s, "xP", len) == 0) {
913  return 12 + idx;
914  }
915 
916  if (strncmp(s, "Omega", len) == 0) {
917  return 15 + idx;
918  }
919 
920  if (strncmp(s, "omega", len) == 0) {
921  return 18 + idx;
922  }
923 
924  if (strncmp(s, "E", len) == 0
925  || strncmp(s, "E123", len) == 0)
926  {
927  return 21 + idx;
928  }
929 
930  if (strncmp(s, "E313", len) == 0) {
931  return 24 + idx;
932  }
933 
934  if (strncmp(s, "E321", len) == 0) {
935  return 27 + idx;
936  }
937 
938  bool bca = false;
939  unsigned i;
940  if (strncmp(s, "XPP", len) == 0) {
941  bca = true;
942  i = 34 + idx;
943 
944  } else if (strncmp(s, "xPP", len) == 0) {
945  bca = true;
946  i = 37 + idx;
947 
948  } else if (strncmp(s, "OmegaP", len) == 0) {
949  bca = true;
950  i = 40 + idx;
951 
952  } else if (strncmp(s, "omegaP", len) == 0) {
953  bca = true;
954  i = 43 + idx;
955 
956  } else {
957  // error
958  return 0;
959  }
960 
961  // NOTE: bComputeAccels is set only if iGetPrivDataIdx() is called
962  // first; it is not when the (deprecated) idx is directly used.
963  if (bca) {
964  if (!const_cast<StructDispNode *>(this)->ComputeAccelerations(true)) {
965  silent_cerr("StructNode(" << GetLabel() << "): "
966  "request to compute accelerations failed, requested by private data \"" << sDataName << "\""
967  << std::endl);
969  }
970  }
971 
972  return i;
973 }
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
virtual bool ComputeAccelerations(bool b)
Definition: strnode.cc:194
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

void StructDispNode::InitialUpdate ( const VectorHandler X)
virtual

Reimplemented in DummyStructNode, and StructNode.

Definition at line 594 of file strnode.cc.

References DofOwnerOwner::iGetFirstIndex(), VCurr, and XCurr.

595 {
596  integer iFirstIndex = iGetFirstIndex();
597 
598  XCurr = Vec3(X, iFirstIndex + 1);
599  VCurr = Vec3(X, iFirstIndex + 4);
600 }
Definition: matvec3.h:98
Vec3 VCurr
Definition: strnode.h:93
Vec3 XCurr
Definition: strnode.h:90
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

void StructDispNode::Output ( OutputHandler OH) const
virtual

Reimplemented from ToBeOutput.

Reimplemented in StructNode.

Definition at line 504 of file strnode.cc.

References bOutputAccels, ToBeOutput::bToBeOutput(), EULER_123, EULER_313, EULER_321, Eye3, OutputHandler::GetCurrentStep(), WithLabel::GetLabel(), od, ORIENTATION_MATRIX, ORIENTATION_VECTOR, Mat3x3::pGetMat(), Vec3::pGetVec(), OutputHandler::STRNODES, OutputHandler::StrNodes(), OutputHandler::UseNetCDF(), OutputHandler::UseText(), VCurr, XCurr, XPPCurr, and Zero3.

505 {
506  if (bToBeOutput()) {
507 #ifdef USE_NETCDF
509  Var_X->put_rec(XCurr.pGetVec(), OH.GetCurrentStep());
510  switch (od) {
511  case EULER_123:
512  case EULER_313:
513  case EULER_321:
514  case ORIENTATION_VECTOR:
515  Var_Phi->put_rec(::Zero3.pGetVec(), OH.GetCurrentStep());
516  break;
517 
518  case ORIENTATION_MATRIX:
519  Var_Phi->put_rec(::Eye3.pGetMat(), OH.GetCurrentStep());
520  break;
521 
522  default:
523  /* impossible */
524  break;
525  }
526  Var_XP->put_rec(VCurr.pGetVec(), OH.GetCurrentStep());
527  Var_Omega->put_rec(::Zero3.pGetVec(), OH.GetCurrentStep());
528 
529  if (bOutputAccels) {
530  Var_XPP->put_rec(XPPCurr.pGetVec(), OH.GetCurrentStep());
531  Var_OmegaP->put_rec(::Zero3.pGetVec(), OH.GetCurrentStep());
532  }
533  }
534 #endif /* USE_NETCDF */
535 
537  std::ostream& out = OH.StrNodes();
538  out
539  << std::setw(8) << GetLabel()
540  << " " << XCurr << " ";
541  switch (od) {
542  case EULER_123:
543  case EULER_313:
544  case EULER_321:
545  case ORIENTATION_VECTOR:
546  OH.StrNodes() << ::Zero3;
547  break;
548 
549  case ORIENTATION_MATRIX:
550  OH.StrNodes() << ::Eye3;
551  break;
552 
553  default:
554  /* impossible */
555  break;
556  }
557  OH.StrNodes() << " " << VCurr << " " << ::Zero3;
558 
559  if (bOutputAccels) {
560  out
561  << " " << XPPCurr
562  << " " << ::Zero3;
563  }
564  out << std::endl;
565  }
566  }
567 }
const Vec3 Zero3(0., 0., 0.)
virtual bool bToBeOutput(void) const
Definition: output.cc:890
bool UseNetCDF(int out) const
Definition: output.cc:491
std::ostream & StrNodes(void) const
Definition: output.h:401
const Mat3x3 Eye3(1., 0., 0., 0., 1., 0., 0., 0., 1.)
Vec3 XPPCurr
Definition: strnode.h:95
OrientationDescription od
Definition: strnode.h:111
long GetCurrentStep(void) const
Definition: output.h:116
bool bOutputAccels
Definition: strnode.h:122
const doublereal * pGetMat(void) const
Definition: matvec3.h:743
Vec3 VCurr
Definition: strnode.h:93
const doublereal * pGetVec(void) const
Definition: matvec3.h:192
Vec3 XCurr
Definition: strnode.h:90
unsigned int GetLabel(void) const
Definition: withlab.cc:62
bool UseText(int out) const
Definition: output.cc:446

Here is the call graph for this function:

void StructDispNode::OutputAccelerations ( bool  bOut)
inlinevirtual

Definition at line 445 of file strnode.h.

References bOutputAccels.

446 {
447  bOutputAccels = bOut;
448 }
bool bOutputAccels
Definition: strnode.h:122
void StructDispNode::OutputPrepare ( OutputHandler OH)
virtual

Reimplemented from ToBeOutput.

Reimplemented in StructNode.

Definition at line 445 of file strnode.cc.

References ASSERT, bOutputAccels, ToBeOutput::bToBeOutput(), DYNAMIC, WithLabel::GetLabel(), GetStructDispNodeType(), OutputHandler::IsOpen(), OutputHandler::NETCDF, od, STATIC, OutputHandler::STRNODES, and OutputHandler::UseNetCDF().

446 {
447  if (bToBeOutput()) {
448 #ifdef USE_NETCDF
451 
452  // node
453  const char *type;
454  switch (GetStructDispNodeType()) {
455  case STATIC:
456  type = "static";
457  break;
458 
459  case DYNAMIC:
460  type = "dynamic";
461  break;
462 
463  default:
464  pedantic_cerr("StructDispNode::OutputPrepare(" << GetLabel() << "): "
465  "warning, unknown node type?" << std::endl);
466  type = "unknown";
467  break;
468  }
469 
470  std::ostringstream os;
471  os << "node.struct." << GetLabel();
472  (void)OH.CreateVar(os.str(), type);
473 
474  // node sub-data
475  os << '.';
476  std::string name = os.str();
477 
478  Var_X = OH.CreateVar<Vec3>(name + "X", "m",
479  "global position vector (X, Y, Z)");
480 
481  Var_Phi = OH.CreateRotationVar(name, "", od, "global");
482 
483  Var_XP = OH.CreateVar<Vec3>(name + "XP", "m/s",
484  "global velocity vector (v_X, v_Y, v_Z)");
485 
486  Var_Omega = OH.CreateVar<Vec3>(name + "Omega", "radian/s",
487  "global angular velocity vector (omega_X, omega_Y, omega_Z)");
488 
489  // accelerations
490  if (bOutputAccels) {
491  Var_XPP = OH.CreateVar<Vec3>(name + "XPP", "m/s^2",
492  "global acceleration vector (a_X, a_Y, a_Z)");
493 
494  Var_OmegaP = OH.CreateVar<Vec3>(name + "OmegaP", "radian/s^2",
495  "global angular acceleration vector (omegaP_X, omegaP_Y, omegaP_Z)");
496  }
497  }
498 #endif // USE_NETCDF
499  }
500 }
virtual StructDispNode::Type GetStructDispNodeType(void) const =0
virtual bool bToBeOutput(void) const
Definition: output.cc:890
Definition: matvec3.h:98
bool UseNetCDF(int out) const
Definition: output.cc:491
OrientationDescription od
Definition: strnode.h:111
bool bOutputAccels
Definition: strnode.h:122
bool IsOpen(int out) const
Definition: output.cc:395
#define ASSERT(expression)
Definition: colamd.c:977
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

std::ostream & StructDispNode::Restart ( std::ostream &  out) const
virtual

Implements Node.

Reimplemented in StructNode.

Definition at line 341 of file strnode.cc.

References DofOwner::dGetScale(), dPositionStiffness, dVelocityStiffness, DYNAMIC, WithLabel::GetLabel(), GetStructDispNodeType(), DofOwnerOwner::pGetDofOwner(), STATIC, VCurr, Vec3::Write(), and XCurr.

342 {
343  out << " structural displacement: " << GetLabel() << ", ";
345  out << "dynamic";
347  out << "static";
348  }
349  out << ", reference, global, ";
350  XCurr.Write(out, ", ")
351  << ", reference, global, ",
352  VCurr.Write(out, ", ")
353  << ", assembly, "
354  << dPositionStiffness << ", "
356  << ", scale, " << pGetDofOwner()->dGetScale() << ';' << std::endl;
357 
358  return out;
359 }
doublereal dVelocityStiffness
Definition: strnode.h:115
std::ostream & Write(std::ostream &out, const char *sFill=" ") const
Definition: matvec3.cc:738
virtual StructDispNode::Type GetStructDispNodeType(void) const =0
virtual const DofOwner * pGetDofOwner(void) const
Definition: dofown.h:113
doublereal dGetScale(void) const
Definition: dofown.cc:38
doublereal dPositionStiffness
Definition: strnode.h:114
Vec3 VCurr
Definition: strnode.h:93
Vec3 XCurr
Definition: strnode.h:90
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

void StructDispNode::SetDofValue ( const doublereal dValue,
unsigned int  iDof,
unsigned int  iOrder = 0 
)
virtual

Implements Node.

Reimplemented in DummyStructNode, DynamicStructNode, StructNode, and DynamicStructDispNode.

Definition at line 422 of file strnode.cc.

References ASSERT, WithLabel::GetLabel(), MBDYN_EXCEPT_ARGS, VCurr, and XCurr.

Referenced by DynamicStructDispNode::SetDofValue().

425 {
426  ASSERT(iDof >= 1 && iDof <= 6);
427  ASSERT(iOrder == 0 || iOrder == 1);
428  if (iDof >= 1 && iDof <= 3) {
429  if (iOrder == 0) {
430  XCurr(iDof) = dValue;
431 
432  } else if (iOrder == 1) {
433  VCurr(iDof) = dValue;
434  }
435 
436  } else {
437  silent_cerr("StructDispNode(" << GetLabel() << "): "
438  "required dof " << iDof << " (order " << iOrder << ") "
439  "is not available." << std::endl);
441  }
442 }
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
#define ASSERT(expression)
Definition: colamd.c:977
Vec3 VCurr
Definition: strnode.h:93
Vec3 XCurr
Definition: strnode.h:90
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

void StructDispNode::SetInitialValue ( VectorHandler X)
virtual

Initialize state vector used in initial assembly. May set internal states of the element. Do not rely on being always called, because initial assembly could be implicitly or explicitly skipped

Reimplemented from DofOwnerOwner.

Reimplemented in DummyStructNode, and StructNode.

Definition at line 628 of file strnode.cc.

References DofOwnerOwner::iGetFirstIndex(), VectorHandler::Put(), VCurr, and XCurr.

629 {
630  /* FIXME: why is this called? */
631  integer iIndex = iGetFirstIndex();
632 
633  X.Put(iIndex + 1, XCurr);
634  X.Put(iIndex + 4, VCurr);
635 }
virtual void Put(integer iRow, const Vec3 &v)
Definition: vh.cc:93
Vec3 VCurr
Definition: strnode.h:93
Vec3 XCurr
Definition: strnode.h:90
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

void StructDispNode::SetValue ( DataManager pDM,
VectorHandler X,
VectorHandler XP,
SimulationEntity::Hints ph = 0 
)
virtual

Reimplemented from SimulationEntity.

Reimplemented in DummyStructNode, and StructNode.

Definition at line 639 of file strnode.cc.

References Vec3::Cross(), WithLabel::GetLabel(), StructNode::GetRCurr(), GetVCurr(), StructNode::GetWCurr(), GetXCurr(), DofOwnerOwner::iGetFirstIndex(), Mat3x3::MulTM(), Mat3x3::MulTV(), pRefNode, VectorHandler::Put(), VCurr, VPrev, XCurr, and XPrev.

642 {
643 #ifdef MBDYN_X_RELATIVE_PREDICTION
644  // FIXME
645  if (pRefNode) {
646  Vec3 Xtmp = XPrev - pRefNode->GetXCurr();
647  const Mat3x3& R0 = pRefNode->GetRCurr();
648  const Vec3& V0 = pRefNode->GetVCurr();
649  const Vec3& W0 = pRefNode->GetWCurr();
650 
651  XPrev = R0.MulTV(Xtmp);
652  RPrev = R0.MulTM(RCurr);
653  VPrev = R0.MulTV(VCurr - V0 - W0.Cross(Xtmp));
654  WPrev = R0.MulTV(WCurr - W0);
655 
656 #if 0
657  std::cout << "StructNode(" << GetLabel() << "): "
658  "SetValue: X=" << XPrev
659  << ", R=" << RPrev
660  << ", V=" << VPrev
661  << ", W=" << WPrev
662  << std::endl;
663 #endif
664 
665  } else
666 #endif /* MBDYN_X_RELATIVE_PREDICTION */
667  {
668  /* FIXME: in any case, we start with Crank-Nicolson ... */
669  XPrev = XCurr;
670  VPrev = VCurr;
671  }
672 
673  integer iFirstIndex = iGetFirstIndex();
674  X.Put(iFirstIndex + 1, XPrev);
675  XP.Put(iFirstIndex + 1, VPrev);
676 }
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
Definition: matvec3.h:98
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
Vec3 XPrev
Definition: strnode.h:89
Vec3 MulTV(const Vec3 &v) const
Definition: matvec3.cc:482
const StructNode * pRefNode
Definition: strnode.h:98
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
Mat3x3 MulTM(const Mat3x3 &m) const
Definition: matvec3.cc:500
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
virtual void Put(integer iRow, const Vec3 &v)
Definition: vh.cc:93
Vec3 VCurr
Definition: strnode.h:93
Vec3 XCurr
Definition: strnode.h:90
virtual const Vec3 & GetVCurr(void) const
Definition: strnode.h:322
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
Vec3 VPrev
Definition: strnode.h:92
long int integer
Definition: colamd.c:51
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

void StructDispNode::Update ( const VectorHandler X,
const VectorHandler XP 
)
virtual

Reimplemented from SimulationEntity.

Reimplemented in PivotRelFrameDummyStructNode, RelFrameDummyStructNode, OffsetDummyStructNode, ModalNode, DynamicStructNode, StructNode, and DynamicStructDispNode.

Definition at line 571 of file strnode.cc.

References DofOwnerOwner::iGetFirstIndex(), VCurr, and XCurr.

572 {
573  integer iFirstIndex = iGetFirstIndex();
574 
575  XCurr = Vec3(X, iFirstIndex + 1);
576  VCurr = Vec3(XP, iFirstIndex + 1);
577 }
Definition: matvec3.h:98
Vec3 VCurr
Definition: strnode.h:93
Vec3 XCurr
Definition: strnode.h:90
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

void StructDispNode::Update ( const VectorHandler X,
InverseDynamics::Order  iOrder 
)
virtual

Reimplemented from SimulationEntity.

Reimplemented in StructNode.

Definition at line 604 of file strnode.cc.

References InverseDynamics::ACCELERATION, ASSERT, DofOwnerOwner::iGetFirstIndex(), MBDYN_EXCEPT_ARGS, InverseDynamics::POSITION, VCurr, InverseDynamics::VELOCITY, XCurr, and XPPCurr.

605 {
606  integer iFirstIndex = iGetFirstIndex();
607  switch (iOrder) {
609  XCurr = Vec3(X, iFirstIndex + 1);
610  break;
611 
613  VCurr = Vec3(X, iFirstIndex + 1);
614  break;
615 
617  XPPCurr = Vec3(X, iFirstIndex + 1);
618  break;
619 
620  default:
621  ASSERT(0);
623  }
624 }
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
Definition: matvec3.h:98
Vec3 XPPCurr
Definition: strnode.h:95
#define ASSERT(expression)
Definition: colamd.c:977
Vec3 VCurr
Definition: strnode.h:93
Vec3 XCurr
Definition: strnode.h:90
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

Member Data Documentation

doublereal StructDispNode::dPositionStiffness
protected

Definition at line 114 of file strnode.h.

Referenced by dGetPositionStiffness(), Restart(), and StructNode::Restart().

doublereal StructDispNode::dVelocityStiffness
protected

Definition at line 115 of file strnode.h.

Referenced by dGetVelocityStiffness(), Restart(), and StructNode::Restart().

OrientationDescription StructDispNode::od
protected
const StructNode* StructDispNode::pRefNode
protected
const RigidBodyKinematics* StructDispNode::pRefRBK
protected

Definition at line 118 of file strnode.h.

Referenced by pGetRBK().


The documentation for this class was generated from the following files: