MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
ModuleIMUConstraint Class Reference
Inheritance diagram for ModuleIMUConstraint:
Collaboration diagram for ModuleIMUConstraint:

Public Member Functions

 ModuleIMUConstraint (unsigned uLabel, const DofOwner *pDO, DataManager *pDM, MBDynParser &HP)
 
virtual ~ModuleIMUConstraint (void)
 
unsigned int iGetNumDof (void) const
 
DofOrder::Order GetDofType (unsigned int i) const
 
virtual void Output (OutputHandler &OH) const
 
virtual void WorkSpaceDim (integer *piNumRows, integer *piNumCols) const
 
VariableSubMatrixHandlerAssJac (VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
SubVectorHandlerAssRes (SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
unsigned int iGetNumPrivData (void) const
 
unsigned int iGetPrivDataIdx (const char *s) const
 
doublereal dGetPrivData (unsigned int i) const
 
int iGetNumConnectedNodes (void) const
 
void GetConnectedNodes (std::vector< const Node * > &connectedNodes) const
 
void SetValue (DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph)
 
std::ostream & Restart (std::ostream &out) const
 
virtual unsigned int iGetInitialNumDof (void) const
 
virtual void InitialWorkSpaceDim (integer *piNumRows, integer *piNumCols) const
 
VariableSubMatrixHandlerInitialAssJac (VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
 
SubVectorHandlerInitialAssRes (SubVectorHandler &WorkVec, const VectorHandler &XCurr)
 
- Public Member Functions inherited from Elem
 Elem (unsigned int uL, flag fOut)
 
virtual ~Elem (void)
 
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 void AssMats (VariableSubMatrixHandler &WorkMatA, VariableSubMatrixHandler &WorkMatB, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual bool bInverseDynamics (void) const
 
void SetInverseDynamicsFlags (unsigned uIDF)
 
unsigned GetInverseDynamicsFlags (void) const
 
bool bIsErgonomy (void) const
 
bool bIsRightHandSide (void) const
 
virtual 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
 
- 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 Update (const VectorHandler &XCurr, InverseDynamics::Order iOrder)
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP)
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP, const VectorHandler &XPP)
 
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 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 UserDefinedElem
 UserDefinedElem (unsigned uLabel, const DofOwner *pDO)
 
virtual ~UserDefinedElem (void)
 
bool NeedsAirProperties (void) const
 
void NeedsAirProperties (bool yesno)
 
virtual Elem::Type GetElemType (void) const
 
virtual AerodynamicElem::Type GetAerodynamicElemType (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)
 
- Public Member Functions inherited from AerodynamicElem
 AerodynamicElem (unsigned int uL, const DofOwner *pDO, flag fOut)
 
virtual ~AerodynamicElem (void)
 
virtual const InducedVelocitypGetInducedVelocity (void) 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
 
virtual void SetInitialValue (VectorHandler &X)
 
- Public Member Functions inherited from AirPropOwner
 AirPropOwner (void)
 
virtual ~AirPropOwner (void)
 
virtual void PutAirProperties (const AirProperties *pAP)
 
virtual flag fGetAirVelocity (Vec3 &Velocity, const Vec3 &X) const
 
virtual doublereal dGetAirDensity (const Vec3 &X) const
 
virtual doublereal dGetAirPressure (const Vec3 &X) const
 
virtual doublereal dGetAirTemperature (const Vec3 &X) const
 
virtual doublereal dGetSoundSpeed (const Vec3 &X) const
 
virtual bool GetAirProps (const Vec3 &X, doublereal &rho, doublereal &c, doublereal &p, doublereal &T) const
 
- 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
 

Private Attributes

const StructNodem_pNode
 
Vec3 m_tilde_f
 
Mat3x3 m_tilde_Rh
 
Vec3 m_overline_f
 
TplDriveOwner< Vec3m_OmegaDrv
 
TplDriveOwner< Vec3m_AccelerationDrv
 
Vec3 m_LambdaOmega
 
Vec3 m_LambdaAcceleration
 
Vec3 m_v
 
Vec3 m_vP
 

Additional Inherited Members

- 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 Types inherited from AerodynamicElem
enum  Type {
  UNKNOWN = -1, INDUCEDVELOCITY = 0, AEROMODAL, AERODYNAMICBODY,
  AERODYNAMICBEAM, AERODYNAMICEXTERNAL, AERODYNAMICEXTERNALMODAL, AERODYNAMICLOADABLE,
  AIRCRAFTINSTRUMENTS, GENERICFORCE, LASTAEROTYPE
}
 
- 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
 
- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 
- Protected Attributes inherited from ToBeOutput
flag fOutput
 
- Protected Attributes inherited from UserDefinedElem
bool needsAirProperties
 
- Protected Attributes inherited from AirPropOwner
const AirPropertiespAirProperties
 
- Protected Attributes inherited from GravityOwner
GravitypGravity
 

Detailed Description

Definition at line 339 of file module-imu.cc.

Constructor & Destructor Documentation

ModuleIMUConstraint::ModuleIMUConstraint ( unsigned  uLabel,
const DofOwner pDO,
DataManager pDM,
MBDynParser HP 
)

Definition at line 417 of file module-imu.cc.

References DataManager::fReadOutput(), ToBeOutput::fToBeOutput(), DataManager::GetOrientationDescription(), MBDynParser::GetPosRel(), StructNode::GetRCurr(), MBDynParser::GetRotRel(), HighParser::IsArg(), HighParser::IsKeyWord(), Elem::LOADABLE, m_AccelerationDrv, m_OmegaDrv, m_overline_f, m_pNode, m_tilde_f, m_tilde_Rh, MBDYN_EXCEPT_ARGS, Mat3x3::MulTV(), StructDispNode::OUTPUT_ACCELERATIONS, ReadDCVecRel(), DataManager::ReadNode(), TplDriveOwner< T >::Set(), ToBeOutput::SetOutputFlag(), Node::STRUCTURAL, and Zero3.

420 : Elem(uLabel, flag(0)),
421 UserDefinedElem(uLabel, pDO),
422 m_pNode(0),
423 m_tilde_f(::Zero3),
424 m_tilde_Rh(::Eye3),
428 m_v(::Zero3),
429 m_vP(::Zero3)
430 {
431  // help
432  if (HP.IsKeyWord("help")) {
433  silent_cout(
434 " \n"
435 "Module: imu \n"
436 "Author: Pierangelo Masarati <masarati@aero.polimi.it> \n"
437 "Organization: Dipartimento di Ingegneria Aerospaziale \n"
438 " Politecnico di Milano \n"
439 " http://www.aero.polimi.it/ \n"
440 " \n"
441 "All rights reserved \n"
442 " \n"
443 "Syntax: \n"
444 " user defined : <label> , imu constraint, \n"
445 " <node_label> , \n"
446 " [ position , (Vec3)<offset> , ] \n"
447 " [ orientation , (OrientationMatrix)<orientation> , ] \n"
448 " (TplDriveCaller<Vec3>) <omega> , \n"
449 " (TplDriveCaller<Vec3>) <acceleration> \n"
450  << std::endl);
451 
452  if (!HP.IsArg()) {
453  /*
454  * Exit quietly if nothing else is provided
455  */
456  throw NoErr(MBDYN_EXCEPT_ARGS);
457  }
458  }
459 
460  m_pNode = pDM->ReadNode<const StructNode, Node::STRUCTURAL>(HP);
461  flag fOut = m_pNode->fToBeOutput();
462  if (!(fOut & StructNode::OUTPUT_ACCELERATIONS)) {
463  const_cast<StructNode *>(m_pNode)->SetOutputFlag(fOut | StructNode::OUTPUT_ACCELERATIONS);
464  }
465 
467  if (HP.IsKeyWord("position")) {
468  m_tilde_f = HP.GetPosRel(RF);
469  }
470 
471  if (HP.IsKeyWord("orientation")) {
472  m_tilde_Rh = HP.GetRotRel(RF);
473  }
474 
475  ReferenceFrame RFh(0, ::Zero3,
477  ::Zero3, ::Zero3,
479 
480  TplDriveCaller<Vec3> *pOmegaDC = ReadDCVecRel(pDM, HP, RFh);
481  m_OmegaDrv.Set(pOmegaDC);
482 
483  TplDriveCaller<Vec3> *pAccelerationDC = ReadDCVecRel(pDM, HP, RFh);
484  m_AccelerationDrv.Set(pAccelerationDC);
485 
487 
489 }
flag fReadOutput(MBDynParser &HP, const T &t) const
Definition: dataman.h:1064
Mat3x3 GetRotRel(const ReferenceFrame &rf)
Definition: mbpar.cc:1795
const Vec3 Zero3(0., 0., 0.)
long int flag
Definition: mbdyn.h:43
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
const Mat3x3 Eye3(1., 0., 0., 0., 1., 0., 0., 0., 1.)
void Set(const TplDriveCaller< T > *pDC)
Definition: tpldrive.h:97
Vec3 MulTV(const Vec3 &v) const
Definition: matvec3.cc:482
Vec3 GetPosRel(const ReferenceFrame &rf)
Definition: mbpar.cc:1331
virtual bool IsKeyWord(const char *sKeyWord)
Definition: parser.cc:910
const StructNode * m_pNode
Definition: module-imu.cc:343
unsigned int uLabel
Definition: withlab.h:44
OrientationDescription GetOrientationDescription(void) const
Definition: dataman.cc:857
Definition: except.h:79
virtual bool IsArg(void)
Definition: parser.cc:807
virtual flag fToBeOutput(void) const
Definition: output.cc:884
UserDefinedElem(unsigned uLabel, const DofOwner *pDO)
Definition: userelem.cc:152
TplDriveOwner< Vec3 > m_OmegaDrv
Definition: module-imu.cc:349
virtual void SetOutputFlag(flag f=flag(1))
Definition: output.cc:896
Elem(unsigned int uL, flag fOut)
Definition: elem.cc:41
Node * ReadNode(MBDynParser &HP, Node::Type type) const
Definition: dataman3.cc:2309
TplDriveCaller< Vec3 > * ReadDCVecRel(const DataManager *pDM, MBDynParser &HP, const ReferenceFrame &rf)
TplDriveOwner< Vec3 > m_AccelerationDrv
Definition: module-imu.cc:350

Here is the call graph for this function:

ModuleIMUConstraint::~ModuleIMUConstraint ( void  )
virtual

Definition at line 491 of file module-imu.cc.

References NO_OP.

492 {
493  NO_OP;
494 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

VariableSubMatrixHandler & ModuleIMUConstraint::AssJac ( VariableSubMatrixHandler WorkMat,
doublereal  dCoef,
const VectorHandler XCurr,
const VectorHandler XPrimeCurr 
)
virtual

Implements Elem.

Definition at line 540 of file module-imu.cc.

References FullSubMatrixHandler::Add(), FullSubMatrixHandler::AddT(), grad::Cross(), StructNode::GetRCurr(), StructDispNode::GetVCurr(), DofOwnerOwner::iGetFirstIndex(), StructDispNode::iGetFirstMomentumIndex(), StructDispNode::iGetFirstPositionIndex(), m_LambdaAcceleration, m_LambdaOmega, m_pNode, m_tilde_f, m_tilde_Rh, MatCross, FullSubMatrixHandler::PutCoef(), FullSubMatrixHandler::PutColIndex(), FullSubMatrixHandler::PutRowIndex(), R, FullSubMatrixHandler::ResizeReset(), VariableSubMatrixHandler::SetFull(), and FullSubMatrixHandler::Sub().

544 {
545  FullSubMatrixHandler& WM = WorkMat.SetFull();
546 
547  WM.ResizeReset(15, 15);
548 
549  integer iFirstPositionIndex = m_pNode->iGetFirstPositionIndex();
550  integer iFirstMomentumIndex = m_pNode->iGetFirstMomentumIndex();
551  integer iFirstIndex = iGetFirstIndex();
552 
553  for (integer iCnt = 1; iCnt <= 6; iCnt++) {
554  WM.PutRowIndex(iCnt, iFirstMomentumIndex + iCnt);
555  WM.PutColIndex(iCnt, iFirstPositionIndex + iCnt);
556  }
557 
558  for (integer iCnt = 1; iCnt <= 9; iCnt++) {
559  WM.PutRowIndex(6 + iCnt, iFirstIndex + iCnt);
560  WM.PutColIndex(6 + iCnt, iFirstIndex + iCnt);
561  }
562 
565 
566  Vec3 F(R*(m_LambdaAcceleration*dCoef));
567  Vec3 M(R*(m_LambdaOmega*dCoef) + f.Cross(F));
568 
569  WM.Sub(1, 4, Mat3x3(MatCross, F));
570  WM.Sub(4, 4, Mat3x3(MatCross, M));
571 
572  WM.Add(1, 7, R);
573  WM.Add(4, 10, R);
574 
575  WM.AddT(7, 1, R);
576  WM.AddT(10, 4, R);
577 
578  Mat3x3 Tmp(f.Cross(R));
579  WM.Add(4, 7, Tmp);
580  Tmp -= (m_pNode->GetVCurr()*dCoef).Cross(R);
581  WM.AddT(7, 4, Tmp);
582 
583  for (integer iCnt = 1; iCnt <= 3; iCnt++) {
584  WM.PutCoef(6 + iCnt, 12 + iCnt, -dCoef);
585  WM.PutCoef(12 + iCnt, 12 + iCnt, 1.);
586  }
587 
588  return WorkMat;
589 }
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
Definition: matvec3.h:98
const MatCross_Manip MatCross
Definition: matvec3.cc:639
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
void Add(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:209
void PutCoef(integer iRow, integer iCol, const doublereal &dCoef)
Definition: submat.h:672
void AddT(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:227
const StructNode * m_pNode
Definition: module-imu.cc:343
virtual integer iGetFirstMomentumIndex(void) const =0
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
VectorExpression< VectorCrossExpr< VectorLhsExpr, VectorRhsExpr >, 3 > Cross(const VectorExpression< VectorLhsExpr, 3 > &u, const VectorExpression< VectorRhsExpr, 3 > &v)
Definition: matvec.h:3248
virtual void ResizeReset(integer, integer)
Definition: submat.cc:182
void PutRowIndex(integer iSubRow, integer iRow)
Definition: submat.h:311
virtual const Vec3 & GetVCurr(void) const
Definition: strnode.h:322
void Sub(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:215
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
long int integer
Definition: colamd.c:51
Mat3x3 R

Here is the call graph for this function:

SubVectorHandler & ModuleIMUConstraint::AssRes ( SubVectorHandler WorkVec,
doublereal  dCoef,
const VectorHandler XCurr,
const VectorHandler XPrimeCurr 
)
virtual

Implements Elem.

Definition at line 592 of file module-imu.cc.

References VectorHandler::Add(), Vec3::Cross(), TplDriveOwner< T >::Get(), StructNode::GetRCurr(), StructDispNode::GetVCurr(), StructNode::GetWCurr(), DofOwnerOwner::iGetFirstIndex(), StructDispNode::iGetFirstMomentumIndex(), m_AccelerationDrv, m_LambdaAcceleration, m_LambdaOmega, m_OmegaDrv, m_overline_f, m_pNode, m_tilde_f, m_tilde_Rh, m_v, m_vP, Mat3x3::MulTV(), SubVectorHandler::PutRowIndex(), R, VectorHandler::ResizeReset(), and VectorHandler::Sub().

596 {
597  WorkVec.ResizeReset(15);
598 
599  integer iFirstMomentumIndex = m_pNode->iGetFirstMomentumIndex();
600  integer iFirstIndex = iGetFirstIndex();
601 
602  for (integer iCnt = 1; iCnt <= 6; iCnt++) {
603  WorkVec.PutRowIndex(iCnt, iFirstMomentumIndex + iCnt);
604  }
605 
606  for (integer iCnt = 1; iCnt <= 9; iCnt++) {
607  WorkVec.PutRowIndex(6 + iCnt, iFirstIndex + iCnt);
608  }
609 
610  m_LambdaAcceleration = Vec3(XCurr, iFirstIndex + 1);
611  m_LambdaOmega = Vec3(XCurr, iFirstIndex + 4);
612  m_v = Vec3(XCurr, iFirstIndex + 7);
613  m_vP = Vec3(XPrimeCurr, iFirstIndex + 7);
614 
617 
619  Vec3 M(R*m_LambdaOmega + f.Cross(F));
620 
621  Vec3 Omega(R.MulTV(m_pNode->GetWCurr()));
622 
623  WorkVec.Sub(1, F);
624  WorkVec.Sub(4, M);
625  WorkVec.Add(7, m_v - R.MulTV(m_pNode->GetVCurr()) - Omega.Cross(m_overline_f));
626  WorkVec.Add(10, m_OmegaDrv.Get() - Omega);
627  WorkVec.Add(13, m_AccelerationDrv.Get() - m_vP);
628 
629  return WorkVec;
630 }
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
Definition: matvec3.h:98
virtual void ResizeReset(integer)
Definition: vh.cc:55
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
virtual void Sub(integer iRow, const Vec3 &v)
Definition: vh.cc:78
Vec3 MulTV(const Vec3 &v) const
Definition: matvec3.cc:482
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
const StructNode * m_pNode
Definition: module-imu.cc:343
T Get(const doublereal &dVar) const
Definition: tpldrive.h:109
virtual integer iGetFirstMomentumIndex(void) const =0
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
virtual void Add(integer iRow, const Vec3 &v)
Definition: vh.cc:63
TplDriveOwner< Vec3 > m_OmegaDrv
Definition: module-imu.cc:349
virtual const Vec3 & GetVCurr(void) const
Definition: strnode.h:322
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
long int integer
Definition: colamd.c:51
Mat3x3 R
TplDriveOwner< Vec3 > m_AccelerationDrv
Definition: module-imu.cc:350

Here is the call graph for this function:

doublereal ModuleIMUConstraint::dGetPrivData ( unsigned int  i) const
virtual

Reimplemented from SimulationEntity.

Definition at line 645 of file module-imu.cc.

646 {
647  return 0.;
648 }
void ModuleIMUConstraint::GetConnectedNodes ( std::vector< const Node * > &  connectedNodes) const
virtual

Reimplemented from Elem.

Definition at line 657 of file module-imu.cc.

References m_pNode.

658 {
659  connectedNodes.resize(1);
660  connectedNodes[0] = m_pNode;
661 }
const StructNode * m_pNode
Definition: module-imu.cc:343
DofOrder::Order ModuleIMUConstraint::GetDofType ( unsigned int  i) const
virtual

Reimplemented from Elem.

Definition at line 503 of file module-imu.cc.

References DofOrder::ALGEBRAIC, ASSERT, DofOrder::DIFFERENTIAL, and MBDYN_EXCEPT_ARGS.

504 {
505  if (i >= 0 && i < 6) {
506  return DofOrder::ALGEBRAIC;
507  }
508 
509  if (i >= 6 && i < 9) {
510  return DofOrder::DIFFERENTIAL;
511  }
512 
513  ASSERT(0);
515 }
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
#define ASSERT(expression)
Definition: colamd.c:977
unsigned int ModuleIMUConstraint::iGetInitialNumDof ( void  ) const
virtual

Implements SubjectToInitialAssembly.

Definition at line 682 of file module-imu.cc.

683 {
684  return 0;
685 }
int ModuleIMUConstraint::iGetNumConnectedNodes ( void  ) const

Definition at line 651 of file module-imu.cc.

652 {
653  return 1;
654 }
unsigned int ModuleIMUConstraint::iGetNumDof ( void  ) const
virtual

Reimplemented from Elem.

Definition at line 497 of file module-imu.cc.

498 {
499  return 9;
500 }
unsigned int ModuleIMUConstraint::iGetNumPrivData ( void  ) const
virtual

Reimplemented from SimulationEntity.

Definition at line 633 of file module-imu.cc.

634 {
635  return 0;
636 }
unsigned int ModuleIMUConstraint::iGetPrivDataIdx ( const char *  s) const
virtual

Reimplemented from SimulationEntity.

Definition at line 639 of file module-imu.cc.

640 {
641  return 0;
642 }
VariableSubMatrixHandler & ModuleIMUConstraint::InitialAssJac ( VariableSubMatrixHandler WorkMat,
const VectorHandler XCurr 
)
virtual

Implements SubjectToInitialAssembly.

Definition at line 697 of file module-imu.cc.

References ASSERT, and VariableSubMatrixHandler::SetNullMatrix().

700 {
701  // should not be called, since initial workspace is empty
702  ASSERT(0);
703 
704  WorkMat.SetNullMatrix();
705 
706  return WorkMat;
707 }
void SetNullMatrix(void)
Definition: submat.h:1159
#define ASSERT(expression)
Definition: colamd.c:977

Here is the call graph for this function:

SubVectorHandler & ModuleIMUConstraint::InitialAssRes ( SubVectorHandler WorkVec,
const VectorHandler XCurr 
)
virtual

Implements SubjectToInitialAssembly.

Definition at line 710 of file module-imu.cc.

References ASSERT, and VectorHandler::ResizeReset().

713 {
714  // should not be called, since initial workspace is empty
715  ASSERT(0);
716 
717  WorkVec.ResizeReset(0);
718 
719  return WorkVec;
720 }
virtual void ResizeReset(integer)
Definition: vh.cc:55
#define ASSERT(expression)
Definition: colamd.c:977

Here is the call graph for this function:

void ModuleIMUConstraint::InitialWorkSpaceDim ( integer piNumRows,
integer piNumCols 
) const
virtual

Implements SubjectToInitialAssembly.

Definition at line 688 of file module-imu.cc.

691 {
692  *piNumRows = 0;
693  *piNumCols = 0;
694 }
void ModuleIMUConstraint::Output ( OutputHandler OH) const
virtual

Reimplemented from ToBeOutput.

Definition at line 518 of file module-imu.cc.

References ToBeOutput::bToBeOutput(), WithLabel::GetLabel(), OutputHandler::Loadable(), m_LambdaAcceleration, m_LambdaOmega, m_v, and m_vP.

519 {
520  if (bToBeOutput()) {
521  std::ostream& out = OH.Loadable();
522 
523  out << std::setw(8) << GetLabel()
524  << " " << m_LambdaOmega
525  << " " << m_LambdaAcceleration
526  << " " << m_v
527  << " " << m_vP
528  << std::endl;
529  }
530 }
virtual bool bToBeOutput(void) const
Definition: output.cc:890
std::ostream & Loadable(void) const
Definition: output.h:506
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

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

Implements Elem.

Definition at line 676 of file module-imu.cc.

677 {
678  return out << "# ModuleIMUConstraint: not implemented" << std::endl;
679 }
void ModuleIMUConstraint::SetValue ( DataManager pDM,
VectorHandler X,
VectorHandler XP,
SimulationEntity::Hints ph 
)
virtual

Reimplemented from SimulationEntity.

Definition at line 664 of file module-imu.cc.

References Vec3::Cross(), StructNode::GetRCurr(), StructDispNode::GetVCurr(), StructNode::GetWCurr(), DofOwnerOwner::iGetFirstIndex(), m_pNode, m_tilde_f, m_tilde_Rh, m_v, Mat3x3::MulTV(), VectorHandler::Put(), and R.

667 {
670 
672  X.Put(iGetFirstIndex() + 7, m_v);
673 }
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 * m_pNode
Definition: module-imu.cc:343
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
virtual void Put(integer iRow, const Vec3 &v)
Definition: vh.cc:93
virtual const Vec3 & GetVCurr(void) const
Definition: strnode.h:322
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
Mat3x3 R

Here is the call graph for this function:

void ModuleIMUConstraint::WorkSpaceDim ( integer piNumRows,
integer piNumCols 
) const
virtual

Implements Elem.

Definition at line 533 of file module-imu.cc.

534 {
535  *piNumRows = 6 + 9;
536  *piNumCols = 6 + 9;
537 }

Member Data Documentation

TplDriveOwner<Vec3> ModuleIMUConstraint::m_AccelerationDrv
private

Definition at line 350 of file module-imu.cc.

Referenced by AssRes(), and ModuleIMUConstraint().

Vec3 ModuleIMUConstraint::m_LambdaAcceleration
private

Definition at line 353 of file module-imu.cc.

Referenced by AssJac(), AssRes(), and Output().

Vec3 ModuleIMUConstraint::m_LambdaOmega
private

Definition at line 352 of file module-imu.cc.

Referenced by AssJac(), AssRes(), and Output().

TplDriveOwner<Vec3> ModuleIMUConstraint::m_OmegaDrv
private

Definition at line 349 of file module-imu.cc.

Referenced by AssRes(), and ModuleIMUConstraint().

Vec3 ModuleIMUConstraint::m_overline_f
private

Definition at line 347 of file module-imu.cc.

Referenced by AssRes(), and ModuleIMUConstraint().

const StructNode* ModuleIMUConstraint::m_pNode
private

Definition at line 343 of file module-imu.cc.

Referenced by AssJac(), AssRes(), GetConnectedNodes(), ModuleIMUConstraint(), and SetValue().

Vec3 ModuleIMUConstraint::m_tilde_f
private

Definition at line 344 of file module-imu.cc.

Referenced by AssJac(), AssRes(), ModuleIMUConstraint(), and SetValue().

Mat3x3 ModuleIMUConstraint::m_tilde_Rh
private

Definition at line 345 of file module-imu.cc.

Referenced by AssJac(), AssRes(), ModuleIMUConstraint(), and SetValue().

Vec3 ModuleIMUConstraint::m_v
private

Definition at line 354 of file module-imu.cc.

Referenced by AssRes(), Output(), and SetValue().

Vec3 ModuleIMUConstraint::m_vP
private

Definition at line 355 of file module-imu.cc.

Referenced by AssRes(), and Output().


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