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

#include <strnode.h>

Inheritance diagram for RelFrameDummyStructNode:
Collaboration diagram for RelFrameDummyStructNode:

Public Member Functions

 RelFrameDummyStructNode (unsigned int uL, const DofOwner *pDO, const StructNode *pNode, const StructNode *pNodeRef, const Vec3 &fh, const Mat3x3 &Rh, OrientationDescription ood, flag fOut)
 
virtual ~RelFrameDummyStructNode (void)
 
virtual DummyStructNode::Type GetDummyType (void) const
 
virtual void Update (const VectorHandler &X, const VectorHandler &XP)
 
virtual bool bComputeAccelerations (void) const
 
virtual bool ComputeAccelerations (bool b)
 
- Public Member Functions inherited from 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)
 
virtual ~StructDispNode (void)
 
virtual Node::Type GetNodeType (void) const
 
const RigidBodyKinematicspGetRBK (void) const
 
const Vec3GetX (void) const
 
const Vec3GetV (void) const
 
const Vec3GetXPP (void) const
 
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 bOutputAccelerations (void) const
 
virtual void OutputAccelerations (bool bOut)
 
- 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 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)
 
- Public Member Functions inherited from DummyStructNode
 DummyStructNode (unsigned int uL, const DofOwner *pDO, const StructNode *pNode, OrientationDescription ood, flag fOut)
 
virtual ~DummyStructNode (void)
 
virtual StructDispNode::Type GetStructDispNodeType (void) const
 
virtual unsigned int iGetNumDof (void) 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 StructNode::Type GetStructNodeType (void) const
 
virtual unsigned int iGetInitialNumDof (void) const
 
virtual integer iGetFirstPositionIndex (void) const
 
virtual integer iGetFirstMomentumIndex (void) const
 
virtual void DerivativesUpdate (const VectorHandler &X, const VectorHandler &XP)
 
virtual void InitialUpdate (const VectorHandler &X)
 
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)
 
- Public Member Functions inherited from StructNode
 StructNode (unsigned int uL, const DofOwner *pDO, const Vec3 &X0, const Mat3x3 &R0, const Vec3 &V0, const Vec3 &W0, const StructNode *pRN, const RigidBodyKinematics *pRBK, doublereal dPosStiff, doublereal dVelStiff, bool bOmRot, OrientationDescription ood, flag fOut)
 
virtual ~StructNode (void)
 
const Mat3x3GetR (void) const
 
const Vec3GetW (void) const
 
const Vec3GetWP (void) const
 
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 Vec3GetgRef (void) const
 
virtual const Vec3GetgCurr (void) const
 
virtual const Vec3GetgPRef (void) const
 
virtual const Vec3GetgPCurr (void) const
 
virtual const Mat3x3GetRPrev (void) const
 
virtual const Mat3x3GetRRef (void) const
 
virtual const Mat3x3GetRCurr (void) const
 
virtual const Vec3GetWPrev (void) const
 
virtual const Vec3GetWRef (void) const
 
virtual const Vec3GetWCurr (void) const
 
virtual const Vec3GetWPCurr (void) const
 
virtual const Vec3GetWPPrev (void) const
 
virtual bool bOmegaRotates (void) const
 
virtual void OutputPrepare (OutputHandler &OH)
 
virtual void Output (OutputHandler &OH) const
 
void Update (const VectorHandler &X, 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
 

Protected Member Functions

void Update_int (void)
 

Protected Attributes

const StructNodepNodeRef
 
const Mat3x3 RhT
 
const Vec3 fhT
 
- Protected Attributes inherited from StructDispNode
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
 
- Protected Attributes inherited from DummyStructNode
const StructNodepNode
 
- Protected Attributes inherited from StructNode
Mat3x3 RPrev
 
Mat3x3 RRef
 
Mat3x3 RCurr
 
Vec3 gRef
 
Vec3 gCurr
 
Vec3 gPRef
 
Vec3 gPCurr
 
Vec3 WPrev
 
Vec3 WRef
 
Vec3 WCurr
 
Vec3 WPCurr
 
Vec3 WPPrev
 
bool bOmegaRot
 

Additional Inherited Members

- Public Types inherited from StructDispNode
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 Types inherited from DummyStructNode
enum  Type {
  UNKNOWN = -1, OFFSET = 0, RELATIVEFRAME, PIVOTRELATIVEFRAME,
  LASTTYPE
}
 
- Public Types inherited from StructNode
enum  Type {
  UNKNOWN = -1, DYNAMIC = 0, STATIC, MODAL,
  DUMMY, LASTSTRUCTNODETYPE
}
 

Detailed Description

Definition at line 1821 of file strnode.h.

Constructor & Destructor Documentation

RelFrameDummyStructNode::RelFrameDummyStructNode ( unsigned int  uL,
const DofOwner pDO,
const StructNode pNode,
const StructNode pNodeRef,
const Vec3 fh,
const Mat3x3 Rh,
OrientationDescription  ood,
flag  fOut 
)

Definition at line 3724 of file strnode.cc.

References ASSERT, StructDispNode::bOutputAccelerations(), StructDispNode::bOutputAccels, DummyStructNode::pNode, pNodeRef, and Update_int().

3732 :
3733 StructDispNode(uL, pDO, ::Zero3, ::Zero3, 0, 0, 0., 0., ood, fOut),
3734 DummyStructNode(uL, pDO, pN, ood, fOut),
3735 pNodeRef(pNR),
3736 RhT(Rh.Transpose()),
3737 fhT(RhT*fh)
3738 {
3739  ASSERT(pNodeRef != NULL);
3740 
3741  /*
3742  * Note: Rh is transposed from the beginning because it is
3743  * never used directly;
3744  * fh is premultiplied by Rh.Transpose() for the same reason
3745  *
3746  * Formulas:
3747  *
3748  * R = RhT * RrT * Rn
3749  * X = RhT * RrT * (Xn - Xr)
3750  * W = RhT * RrT * (Wn - Wr)
3751  * V = RhT * RrT * (Vn - Vr - Wr x (Xn - Xr))
3752  *
3753  * by defining
3754  *
3755  * Rn = Rr * Rh * R
3756  * Xn = Xr + Rr * (fh + Rh * X)
3757  *
3758  * and differentiating with respect to time
3759  */
3760 
3761  if (pNode->bOutputAccelerations()
3762  && pNodeRef->bOutputAccelerations())
3763  {
3764  bOutputAccels = true;
3765 
3766  } else {
3767  bOutputAccels = false;
3768  }
3769 
3770  /* forzo la ricostruzione del nodo strutturale sottostante */
3771  Update_int();
3772 }
const Vec3 Zero3(0., 0., 0.)
virtual bool bOutputAccelerations(void) const
Definition: strnode.h:439
DummyStructNode(unsigned int uL, const DofOwner *pDO, const StructNode *pNode, OrientationDescription ood, flag fOut)
Definition: strnode.cc:3516
const StructNode * pNodeRef
Definition: strnode.h:1823
bool bOutputAccels
Definition: strnode.h:122
#define ASSERT(expression)
Definition: colamd.c:977
Mat3x3 Transpose(void) const
Definition: matvec3.h:816
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: strnode.cc:102
const Mat3x3 RhT
Definition: strnode.h:1824

Here is the call graph for this function:

RelFrameDummyStructNode::~RelFrameDummyStructNode ( void  )
virtual

Definition at line 3776 of file strnode.cc.

References NO_OP.

3777 {
3778  NO_OP;
3779 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

bool RelFrameDummyStructNode::bComputeAccelerations ( void  ) const
inlinevirtual

Reimplemented from StructDispNode.

Reimplemented in PivotRelFrameDummyStructNode.

Definition at line 1855 of file strnode.h.

Referenced by Update_int().

1856 {
1858 }
const StructNode * pNode
Definition: strnode.h:1660
const StructNode * pNodeRef
Definition: strnode.h:1823
virtual bool bComputeAccelerations(void) const
Definition: strnode.h:433
bool RelFrameDummyStructNode::ComputeAccelerations ( bool  b)
virtual

Reimplemented from StructDispNode.

Reimplemented in PivotRelFrameDummyStructNode.

Definition at line 3825 of file strnode.cc.

References DummyStructNode::pNode, and pNodeRef.

3826 {
3827  bool ok = true;
3828 
3829  if (!const_cast<StructNode *>(pNode)->ComputeAccelerations(b)) {
3830  ok = false;
3831  }
3832 
3833  if (!const_cast<StructNode *>(pNodeRef)->ComputeAccelerations(b)) {
3834  ok = false;
3835  }
3836 
3837  return ok;
3838 }
const StructNode * pNode
Definition: strnode.h:1660
const StructNode * pNodeRef
Definition: strnode.h:1823
virtual bool ComputeAccelerations(bool b)
Definition: strnode.cc:3825
DummyStructNode::Type RelFrameDummyStructNode::GetDummyType ( void  ) const
virtual

Implements DummyStructNode.

Reimplemented in PivotRelFrameDummyStructNode.

Definition at line 3810 of file strnode.cc.

References DummyStructNode::RELATIVEFRAME.

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

Reimplemented from StructDispNode.

Reimplemented in PivotRelFrameDummyStructNode.

Definition at line 3818 of file strnode.cc.

References Update_int().

3820 {
3821  Update_int();
3822 }

Here is the call graph for this function:

void RelFrameDummyStructNode::Update_int ( void  )
protectedvirtual

Implements DummyStructNode.

Reimplemented in PivotRelFrameDummyStructNode.

Definition at line 3784 of file strnode.cc.

References bComputeAccelerations(), Vec3::Cross(), fhT, StructNode::GetRCurr(), StructDispNode::GetVCurr(), StructNode::GetWCurr(), StructNode::GetWPCurr(), StructDispNode::GetXCurr(), StructDispNode::GetXPPCurr(), Mat3x3::MulMT(), DummyStructNode::pNode, pNodeRef, StructNode::RCurr, RhT, StructDispNode::VCurr, StructNode::WCurr, StructNode::WPCurr, StructDispNode::XCurr, and StructDispNode::XPPCurr.

Referenced by RelFrameDummyStructNode(), Update(), and PivotRelFrameDummyStructNode::Update_int().

3785 {
3786  Mat3x3 RT(RhT.MulMT(pNodeRef->GetRCurr()));
3787  Vec3 XRel(pNode->GetXCurr() - pNodeRef->GetXCurr());
3788 
3789  RCurr = RT*pNode->GetRCurr();
3790  XCurr = RT*XRel - fhT;
3791  WCurr = RT*(pNode->GetWCurr() - pNodeRef->GetWCurr());
3792 
3793  VCurr = RT*(pNode->GetVCurr()
3794  - pNodeRef->GetVCurr()
3795  - pNodeRef->GetWCurr().Cross(XRel));
3796 
3797  if (bComputeAccelerations()) {
3798  WPCurr = RT*(pNode->GetWPCurr() - pNodeRef->GetWPCurr()
3799  - pNodeRef->GetWCurr().Cross(pNode->GetWCurr()));
3801  - pNodeRef->GetWPCurr().Cross(XRel)
3803  + pNodeRef->GetWCurr().Cross(pNodeRef->GetWCurr().Cross(XRel)));
3804  }
3805 }
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
Definition: matvec3.h:98
virtual bool bComputeAccelerations(void) const
Definition: strnode.h:1855
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
Vec3 WPCurr
Definition: strnode.h:749
Vec3 XPPCurr
Definition: strnode.h:95
Mat3x3 RCurr
Definition: strnode.h:730
Vec3 WCurr
Definition: strnode.h:747
const StructNode * pNode
Definition: strnode.h:1660
const StructNode * pNodeRef
Definition: strnode.h:1823
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
virtual const Vec3 & GetWPCurr(void) const
Definition: strnode.h:1042
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
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 const Vec3 & GetXPPCurr(void) const
Definition: strnode.h:334
const Mat3x3 RhT
Definition: strnode.h:1824

Here is the call graph for this function:

Member Data Documentation

const Vec3 RelFrameDummyStructNode::fhT
protected

Definition at line 1825 of file strnode.h.

Referenced by Update_int().

const Mat3x3 RelFrameDummyStructNode::RhT
protected

Definition at line 1824 of file strnode.h.

Referenced by Update_int().


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