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

#include <strnode.h>

Inheritance diagram for PivotRelFrameDummyStructNode:
Collaboration diagram for PivotRelFrameDummyStructNode:

Public Member Functions

 PivotRelFrameDummyStructNode (unsigned int uL, const DofOwner *pDO, const StructNode *pNode, const StructNode *pNodeRef, const Vec3 &fh, const Mat3x3 &Rh, const StructNode *pNodeRef2, const Vec3 &fh2, const Mat3x3 &Rh2, OrientationDescription ood, flag fOut)
 
virtual ~PivotRelFrameDummyStructNode (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 RelFrameDummyStructNode
 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)
 
- 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 StructNodepNodeRef2
 
const Mat3x3 Rh2
 
const Vec3 fh2
 
- 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 RelFrameDummyStructNode
const StructNodepNodeRef
 
const Mat3x3 RhT
 
const Vec3 fhT
 
- 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 1864 of file strnode.h.

Constructor & Destructor Documentation

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

Definition at line 3846 of file strnode.cc.

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

3857 :
3858 StructDispNode(uL, pDO, ::Zero3, ::Zero3, 0, 0, 0., 0., ood, fOut),
3859 RelFrameDummyStructNode(uL, pDO, pN, pNR, fh, Rh, ood, fOut),
3860 pNodeRef2(pNR2), Rh2(Rh2), fh2(fh2)
3861 {
3862  ASSERT(pNodeRef2 != NULL);
3863 
3864  /*
3865  * Note: Rh is transposed from the beginning because it is
3866  * never used directly;
3867  * fh is premultiplied by Rh.Transpose() for the same reason
3868  *
3869  * Formulas:
3870  *
3871  * R = RhT * RrT * Rn
3872  * X = RhT * RrT * (Xn - Xr)
3873  * W = RhT * RrT * (Wn - Wr)
3874  * V = RhT * RrT * (Vn - Vr - Wr x (Xn - Xr))
3875  *
3876  * by defining
3877  *
3878  * Rn = Rr * Rh * R
3879  * Xn = Xr + Rr * (fh + Rh * X)
3880  *
3881  * and differentiating with respect to time
3882  */
3883 
3884  if (pNode->bOutputAccelerations()
3885  && pNodeRef->bOutputAccelerations()
3886  && pNodeRef2->bOutputAccelerations())
3887  {
3888  bOutputAccels = true;
3889 
3890  } else {
3891  bOutputAccels = false;
3892  }
3893 
3894  /* forzo la ricostruzione del nodo strutturale sottostante */
3895  Update_int();
3896 }
const Vec3 Zero3(0., 0., 0.)
const StructNode * pNodeRef2
Definition: strnode.h:1866
virtual bool bOutputAccelerations(void) const
Definition: strnode.h:439
bool bOutputAccels
Definition: strnode.h:122
#define ASSERT(expression)
Definition: colamd.c:977
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
RelFrameDummyStructNode(unsigned int uL, const DofOwner *pDO, const StructNode *pNode, const StructNode *pNodeRef, const Vec3 &fh, const Mat3x3 &Rh, OrientationDescription ood, flag fOut)
Definition: strnode.cc:3724

Here is the call graph for this function:

PivotRelFrameDummyStructNode::~PivotRelFrameDummyStructNode ( void  )
virtual

Definition at line 3900 of file strnode.cc.

References NO_OP.

3901 {
3902  NO_OP;
3903 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

bool PivotRelFrameDummyStructNode::bComputeAccelerations ( void  ) const
inlinevirtual

Reimplemented from StructDispNode.

Definition at line 1901 of file strnode.h.

Referenced by Update_int().

1902 {
1903  return pNode->bComputeAccelerations()
1906 }
const StructNode * pNodeRef2
Definition: strnode.h:1866
const StructNode * pNode
Definition: strnode.h:1660
const StructNode * pNodeRef
Definition: strnode.h:1823
virtual bool bComputeAccelerations(void) const
Definition: strnode.h:433
bool PivotRelFrameDummyStructNode::ComputeAccelerations ( bool  b)
virtual

Reimplemented from StructDispNode.

Definition at line 3953 of file strnode.cc.

References DummyStructNode::pNode, RelFrameDummyStructNode::pNodeRef, and pNodeRef2.

3954 {
3955  bool ok = true;
3956 
3957  if (!const_cast<StructNode *>(pNode)->ComputeAccelerations(b)) {
3958  ok = false;
3959  }
3960 
3961  if (!const_cast<StructNode *>(pNodeRef)->ComputeAccelerations(b)) {
3962  ok = false;
3963  }
3964 
3965  if (!const_cast<StructNode *>(pNodeRef2)->ComputeAccelerations(b)) {
3966  ok = false;
3967  }
3968 
3969  return ok;
3970 }
virtual bool ComputeAccelerations(bool b)
Definition: strnode.cc:3953
const StructNode * pNodeRef2
Definition: strnode.h:1866
const StructNode * pNode
Definition: strnode.h:1660
const StructNode * pNodeRef
Definition: strnode.h:1823
DummyStructNode::Type PivotRelFrameDummyStructNode::GetDummyType ( void  ) const
virtual

Reimplemented from RelFrameDummyStructNode.

Definition at line 3938 of file strnode.cc.

References DummyStructNode::PIVOTRELATIVEFRAME.

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

Reimplemented from StructDispNode.

Definition at line 3946 of file strnode.cc.

References Update_int().

3948 {
3949  Update_int();
3950 }

Here is the call graph for this function:

void PivotRelFrameDummyStructNode::Update_int ( void  )
protectedvirtual

Reimplemented from RelFrameDummyStructNode.

Definition at line 3908 of file strnode.cc.

References bComputeAccelerations(), Vec3::Cross(), fh2, StructNode::GetRCurr(), StructDispNode::GetVCurr(), StructNode::GetWCurr(), StructNode::GetWPCurr(), StructDispNode::GetXCurr(), StructDispNode::GetXPPCurr(), pNodeRef2, StructNode::RCurr, Rh2, RelFrameDummyStructNode::Update_int(), StructDispNode::VCurr, StructNode::WCurr, StructNode::WPCurr, StructDispNode::XCurr, and StructDispNode::XPPCurr.

Referenced by PivotRelFrameDummyStructNode(), and Update().

3909 {
3911 
3912  Mat3x3 R2(pNodeRef2->GetRCurr()*Rh2);
3913 
3914  XCurr = pNodeRef2->GetRCurr()*(Rh2*XCurr + fh2);
3915 
3916  if (bComputeAccelerations()) {
3918  + pNodeRef2->GetWCurr().Cross(R2*WCurr)
3919  + R2*WPCurr;
3921  + pNodeRef2->GetWPCurr().Cross(XCurr)
3923  + (pNodeRef2->GetWCurr()*2.).Cross(R2*VCurr)
3924  + R2*XPPCurr;
3925  }
3926 
3927  WCurr = pNodeRef2->GetWCurr() + R2*WCurr;
3928  VCurr = pNodeRef2->GetVCurr()
3929  + pNodeRef2->GetWCurr().Cross(XCurr)
3930  + R2*VCurr;
3931  RCurr = R2*RCurr;
3932  XCurr += pNodeRef2->GetXCurr();
3933 }
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
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
virtual bool bComputeAccelerations(void) const
Definition: strnode.h:1901
const StructNode * pNodeRef2
Definition: strnode.h:1866
Vec3 WCurr
Definition: strnode.h:747
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
virtual const Vec3 & GetXPPCurr(void) const
Definition: strnode.h:334

Here is the call graph for this function:

Member Data Documentation

const Vec3 PivotRelFrameDummyStructNode::fh2
protected

Definition at line 1868 of file strnode.h.

Referenced by Update_int().

const StructNode* PivotRelFrameDummyStructNode::pNodeRef2
protected

Definition at line 1866 of file strnode.h.

Referenced by ComputeAccelerations(), PivotRelFrameDummyStructNode(), and Update_int().

const Mat3x3 PivotRelFrameDummyStructNode::Rh2
protected

Definition at line 1867 of file strnode.h.

Referenced by Update_int().


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