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

#include <vehj.h>

Inheritance diagram for ElasticHingeJoint:
Collaboration diagram for ElasticHingeJoint:

Public Member Functions

 ElasticHingeJoint (unsigned int uL, const DofOwner *pDO, const ConstitutiveLaw3D *pCL, const StructNode *pN1, const StructNode *pN2, const Mat3x3 &tilde_R1h, const Mat3x3 &tilde_R2h, const OrientationDescription &od, flag fOut)
 
virtual ~ElasticHingeJoint (void)
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP)
 
virtual ConstLawType::Type GetConstLawType (void) const
 
virtual VariableSubMatrixHandlerAssJac (VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
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)
 
VariableSubMatrixHandlerAssJac (VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
 
SubVectorHandlerAssRes (SubVectorHandler &WorkVec, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr, const VectorHandler &XPrimePrimeCurr, InverseDynamics::Order iOrder=InverseDynamics::INVERSE_DYNAMICS)
 
void Update (const VectorHandler &XCurr, InverseDynamics::Order iOrder=InverseDynamics::INVERSE_DYNAMICS)
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP, const VectorHandler &XPP)
 
virtual void InitialWorkSpaceDim (integer *piNumRows, integer *piNumCols) const
 
virtual VariableSubMatrixHandlerInitialAssJac (VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
 
virtual 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 DofOrder::Order GetDofType (unsigned int) const
 
void SetInverseDynamicsFlags (unsigned uIDF)
 
unsigned GetInverseDynamicsFlags (void) const
 
bool bIsErgonomy (void) const
 
bool bIsRightHandSide (void) const
 
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 void BeforePredict (VectorHandler &, VectorHandler &, VectorHandler &, VectorHandler &) const
 
virtual void Update (const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual void DerivativesUpdate (const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual void ReadInitialState (MBDynParser &HP)
 
- 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 DeformableHingeJoint
 DeformableHingeJoint (unsigned int uL, const DofOwner *pDO, const ConstitutiveLaw3D *pCL, const StructNode *pN1, const StructNode *pN2, const Mat3x3 &tilde_R1h, const Mat3x3 &tilde_R2h, const OrientationDescription &od, flag fOut)
 
virtual ~DeformableHingeJoint (void)
 
virtual Joint::Type GetJointType (void) const
 
virtual std::ostream & Restart (std::ostream &out) const
 
void OutputPrepare (OutputHandler &OH)
 
virtual void Output (OutputHandler &OH) const
 
virtual void AfterPredict (VectorHandler &X, VectorHandler &XP)
 
void SetValue (DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)
 
virtual void SetInitialValue (VectorHandler &)
 
virtual HintParseHint (DataManager *pDM, const char *s) const
 
virtual unsigned int iGetNumDof (void) const
 
virtual void WorkSpaceDim (integer *piNumRows, integer *piNumCols) const
 
virtual bool bInverseDynamics (void) const
 
virtual unsigned int iGetInitialNumDof (void) const
 
virtual void GetConnectedNodes (std::vector< const Node * > &connectedNodes) const
 
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 Joint
 Joint (unsigned int uL, const DofOwner *pD, flag fOut)
 
virtual ~Joint (void)
 
virtual Elem::Type GetElemType (void) 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
 
bool bIsPrescribedMotion (void) const
 
bool bIsTorque (void) 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
 
- 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)
 
- Public Member Functions inherited from ConstitutiveLawOwner< T, Tder >
 ConstitutiveLawOwner (const ConstitutiveLaw< T, Tder > *pCL)
 
virtual ~ConstitutiveLawOwner (void)
 
ConstitutiveLaw< T, Tder > * pGetConstLaw (void) const
 
void Update (const T &Eps, const T &EpsPrime=mb_zero< T >())
 
void AfterConvergence (const T &Eps, const T &EpsPrime=mb_zero< T >())
 
const T & GetF (void) const
 
const Tder & GetFDE (void) const
 
const Tder & GetFDEPrime (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 i) const
 
virtual std::ostream & OutputAppend (std::ostream &out) const
 

Protected Member Functions

virtual void AfterPredict (void)
 
virtual void AssMat (FullSubMatrixHandler &WM, doublereal dCoef)
 
virtual void AssVec (SubVectorHandler &WorkVec)
 
- Protected Member Functions inherited from DeformableHingeJoint
virtual void AssMatM (FullSubMatrixHandler &WMA, doublereal dCoef)
 
void AssMatMInv (FullSubMatrixHandler &WMA, doublereal dCoef)
 
void AssMatMDE (FullSubMatrixHandler &WMA, doublereal dCoef)
 
virtual void AssMatMDEPrime (FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, doublereal dCoef)
 
void AssMatMDEPrimeInv (FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, doublereal dCoef)
 
void OutputInv (OutputHandler &OH) const
 
doublereal dGetPrivDataInv (unsigned int i) const
 
- Protected Member Functions inherited from Joint
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
 

Protected Attributes

Vec3 ThetaRef
 
Vec3 ThetaCurr
 
- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 
- Protected Attributes inherited from ToBeOutput
flag fOutput
 
- Protected Attributes inherited from DeformableHingeJoint
const StructNodepNode1
 
const StructNodepNode2
 
Mat3x3 tilde_R1h
 
Mat3x3 tilde_R2h
 
OrientationDescription od
 
bool bFirstRes
 
Vec3 M
 
Mat3x3 MDE
 
Mat3x3 MDEPrime
 
Mat3x3 hat_I
 
Mat3x3 hat_IT
 
- Protected Attributes inherited from GravityOwner
GravitypGravity
 
- Protected Attributes inherited from ConstitutiveLawOwner< T, Tder >
ConstitutiveLaw< T, Tder > * pConstLaw
 

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 Joint
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
}
 

Detailed Description

Definition at line 178 of file vehj.h.

Constructor & Destructor Documentation

ElasticHingeJoint::ElasticHingeJoint ( unsigned int  uL,
const DofOwner pDO,
const ConstitutiveLaw3D pCL,
const StructNode pN1,
const StructNode pN2,
const Mat3x3 tilde_R1h,
const Mat3x3 tilde_R2h,
const OrientationDescription od,
flag  fOut 
)

Definition at line 541 of file vehj.cc.

References AfterPredict().

550 : Elem(uL, fOut),
551 DeformableHingeJoint(uL, pDO, pCL, pN1, pN2, tilde_R1h, tilde_R2h, od, fOut),
553 {
554  // force update of MDE/MDEPrime as needed
555  AfterPredict();
556 }
const Vec3 Zero3(0., 0., 0.)
Vec3 ThetaRef
Definition: vehj.h:180
OrientationDescription od
Definition: vehj.h:53
virtual void AfterPredict(void)
Definition: vehj.cc:642
DeformableHingeJoint(unsigned int uL, const DofOwner *pDO, const ConstitutiveLaw3D *pCL, const StructNode *pN1, const StructNode *pN2, const Mat3x3 &tilde_R1h, const Mat3x3 &tilde_R2h, const OrientationDescription &od, flag fOut)
Definition: vehj.cc:45
Elem(unsigned int uL, flag fOut)
Definition: elem.cc:41

Here is the call graph for this function:

ElasticHingeJoint::~ElasticHingeJoint ( void  )
virtual

Definition at line 558 of file vehj.cc.

References NO_OP.

559 {
560  NO_OP;
561 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

void ElasticHingeJoint::AfterConvergence ( const VectorHandler X,
const VectorHandler XP 
)
virtual

Reimplemented from SimulationEntity.

Definition at line 564 of file vehj.cc.

References ConstitutiveLawOwner< T, Tder >::AfterConvergence(), and ThetaCurr.

566 {
568 }
void AfterConvergence(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:288
Vec3 ThetaCurr
Definition: vehj.h:181

Here is the call graph for this function:

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

Reimplemented from SimulationEntity.

Definition at line 770 of file vehj.cc.

References ConstitutiveLawOwner< T, Tder >::AfterConvergence(), and ThetaCurr.

772 {
774 }
void AfterConvergence(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:288
Vec3 ThetaCurr
Definition: vehj.h:181

Here is the call graph for this function:

void ElasticHingeJoint::AfterPredict ( void  )
protectedvirtual

Implements DeformableHingeJoint.

Reimplemented in ElasticHingeJointInv.

Definition at line 642 of file vehj.cc.

References RotManip::DRot_I(), ConstitutiveLawOwner< T, Tder >::GetFDE(), StructNode::GetRRef(), DeformableHingeJoint::MDE, Mat3x3::MulMT(), DeformableHingeJoint::pNode1, DeformableHingeJoint::pNode2, ThetaCurr, ThetaRef, DeformableHingeJoint::tilde_R1h, DeformableHingeJoint::tilde_R2h, ConstitutiveLawOwner< T, Tder >::Update(), and RotManip::VecRot().

Referenced by AssJac(), and ElasticHingeJoint().

643 {
644  /* Calcola le deformazioni, aggiorna il legame costitutivo
645  * e crea la MDE */
646 
647  /* Recupera i dati */
648  Mat3x3 R1h(pNode1->GetRRef()*tilde_R1h);
649  Mat3x3 R2h(pNode2->GetRRef()*tilde_R2h);
650 
651  /* Calcola la deformazione corrente nel sistema locale (nodo a) */
652  ThetaCurr = ThetaRef = RotManip::VecRot(R1h.MulTM(R2h));
653 
654  /* Aggiorna il legame costitutivo */
656 
657  /* Calcola l'inversa di Gamma di ThetaRef */
658  Mat3x3 GammaRefm1 = RotManip::DRot_I(ThetaRef);
659 
660  /* Chiede la matrice tangente di riferimento e la porta
661  * nel sistema globale */
662  MDE = R1h*ConstitutiveLaw3DOwner::GetFDE()*GammaRefm1.MulMT(R1h);
663 }
virtual const Mat3x3 & GetRRef(void) const
Definition: strnode.h:1006
Vec3 ThetaRef
Definition: vehj.h:180
const Tder & GetFDE(void) const
Definition: constltp.h:298
const StructNode * pNode1
Definition: vehj.h:48
Vec3 VecRot(const Mat3x3 &Phi)
Definition: Rot.cc:136
Mat3x3 tilde_R1h
Definition: vehj.h:50
Vec3 ThetaCurr
Definition: vehj.h:181
Mat3x3 MulMT(const Mat3x3 &m) const
Definition: matvec3.cc:444
void Update(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:283
Mat3x3 DRot_I(const Vec3 &phi)
Definition: Rot.cc:111
Mat3x3 tilde_R2h
Definition: vehj.h:51
const StructNode * pNode2
Definition: vehj.h:49

Here is the call graph for this function:

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

Implements Elem.

Definition at line 572 of file vehj.cc.

References AssMat(), DEBUGCOUT, StructDispNode::iGetFirstMomentumIndex(), StructDispNode::iGetFirstPositionIndex(), DeformableHingeJoint::pNode1, DeformableHingeJoint::pNode2, FullSubMatrixHandler::PutColIndex(), FullSubMatrixHandler::PutRowIndex(), FullSubMatrixHandler::ResizeReset(), VariableSubMatrixHandler::SetFull(), and Elem::WorkSpaceDim().

Referenced by AssJac().

576 {
577  DEBUGCOUT("Entering ElasticHingeJoint::AssJac()" << std::endl);
578 
579  FullSubMatrixHandler& WM = WorkMat.SetFull();
580 
581  /* Dimensiona e resetta la matrice di lavoro */
582  integer iNumRows = 0;
583  integer iNumCols = 0;
584  WorkSpaceDim(&iNumRows, &iNumCols);
585  WM.ResizeReset(iNumRows, iNumCols);
586 
587  /* Recupera gli indici */
588  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex() + 3;
589  integer iNode1FirstMomIndex = pNode1->iGetFirstMomentumIndex() + 3;
590  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex() + 3;
591  integer iNode2FirstMomIndex = pNode2->iGetFirstMomentumIndex() + 3;
592 
593  /* Setta gli indici della matrice */
594  for (int iCnt = 1; iCnt <= 3; iCnt++) {
595  WM.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
596  WM.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
597  WM.PutRowIndex(3 + iCnt, iNode2FirstMomIndex + iCnt);
598  WM.PutColIndex(3 + iCnt, iNode2FirstPosIndex + iCnt);
599  }
600 
601  AssMat(WM, dCoef);
602 
603  return WorkMat;
604 }
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
const StructNode * pNode1
Definition: vehj.h:48
#define DEBUGCOUT(msg)
Definition: myassert.h:232
virtual integer iGetFirstMomentumIndex(void) const =0
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
virtual void AssMat(FullSubMatrixHandler &WM, doublereal dCoef)
Definition: vehj.cc:666
virtual void ResizeReset(integer, integer)
Definition: submat.cc:182
void PutRowIndex(integer iSubRow, integer iRow)
Definition: submat.h:311
virtual void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const =0
long int integer
Definition: colamd.c:51
const StructNode * pNode2
Definition: vehj.h:49

Here is the call graph for this function:

VariableSubMatrixHandler & ElasticHingeJoint::AssJac ( VariableSubMatrixHandler WorkMat,
const VectorHandler XCurr 
)
virtual

Reimplemented from Elem.

Definition at line 713 of file vehj.cc.

References AfterPredict(), ASSERT, AssJac(), and Elem::bIsErgonomy().

715 {
716  ASSERT(bIsErgonomy());
717 
718  // HACK? Need to call AfterPredict() here to update MDE and so
719  AfterPredict();
720 
721  return AssJac(WorkMat, 1., XCurr, XCurr);
722 }
bool bIsErgonomy(void) const
Definition: elem.cc:83
#define ASSERT(expression)
Definition: colamd.c:977
virtual void AfterPredict(void)
Definition: vehj.cc:642
virtual VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: vehj.cc:572

Here is the call graph for this function:

void ElasticHingeJoint::AssMat ( FullSubMatrixHandler WM,
doublereal  dCoef 
)
protectedvirtual

Definition at line 666 of file vehj.cc.

References DeformableHingeJoint::AssMatM(), DeformableHingeJoint::AssMatMDE(), RotManip::DRot_I(), ConstitutiveLawOwner< T, Tder >::GetFDE(), DeformableHingeJoint::MDE, Mat3x3::MulMT(), and ThetaCurr.

Referenced by AssJac(), AssMats(), and InitialAssJac().

667 {
668 #if 0
669  // Calcola l'inversa di Gamma di ThetaRef
670  Mat3x3 GammaCurrm1 = RotManip::DRot_I(ThetaCurr);
671 
672  // Chiede la matrice tangente di riferimento e la porta
673  // nel sistema globale
674  MDE = R1h*ConstitutiveLaw3DOwner::GetFDE()*GammaCurrm1.MulMT(R1h);
675 #endif
676 
677  AssMatM(WMA, dCoef);
678  AssMatMDE(WMA, dCoef);
679 }
virtual void AssMatM(FullSubMatrixHandler &WMA, doublereal dCoef)
Definition: vehj.cc:83
const Tder & GetFDE(void) const
Definition: constltp.h:298
void AssMatMDE(FullSubMatrixHandler &WMA, doublereal dCoef)
Definition: vehj.cc:113
Vec3 ThetaCurr
Definition: vehj.h:181
Mat3x3 MulMT(const Mat3x3 &m) const
Definition: matvec3.cc:444
Mat3x3 DRot_I(const Vec3 &phi)
Definition: Rot.cc:111

Here is the call graph for this function:

void ElasticHingeJoint::AssMats ( VariableSubMatrixHandler WorkMatA,
VariableSubMatrixHandler WorkMatB,
const VectorHandler XCurr,
const VectorHandler XPrimeCurr 
)
virtual

Reimplemented from Elem.

Definition at line 608 of file vehj.cc.

References AssMat(), DEBUGCOUT, StructDispNode::iGetFirstMomentumIndex(), StructDispNode::iGetFirstPositionIndex(), DeformableHingeJoint::pNode1, DeformableHingeJoint::pNode2, FullSubMatrixHandler::PutColIndex(), FullSubMatrixHandler::PutRowIndex(), FullSubMatrixHandler::ResizeReset(), VariableSubMatrixHandler::SetFull(), VariableSubMatrixHandler::SetNullMatrix(), and Elem::WorkSpaceDim().

612 {
613  DEBUGCOUT("Entering ElasticHingeJoint::AssJac()" << std::endl);
614 
615  FullSubMatrixHandler& WMA = WorkMatA.SetFull();
616  WorkMatB.SetNullMatrix();
617 
618  /* Dimensiona e resetta la matrice di lavoro */
619  integer iNumRows = 0;
620  integer iNumCols = 0;
621  WorkSpaceDim(&iNumRows, &iNumCols);
622  WMA.ResizeReset(iNumRows, iNumCols);
623 
624  /* Recupera gli indici */
625  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex() + 3;
626  integer iNode1FirstMomIndex = pNode1->iGetFirstMomentumIndex() + 3;
627  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex() + 3;
628  integer iNode2FirstMomIndex = pNode2->iGetFirstMomentumIndex() + 3;
629 
630  /* Setta gli indici della matrice */
631  for (int iCnt = 1; iCnt <= 3; iCnt++) {
632  WMA.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
633  WMA.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
634  WMA.PutRowIndex(3 + iCnt, iNode2FirstMomIndex + iCnt);
635  WMA.PutColIndex(3 + iCnt, iNode2FirstPosIndex + iCnt);
636  }
637 
638  AssMat(WMA, 1.);
639 }
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
const StructNode * pNode1
Definition: vehj.h:48
void SetNullMatrix(void)
Definition: submat.h:1159
#define DEBUGCOUT(msg)
Definition: myassert.h:232
virtual integer iGetFirstMomentumIndex(void) const =0
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
virtual void AssMat(FullSubMatrixHandler &WM, doublereal dCoef)
Definition: vehj.cc:666
virtual void ResizeReset(integer, integer)
Definition: submat.cc:182
void PutRowIndex(integer iSubRow, integer iRow)
Definition: submat.h:311
virtual void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const =0
long int integer
Definition: colamd.c:51
const StructNode * pNode2
Definition: vehj.h:49

Here is the call graph for this function:

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

Implements Elem.

Definition at line 683 of file vehj.cc.

References AssVec(), DEBUGCOUT, StructDispNode::iGetFirstMomentumIndex(), DeformableHingeJoint::pNode1, DeformableHingeJoint::pNode2, SubVectorHandler::PutRowIndex(), VectorHandler::ResizeReset(), and Elem::WorkSpaceDim().

687 {
688  DEBUGCOUT("Entering ElasticHingeJoint::AssRes()" << std::endl);
689 
690  /* Dimensiona e resetta la matrice di lavoro */
691  integer iNumRows = 0;
692  integer iNumCols = 0;
693  WorkSpaceDim(&iNumRows, &iNumCols);
694  WorkVec.ResizeReset(iNumRows);
695 
696  /* Recupera gli indici */
697  integer iNode1FirstMomIndex = pNode1->iGetFirstMomentumIndex() + 3;
698  integer iNode2FirstMomIndex = pNode2->iGetFirstMomentumIndex() + 3;
699 
700  /* Setta gli indici della matrice */
701  for (int iCnt = 1; iCnt <= 3; iCnt++) {
702  WorkVec.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
703  WorkVec.PutRowIndex(3 + iCnt, iNode2FirstMomIndex + iCnt);
704  }
705 
706  AssVec(WorkVec);
707 
708  return WorkVec;
709 }
virtual void AssVec(SubVectorHandler &WorkVec)
Definition: vehj.cc:777
virtual void ResizeReset(integer)
Definition: vh.cc:55
const StructNode * pNode1
Definition: vehj.h:48
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
#define DEBUGCOUT(msg)
Definition: myassert.h:232
virtual integer iGetFirstMomentumIndex(void) const =0
virtual void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const =0
long int integer
Definition: colamd.c:51
const StructNode * pNode2
Definition: vehj.h:49

Here is the call graph for this function:

SubVectorHandler & ElasticHingeJoint::AssRes ( SubVectorHandler WorkVec,
const VectorHandler XCurr,
const VectorHandler XPrimeCurr,
const VectorHandler XPrimePrimeCurr,
InverseDynamics::Order  iOrder = InverseDynamics::INVERSE_DYNAMICS 
)
virtual

Reimplemented from Elem.

Definition at line 726 of file vehj.cc.

References ASSERT, AssVec(), DeformableHingeJoint::bFirstRes, Elem::bIsErgonomy(), DEBUGCOUT, StructDispNode::iGetFirstPositionIndex(), InverseDynamics::INVERSE_DYNAMICS, DeformableHingeJoint::pNode1, DeformableHingeJoint::pNode2, InverseDynamics::POSITION, SubVectorHandler::PutRowIndex(), VectorHandler::ResizeReset(), and Elem::WorkSpaceDim().

731 {
732  DEBUGCOUT("Entering ElasticHingeJoint::AssRes()" << std::endl);
733 
735  || (iOrder == InverseDynamics::POSITION && bIsErgonomy()));
736 
737  /* There is no need to call AfterPredict, everything is done in AssVec*/
738  bFirstRes = false;
739 
740  /* Dimensiona e resetta la matrice di lavoro */
741  integer iNumRows = 0;
742  integer iNumCols = 0;
743  WorkSpaceDim(&iNumRows, &iNumCols);
744  WorkVec.ResizeReset(iNumRows);
745 
746  /* Recupera gli indici */
747  integer iNode1FirstMomIndex = pNode1->iGetFirstPositionIndex() + 3;
748  integer iNode2FirstMomIndex = pNode2->iGetFirstPositionIndex() + 3;
749 
750  /* Setta gli indici della matrice */
751  for (int iCnt = 1; iCnt <= 3; iCnt++) {
752  WorkVec.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
753  WorkVec.PutRowIndex(3 + iCnt, iNode2FirstMomIndex + iCnt);
754  }
755 
756  AssVec(WorkVec);
757 
758  return WorkVec;
759 }
virtual void AssVec(SubVectorHandler &WorkVec)
Definition: vehj.cc:777
virtual void ResizeReset(integer)
Definition: vh.cc:55
bool bIsErgonomy(void) const
Definition: elem.cc:83
const StructNode * pNode1
Definition: vehj.h:48
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
#define DEBUGCOUT(msg)
Definition: myassert.h:232
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
#define ASSERT(expression)
Definition: colamd.c:977
virtual void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const =0
long int integer
Definition: colamd.c:51
const StructNode * pNode2
Definition: vehj.h:49

Here is the call graph for this function:

void ElasticHingeJoint::AssVec ( SubVectorHandler WorkVec)
protectedvirtual

Reimplemented in ElasticHingeJointInv.

Definition at line 777 of file vehj.cc.

References VectorHandler::Add(), DeformableHingeJoint::bFirstRes, ConstitutiveLawOwner< T, Tder >::GetF(), StructNode::GetRCurr(), DeformableHingeJoint::M, DeformableHingeJoint::pNode1, DeformableHingeJoint::pNode2, VectorHandler::Sub(), ThetaCurr, DeformableHingeJoint::tilde_R1h, DeformableHingeJoint::tilde_R2h, ConstitutiveLawOwner< T, Tder >::Update(), and RotManip::VecRot().

Referenced by AssRes(), and InitialAssRes().

778 {
780 
781  if (bFirstRes) {
782  bFirstRes = false;
783 
784  } else {
786  ThetaCurr = RotManip::VecRot(R1h.MulTM(R2h));
788  }
789 
790  /* Couple attached to node 1 */
791  M = R1h*GetF();
792 
793  WorkVec.Add(1, M);
794  WorkVec.Sub(4, M);
795 }
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
virtual void Sub(integer iRow, const Vec3 &v)
Definition: vh.cc:78
const StructNode * pNode1
Definition: vehj.h:48
Vec3 VecRot(const Mat3x3 &Phi)
Definition: Rot.cc:136
virtual void Add(integer iRow, const Vec3 &v)
Definition: vh.cc:63
const T & GetF(void) const
Definition: constltp.h:293
Mat3x3 tilde_R1h
Definition: vehj.h:50
Vec3 ThetaCurr
Definition: vehj.h:181
void Update(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:283
Mat3x3 tilde_R2h
Definition: vehj.h:51
const StructNode * pNode2
Definition: vehj.h:49

Here is the call graph for this function:

virtual ConstLawType::Type ElasticHingeJoint::GetConstLawType ( void  ) const
inlinevirtual

Implements DeformableHingeJoint.

Definition at line 204 of file vehj.h.

References ConstLawType::ELASTIC.

204  {
205  return ConstLawType::ELASTIC;
206  };
VariableSubMatrixHandler & ElasticHingeJoint::InitialAssJac ( VariableSubMatrixHandler WorkMat,
const VectorHandler XCurr 
)
virtual

Implements SubjectToInitialAssembly.

Definition at line 799 of file vehj.cc.

References AssMat(), DEBUGCOUT, StructDispNode::iGetFirstPositionIndex(), InitialWorkSpaceDim(), DeformableHingeJoint::pNode1, DeformableHingeJoint::pNode2, FullSubMatrixHandler::PutColIndex(), FullSubMatrixHandler::PutRowIndex(), FullSubMatrixHandler::ResizeReset(), and VariableSubMatrixHandler::SetFull().

801 {
802  DEBUGCOUT("Entering ElasticHingeJoint::InitialAssJac()" << std::endl);
803 
804  FullSubMatrixHandler& WM = WorkMat.SetFull();
805 
806  /* Dimensiona e resetta la matrice di lavoro */
807  integer iNumRows = 0;
808  integer iNumCols = 0;
809  InitialWorkSpaceDim(&iNumRows, &iNumCols);
810  WM.ResizeReset(iNumRows, iNumCols);
811 
812  /* Recupera gli indici */
813  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex() + 3;
814  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex() + 3;
815 
816  /* Setta gli indici della matrice */
817  for (int iCnt = 1; iCnt <= 3; iCnt++) {
818  WM.PutRowIndex(iCnt, iNode1FirstPosIndex + iCnt);
819  WM.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
820  WM.PutRowIndex(3 + iCnt, iNode2FirstPosIndex + iCnt);
821  WM.PutColIndex(3 + iCnt, iNode2FirstPosIndex + iCnt);
822  }
823 
824  AssMat(WM, 1.);
825 
826  return WorkMat;
827 }
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
const StructNode * pNode1
Definition: vehj.h:48
#define DEBUGCOUT(msg)
Definition: myassert.h:232
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
virtual void AssMat(FullSubMatrixHandler &WM, doublereal dCoef)
Definition: vehj.cc:666
virtual void ResizeReset(integer, integer)
Definition: submat.cc:182
void PutRowIndex(integer iSubRow, integer iRow)
Definition: submat.h:311
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: vehj.h:264
long int integer
Definition: colamd.c:51
const StructNode * pNode2
Definition: vehj.h:49

Here is the call graph for this function:

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

Implements SubjectToInitialAssembly.

Definition at line 831 of file vehj.cc.

References AssVec(), StructDispNode::iGetFirstPositionIndex(), InitialWorkSpaceDim(), DeformableHingeJoint::pNode1, DeformableHingeJoint::pNode2, SubVectorHandler::PutRowIndex(), and VectorHandler::ResizeReset().

833 {
834  /* Dimensiona e resetta la matrice di lavoro */
835  integer iNumRows = 0;
836  integer iNumCols = 0;
837  InitialWorkSpaceDim(&iNumRows, &iNumCols);
838  WorkVec.ResizeReset(iNumRows);
839 
840  /* Recupera gli indici */
841  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex() + 3;
842  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex() + 3;
843 
844  /* Setta gli indici della matrice */
845  for (int iCnt = 1; iCnt <= 3; iCnt++) {
846  WorkVec.PutRowIndex(iCnt, iNode1FirstPosIndex + iCnt);
847  WorkVec.PutRowIndex(3 + iCnt, iNode2FirstPosIndex + iCnt);
848  }
849 
850  AssVec(WorkVec);
851 
852  return WorkVec;
853 }
virtual void AssVec(SubVectorHandler &WorkVec)
Definition: vehj.cc:777
virtual void ResizeReset(integer)
Definition: vh.cc:55
const StructNode * pNode1
Definition: vehj.h:48
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: vehj.h:264
long int integer
Definition: colamd.c:51
const StructNode * pNode2
Definition: vehj.h:49

Here is the call graph for this function:

virtual void ElasticHingeJoint::InitialWorkSpaceDim ( integer piNumRows,
integer piNumCols 
) const
inlinevirtual

Implements SubjectToInitialAssembly.

Definition at line 264 of file vehj.h.

Referenced by InitialAssJac(), and InitialAssRes().

265  {
266  *piNumRows = 6;
267  *piNumCols = 6;
268  };
void ElasticHingeJoint::Update ( const VectorHandler XCurr,
InverseDynamics::Order  iOrder = InverseDynamics::INVERSE_DYNAMICS 
)
virtual

Reimplemented from SimulationEntity.

Definition at line 763 of file vehj.cc.

References NO_OP.

764 {
765  NO_OP;
766 }
#define NO_OP
Definition: myassert.h:74

Member Data Documentation

Vec3 ElasticHingeJoint::ThetaCurr
protected
Vec3 ElasticHingeJoint::ThetaRef
protected

Definition at line 180 of file vehj.h.

Referenced by AfterPredict(), and ElasticHingeJointInv::AfterPredict().


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