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

#include <joint.h>

Inheritance diagram for Joint:
Collaboration diagram for Joint:

Classes

struct  AccelerationDriveHint
 
struct  AngularAccelerationDriveHint
 
struct  AngularVelocityDriveHint
 
class  ErrGeneric
 
struct  ForcesHint
 
struct  HingeHint
 
struct  JointDriveHint
 
struct  JointHint
 
struct  MomentsHint
 
struct  OffsetHint
 
struct  OrientationDriveHint
 
struct  OrientationHingeHint
 
struct  PositionDriveHint
 
struct  PositionHingeHint
 
struct  ReactionsHint
 
struct  VelocityDriveHint
 

Public Types

enum  Type {
  UNKNOWN = -1, DISTANCE = 0, DISTANCEWITHOFFSET, CLAMP,
  SPHERICALHINGE, PIN, UNIVERSALHINGE, UNIVERSALROTATION,
  UNIVERSALPIN, PLANEHINGE, PLANEROTATION, PLANEPIN,
  AXIALROTATION, PLANEDISP, PLANEDISPPIN, INPLANE,
  INPLANECONTACT, J_INLINE, ROD, RODBEZIER,
  DEFORMABLEHINGE, DEFORMABLEDISPJOINT, DEFORMABLEJOINT, DEFORMABLEAXIALJOINT,
  VISCOUSBODY, LINEARVELOCITY, ANGULARVELOCITY, LINEARACCELERATION,
  ANGULARACCELERATION, PRISMATIC, DRIVEHINGE, DRIVEDISP,
  DRIVEDISPPIN, IMPOSEDORIENTATION, IMPOSEDDISP, IMPOSEDDISPPIN,
  IMPOSEDKINEMATICS, BEAMSLIDER, BRAKE, GIMBAL,
  POINT_SURFACE_CONTACT, TOTALJOINT, TOTALPINJOINT, TOTALEQUATION,
  TOTALREACTION, MODAL, SCREWJOINT, LASTJOINTTYPE
}
 
- Public Types inherited from Elem
enum  Type {
  UNKNOWN = -1, AIRPROPERTIES = 0, INDUCEDVELOCITY, AUTOMATICSTRUCTURAL,
  GRAVITY, BODY, JOINT, JOINT_REGULARIZATION,
  BEAM, PLATE, FORCE, INERTIA,
  ELECTRICBULK, ELECTRIC, THERMAL, HYDRAULIC,
  BULK, LOADABLE, DRIVEN, EXTERNAL,
  AEROMODAL, AERODYNAMIC, GENEL, SOCKETSTREAM_OUTPUT,
  RTAI_OUTPUT = SOCKETSTREAM_OUTPUT, LASTELEMTYPE
}
 
- 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

 Joint (unsigned int uL, const DofOwner *pD, flag fOut)
 
virtual ~Joint (void)
 
virtual Elem::Type GetElemType (void) const
 
virtual Joint::Type GetJointType (void) const =0
 
virtual std::ostream & Restart (std::ostream &out) const
 
std::ostream & Output (std::ostream &out, const char *sJointName, unsigned int uLabel, const Vec3 &FLocal, const Vec3 &MLocal, const Vec3 &FGlobal, const Vec3 &MGlobal) const
 
virtual void SetInitialValue (VectorHandler &)
 
virtual void SetValue (DataManager *pDM, VectorHandler &, VectorHandler &, SimulationEntity::Hints *ph=0)
 
virtual void Update (const VectorHandler &XCurr, InverseDynamics::Order iOrder=InverseDynamics::INVERSE_DYNAMICS)
 
bool bIsPrescribedMotion (void) const
 
bool bIsTorque (void) const
 
- Public Member Functions inherited from Elem
 Elem (unsigned int uL, flag fOut)
 
virtual ~Elem (void)
 
virtual unsigned int iGetNumDof (void) const
 
virtual std::ostream & DescribeDof (std::ostream &out, const char *prefix="", bool bInitial=false) const
 
virtual void DescribeDof (std::vector< std::string > &desc, bool bInitial=false, int i=-1) const
 
virtual std::ostream & DescribeEq (std::ostream &out, const char *prefix="", bool bInitial=false) const
 
virtual void DescribeEq (std::vector< std::string > &desc, bool bInitial=false, int i=-1) const
 
virtual DofOrder::Order GetDofType (unsigned int) const
 
virtual void WorkSpaceDim (integer *piNumRows, integer *piNumCols) const =0
 
virtual void AssMats (VariableSubMatrixHandler &WorkMatA, VariableSubMatrixHandler &WorkMatB, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual SubVectorHandlerAssRes (SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)=0
 
virtual VariableSubMatrixHandlerAssJac (VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)=0
 
virtual bool bInverseDynamics (void) const
 
void SetInverseDynamicsFlags (unsigned uIDF)
 
unsigned GetInverseDynamicsFlags (void) const
 
bool bIsErgonomy (void) const
 
bool bIsRightHandSide (void) const
 
virtual VariableSubMatrixHandlerAssJac (VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
 
virtual SubVectorHandlerAssRes (SubVectorHandler &WorkVec, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr, const VectorHandler &XPrimePrimeCurr, InverseDynamics::Order iOrder=InverseDynamics::INVERSE_DYNAMICS)
 
virtual int GetNumConnectedNodes (void) const
 
virtual void GetConnectedNodes (std::vector< const Node * > &connectedNodes) 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 BeforePredict (VectorHandler &, VectorHandler &, VectorHandler &, VectorHandler &) const
 
virtual void AfterPredict (VectorHandler &X, VectorHandler &XP)
 
virtual void Update (const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual void DerivativesUpdate (const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual void AfterConvergence (const VectorHandler &X, const 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
 
virtual std::ostream & OutputAppend (std::ostream &out) const
 
virtual void ReadInitialState (MBDynParser &HP)
 
- Public Member Functions inherited from ToBeOutput
 ToBeOutput (flag fOut=fDefaultOut)
 
virtual ~ToBeOutput (void)
 
virtual void OutputPrepare (OutputHandler &OH)
 
virtual void Output (OutputHandler &OH) const
 
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 ElemGravityOwner
 ElemGravityOwner (unsigned int uL, flag fOut)
 
virtual ~ElemGravityOwner (void)
 
virtual doublereal dGetM (void) const
 
Vec3 GetS (void) const
 
Mat3x3 GetJ (void) const
 
Vec3 GetB (void) const
 
Vec3 GetG (void) const
 
- Public Member Functions inherited from GravityOwner
 GravityOwner (void)
 
virtual ~GravityOwner (void)
 
void PutGravity (const Gravity *pG)
 
virtual bool bGetGravity (const Vec3 &X, Vec3 &Acc) const
 
- Public Member Functions inherited from ElemWithDofs
 ElemWithDofs (unsigned int uL, const DofOwner *pDO, flag fOut)
 
virtual ~ElemWithDofs (void)
 
- 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 InitialAssemblyElem
 InitialAssemblyElem (unsigned int uL, flag fOut)
 
virtual ~InitialAssemblyElem (void)
 
- Public Member Functions inherited from SubjectToInitialAssembly
 SubjectToInitialAssembly (void)
 
virtual ~SubjectToInitialAssembly (void)
 
virtual unsigned int iGetInitialNumDof (void) const =0
 
virtual void InitialWorkSpaceDim (integer *piNumRows, integer *piNumCols) const =0
 
virtual VariableSubMatrixHandlerInitialAssJac (VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)=0
 
virtual SubVectorHandlerInitialAssRes (SubVectorHandler &WorkVec, const VectorHandler &XCurr)=0
 

Protected Member Functions

virtual void OutputPrepare_int (const std::string &type, OutputHandler &OH, std::string &name)
 
- Protected Member Functions inherited from ElemGravityOwner
virtual Vec3 GetS_int (void) const
 
virtual Mat3x3 GetJ_int (void) const
 
virtual Vec3 GetB_int (void) const
 
virtual Vec3 GetG_int (void) const
 

Friends

JointReadModal (DataManager *pDM, MBDynParser &HP, const DofOwner *pD0, unsigned int uLabel, const StructNode *pModalNode)
 

Additional Inherited Members

- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 
- Protected Attributes inherited from ToBeOutput
flag fOutput
 
- Protected Attributes inherited from GravityOwner
GravitypGravity
 

Detailed Description

Definition at line 50 of file joint.h.

Member Enumeration Documentation

Enumerator
UNKNOWN 
DISTANCE 
DISTANCEWITHOFFSET 
CLAMP 
SPHERICALHINGE 
PIN 
UNIVERSALHINGE 
UNIVERSALROTATION 
UNIVERSALPIN 
PLANEHINGE 
PLANEROTATION 
PLANEPIN 
AXIALROTATION 
PLANEDISP 
PLANEDISPPIN 
INPLANE 
INPLANECONTACT 
J_INLINE 
ROD 
RODBEZIER 
DEFORMABLEHINGE 
DEFORMABLEDISPJOINT 
DEFORMABLEJOINT 
DEFORMABLEAXIALJOINT 
VISCOUSBODY 
LINEARVELOCITY 
ANGULARVELOCITY 
LINEARACCELERATION 
ANGULARACCELERATION 
PRISMATIC 
DRIVEHINGE 
DRIVEDISP 
DRIVEDISPPIN 
IMPOSEDORIENTATION 
IMPOSEDDISP 
IMPOSEDDISPPIN 
IMPOSEDKINEMATICS 
BEAMSLIDER 
BRAKE 
GIMBAL 
POINT_SURFACE_CONTACT 
TOTALJOINT 
TOTALPINJOINT 
TOTALEQUATION 
TOTALREACTION 
MODAL 
SCREWJOINT 
LASTJOINTTYPE 

Definition at line 66 of file joint.h.

66  {
67  UNKNOWN = -1,
68 
69  DISTANCE = 0,
71  CLAMP,
73  PIN,
77  PLANEHINGE,
79  PLANEPIN,
81  PLANEDISP,
83  INPLANE,
85  J_INLINE,
86  ROD,
87  RODBEZIER,
97  PRISMATIC,
98  DRIVEHINGE,
99  DRIVEDISP,
100  DRIVEDISPPIN,
102  IMPOSEDDISP,
105  BEAMSLIDER,
106  BRAKE,
107  GIMBAL,
109  TOTALJOINT,
113 
114  MODAL,
115  SCREWJOINT,
116 
118  };

Constructor & Destructor Documentation

Joint::Joint ( unsigned int  uL,
const DofOwner pD,
flag  fOut 
)

Definition at line 83 of file joint.cc.

References NO_OP.

85 : Elem(uL, fOut),
86 ElemGravityOwner(uL, fOut),
87 ElemWithDofs(uL, pDO, fOut),
88 InitialAssemblyElem(uL, fOut)
89 #ifdef USE_NETCDF
90 ,
91 Var_F_local(0),
92 Var_M_local(0),
93 Var_F_global(0),
94 Var_M_global(0)
95 #endif // USE_NETCDF
96 {
97  NO_OP;
98 }
ElemWithDofs(unsigned int uL, const DofOwner *pDO, flag fOut)
Definition: elem.cc:200
ElemGravityOwner(unsigned int uL, flag fOut)
Definition: gravity.cc:223
#define NO_OP
Definition: myassert.h:74
InitialAssemblyElem(unsigned int uL, flag fOut)
Definition: elem.cc:233
Elem(unsigned int uL, flag fOut)
Definition: elem.cc:41
Joint::~Joint ( void  )
virtual

Definition at line 100 of file joint.cc.

References NO_OP.

101 {
102  NO_OP;
103 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

bool Joint::bIsPrescribedMotion ( void  ) const

Definition at line 170 of file joint.cc.

References Elem::GetInverseDynamicsFlags(), and InverseDynamics::PRESCRIBED_MOTION.

Referenced by DataManager::AssConstrJac(), DataManager::AssConstrRes(), DataManager::IDDofInit(), and DataManager::IDSetTest().

171 {
173 }
unsigned GetInverseDynamicsFlags(void) const
Definition: elem.cc:77

Here is the call graph for this function:

bool Joint::bIsTorque ( void  ) const

Definition at line 176 of file joint.cc.

References Elem::GetInverseDynamicsFlags(), and InverseDynamics::TORQUE.

Referenced by DataManager::AssConstrJac(), DataManager::AssConstrRes(), DataManager::IDDofInit(), and DataManager::IDSetTest().

177 {
179 }
unsigned GetInverseDynamicsFlags(void) const
Definition: elem.cc:77

Here is the call graph for this function:

virtual Elem::Type Joint::GetElemType ( void  ) const
inlinevirtual

Implements Elem.

Definition at line 187 of file joint.h.

References Elem::JOINT.

Referenced by Update().

187  {
188  return Elem::JOINT;
189  };
std::ostream & Joint::Output ( std::ostream &  out,
const char *  sJointName,
unsigned int  uLabel,
const Vec3 FLocal,
const Vec3 MLocal,
const Vec3 FGlobal,
const Vec3 MGlobal 
) const

Definition at line 138 of file joint.cc.

References ASSERT.

Referenced by GimbalRotationJoint::Output(), LinearAccelerationJoint::Output(), DriveDisplacementJoint::Output(), DriveHingeJoint::Output(), ViscousBody::Output(), LinearVelocityJoint::Output(), InLineJoint::Output(), DistanceJoint::Output(), UniversalHingeJoint::Output(), PrismaticJoint::Output(), SphericalHingeJoint::Output(), DeformableAxialJoint::Output(), InPlaneJoint::Output(), DeformableDispJoint::Output(), RodBezier::Output(), DeformableHingeJoint::Output(), DeformableJoint::Output(), Rod::Output(), Brake::Output(), AngularAccelerationJoint::Output(), PlaneHingeJoint::Output(), BeamSliderJoint::Output(), AngularVelocityJoint::Output(), InLineWithOffsetJoint::Output(), ContactJoint::Output(), DistanceJointWithOffset::Output(), UniversalRotationJoint::Output(), PinJoint::Output(), TotalEquation::Output(), InPlaneWithOffsetJoint::Output(), TotalJoint::Output(), DriveDisplacementPinJoint::Output(), UniversalPinJoint::Output(), PlaneRotationJoint::Output(), ClampJoint::Output(), TotalReaction::Output(), TotalPinJoint::Output(), AxialRotationJoint::Output(), PlanePinJoint::Output(), and DeformableHingeJoint::OutputInv().

142 {
143 #if 0
144  /* Modificare le dimensioni del campo per il nome in base
145  * ai nomi dei vincoli futuri */
146  ASSERT(strlen(sJointName) <= 16);
147 
148  /* Nota: non c'e' *std::endl* perche' i vincoli possono aggiungere outut
149  * ulteriore a quello comune a tutti */
150  return out << sJointName << std::setw(16+8-strlen(sJointName)) << uLabel << " "
151  << FLocal << " " << MLocal << " " << FGlobal << " " << MGlobal;
152 #endif
153 
154  return out
155  << std::setw(8) << uLabel
156  << " " << FLocal << " " << MLocal
157  << " " << FGlobal << " " << MGlobal;
158 }
unsigned int uLabel
Definition: withlab.h:44
#define ASSERT(expression)
Definition: colamd.c:977
void Joint::OutputPrepare_int ( const std::string &  type,
OutputHandler OH,
std::string &  name 
)
protectedvirtual

Definition at line 107 of file joint.cc.

References ASSERT, WithLabel::GetLabel(), OutputHandler::IsOpen(), and OutputHandler::NETCDF.

Referenced by InLineJoint::OutputPrepare(), PrismaticJoint::OutputPrepare(), SphericalHingeJoint::OutputPrepare(), DeformableDispJoint::OutputPrepare(), DeformableHingeJoint::OutputPrepare(), DeformableJoint::OutputPrepare(), Rod::OutputPrepare(), PlaneHingeJoint::OutputPrepare(), UniversalRotationJoint::OutputPrepare(), TotalJoint::OutputPrepare(), PlaneRotationJoint::OutputPrepare(), TotalPinJoint::OutputPrepare(), and AxialRotationJoint::OutputPrepare().

108 {
109 #ifdef USE_NETCDF
111 
112  std::ostringstream os;
113  os << "elem.joint." << GetLabel();
114  (void)OH.CreateVar(os.str(), type);
115 
116  // joint sub-data
117  os << '.';
118  name = os.str();
119 
120  Var_F_local = OH.CreateVar<Vec3>(name + "f", "N",
121  "local reaction force (Fx, Fy, Fz)");
122 
123  Var_M_local = OH.CreateVar<Vec3>(name + "m", "Nm",
124  "local reaction moment (Mx, My, Mz)");
125 
126  Var_F_global = OH.CreateVar<Vec3>(name + "F", "N",
127  "global reaction force (FX, FY, FZ)");
128 
129  Var_M_global = OH.CreateVar<Vec3>(name + "M", "Nm",
130  "global reaction moment (MX, MY, MZ)");
131 
132  // elements can add further data
133 #endif // USE_NETCDF
134 }
Definition: matvec3.h:98
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:

virtual std::ostream& Joint::Restart ( std::ostream &  out) const
inlinevirtual

Implements Elem.

Reimplemented in PlanePinJoint, AxialRotationJoint, TotalPinJoint, TotalReaction, RodWithOffset, Modal, ClampJoint, UniversalPinJoint, PlaneRotationJoint, DriveDisplacementPinJoint, InPlaneWithOffsetJoint, PinJoint, UniversalRotationJoint, DistanceJointWithOffset, AngularVelocityJoint, InLineWithOffsetJoint, AngularAccelerationJoint, BeamSliderJoint, DeformableJoint, TotalJoint, DeformableHingeJoint, TotalEquation, DeformableDispJoint, Brake, PlaneHingeJoint, DeformableAxialJoint, Rod, PointSurfaceContact, RodBezier, DriveHingeJoint, ViscousBody, DriveDisplacementJoint, GimbalRotationJoint, InPlaneJoint, InPlaneContactJoint, SphericalHingeJoint, UniversalHingeJoint, LinearVelocityJoint, PrismaticJoint, LinearAccelerationJoint, DistanceJoint, and InLineJoint.

Definition at line 195 of file joint.h.

References WithLabel::GetLabel().

Referenced by InLineJoint::Restart(), DistanceJoint::Restart(), PrismaticJoint::Restart(), LinearVelocityJoint::Restart(), UniversalHingeJoint::Restart(), SphericalHingeJoint::Restart(), InPlaneJoint::Restart(), GimbalRotationJoint::Restart(), DriveDisplacementJoint::Restart(), ViscousBody::Restart(), DriveHingeJoint::Restart(), RodBezier::Restart(), Rod::Restart(), DeformableAxialJoint::Restart(), Brake::Restart(), PlaneHingeJoint::Restart(), DeformableDispJoint::Restart(), TotalEquation::Restart(), DeformableHingeJoint::Restart(), TotalJoint::Restart(), DeformableJoint::Restart(), InLineWithOffsetJoint::Restart(), AngularVelocityJoint::Restart(), DistanceJointWithOffset::Restart(), UniversalRotationJoint::Restart(), PinJoint::Restart(), InPlaneWithOffsetJoint::Restart(), DriveDisplacementPinJoint::Restart(), PlaneRotationJoint::Restart(), ClampJoint::Restart(), UniversalPinJoint::Restart(), RodWithOffset::Restart(), TotalReaction::Restart(), TotalPinJoint::Restart(), AxialRotationJoint::Restart(), and PlanePinJoint::Restart().

195  {
196  return out << " joint: " << GetLabel();
197  };
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

virtual void Joint::SetInitialValue ( VectorHandler X)
inlinevirtual

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 Modal, InPlaneWithOffsetJoint, ContactJoint, DistanceJointWithOffset, DeformableHingeJoint, InPlaneJoint, InPlaneContactJoint, DistanceJoint, and DeformableAxialJoint.

Definition at line 209 of file joint.h.

References NO_OP.

209  {
210  NO_OP;
211  };
#define NO_OP
Definition: myassert.h:74
void Joint::Update ( const VectorHandler XCurr,
InverseDynamics::Order  iOrder = InverseDynamics::INVERSE_DYNAMICS 
)
virtual

Reimplemented from SimulationEntity.

Reimplemented in ViscoElasticDispJoint, ViscousDispJoint, TotalPinJoint, ClampJoint, ElasticJoint, ElasticHingeJoint, ElasticDispJoint, ElasticAxialJoint, TotalJoint, Rod, and RodBezier.

Definition at line 163 of file joint.cc.

References GetElemType(), WithLabel::GetLabel(), invdyn2str(), and psElemNames.

Referenced by ViscousDispJoint::Update(), and ViscoElasticDispJoint::Update().

164 {
165  silent_cerr(psElemNames[GetElemType()] << "(" << GetLabel() << "): "
166  "Elem::Update(" << invdyn2str(iOrder) << ") for inverse dynamics not implemented yet" << std::endl);
167 }
const char * psElemNames[]
Definition: enums.cc:39
virtual Elem::Type GetElemType(void) const
Definition: joint.h:187
const char * invdyn2str(InverseDynamics::Order iOrder)
Definition: invdyn.cc:36
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

Friends And Related Function Documentation

Joint* ReadModal ( DataManager pDM,
MBDynParser HP,
const DofOwner pD0,
unsigned int  uLabel,
const StructNode pModalNode 
)
friend

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