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

#include <vehj.h>

Inheritance diagram for ViscousHingeJoint:
Collaboration diagram for ViscousHingeJoint:

Public Member Functions

 ViscousHingeJoint (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 ~ViscousHingeJoint (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)
 
SubVectorHandlerAssRes (SubVectorHandler &WorkVec, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr, const VectorHandler &XPrimePrimeCurr, InverseDynamics::Order iOrder=InverseDynamics::INVERSE_DYNAMICS)
 
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 VariableSubMatrixHandlerAssJac (VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
 
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 AfterConvergence (const VectorHandler &X, const VectorHandler &XP, const VectorHandler &XPP)
 
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
 
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 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 AssMats (FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, 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 Omega
 
- 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 362 of file vehj.h.

Constructor & Destructor Documentation

ViscousHingeJoint::ViscousHingeJoint ( 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 953 of file vehj.cc.

References AfterPredict().

962 : Elem(uL, fOut),
963 DeformableHingeJoint(uL, pDO, pCL, pN1, pN2, tilde_R1h, tilde_R2h, od, fOut)
964 {
965  // force update of MDE/MDEPrime as needed
966  AfterPredict();
967 }
OrientationDescription od
Definition: vehj.h:53
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
virtual void AfterPredict(void)
Definition: vehj.cc:982
Elem(unsigned int uL, flag fOut)
Definition: elem.cc:41

Here is the call graph for this function:

ViscousHingeJoint::~ViscousHingeJoint ( void  )
virtual

Definition at line 969 of file vehj.cc.

References NO_OP.

970 {
971  NO_OP;
972 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

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

Reimplemented from SimulationEntity.

Definition at line 975 of file vehj.cc.

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

977 {
979 }
const Vec3 Zero3(0., 0., 0.)
void AfterConvergence(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:288

Here is the call graph for this function:

void ViscousHingeJoint::AfterPredict ( void  )
protectedvirtual

Implements DeformableHingeJoint.

Reimplemented in ViscousHingeJointInv.

Definition at line 982 of file vehj.cc.

References ConstitutiveLawOwner< T, Tder >::GetFDEPrime(), StructNode::GetRRef(), StructNode::GetWRef(), DeformableHingeJoint::MDEPrime, Omega, DeformableHingeJoint::pNode1, DeformableHingeJoint::pNode2, DeformableHingeJoint::tilde_R1h, ConstitutiveLawOwner< T, Tder >::Update(), and Zero3.

Referenced by ViscousHingeJoint().

983 {
984  /* Calcola le deformazioni, aggiorna il legame costitutivo
985  * e crea la MDE */
986 
987  /* Recupera i dati */
988  Mat3x3 R1h(pNode1->GetRRef()*tilde_R1h);
989 
990  /* Aggiorna il legame costitutivo */
991  Omega = R1h.MulTV(pNode2->GetWRef() - pNode1->GetWRef());
993 
994  /* Chiede la matrice tangente di riferimento e la porta
995  * nel sistema globale */
996  MDEPrime = R1h*GetFDEPrime().MulMT(R1h);
997 }
const Vec3 Zero3(0., 0., 0.)
virtual const Mat3x3 & GetRRef(void) const
Definition: strnode.h:1006
virtual const Vec3 & GetWRef(void) const
Definition: strnode.h:1024
const StructNode * pNode1
Definition: vehj.h:48
Mat3x3 tilde_R1h
Definition: vehj.h:50
const Tder & GetFDEPrime(void) const
Definition: constltp.h:303
void Update(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:283
Mat3x3 MDEPrime
Definition: vehj.h:67
const StructNode * pNode2
Definition: vehj.h:49

Here is the call graph for this function:

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

Implements Elem.

Definition at line 1001 of file vehj.cc.

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

1005 {
1006  FullSubMatrixHandler& WM = WorkMat.SetFull();
1007 
1008  /* Dimensiona e resetta la matrice di lavoro */
1009  integer iNumRows = 0;
1010  integer iNumCols = 0;
1011  WorkSpaceDim(&iNumRows, &iNumCols);
1012  WM.ResizeReset(iNumRows, iNumCols);
1013 
1014  /* Recupera gli indici */
1015  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex() + 3;
1016  integer iNode1FirstMomIndex = pNode1->iGetFirstMomentumIndex() + 3;
1017  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex() + 3;
1018  integer iNode2FirstMomIndex = pNode2->iGetFirstMomentumIndex() + 3;
1019 
1020  /* Setta gli indici della matrice */
1021  for (int iCnt = 1; iCnt <= 3; iCnt++) {
1022  WM.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
1023  WM.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
1024  WM.PutRowIndex(3 + iCnt, iNode2FirstMomIndex + iCnt);
1025  WM.PutColIndex(3 + iCnt, iNode2FirstPosIndex + iCnt);
1026  }
1027 
1028  AssMats(WM, WM, dCoef);
1029 
1030  return WorkMat;
1031 }
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
virtual void AssMats(FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, doublereal dCoef)
Definition: vehj.cc:1074
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
const StructNode * pNode1
Definition: vehj.h:48
virtual integer iGetFirstMomentumIndex(void) const =0
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
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:

void ViscousHingeJoint::AssMats ( FullSubMatrixHandler WMA,
FullSubMatrixHandler WMB,
doublereal  dCoef 
)
protectedvirtual

Definition at line 1074 of file vehj.cc.

References DeformableHingeJoint::AssMatM(), and DeformableHingeJoint::AssMatMDEPrime().

Referenced by AssJac(), and AssMats().

1077 {
1078  AssMatM(WMA, dCoef);
1079  AssMatMDEPrime(WMA, WMB, dCoef);
1080 }
virtual void AssMatM(FullSubMatrixHandler &WMA, doublereal dCoef)
Definition: vehj.cc:83
virtual void AssMatMDEPrime(FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, doublereal dCoef)
Definition: vehj.cc:126

Here is the call graph for this function:

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

Reimplemented from Elem.

Definition at line 1035 of file vehj.cc.

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

1039 {
1040  FullSubMatrixHandler& WMA = WorkMatA.SetFull();
1041  FullSubMatrixHandler& WMB = WorkMatB.SetFull();
1042 
1043  /* Dimensiona e resetta la matrice di lavoro */
1044  integer iNumRows = 0;
1045  integer iNumCols = 0;
1046  WorkSpaceDim(&iNumRows, &iNumCols);
1047  WMA.ResizeReset(iNumRows, iNumCols);
1048  WMB.ResizeReset(iNumRows, iNumCols);
1049 
1050  /* Recupera gli indici */
1051  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex() + 3;
1052  integer iNode1FirstMomIndex = pNode1->iGetFirstMomentumIndex() + 3;
1053  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex() + 3;
1054  integer iNode2FirstMomIndex = pNode2->iGetFirstMomentumIndex() + 3;
1055 
1056  /* Setta gli indici della matrice */
1057  for (int iCnt = 1; iCnt <= 3; iCnt++) {
1058  WMA.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
1059  WMA.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
1060  WMA.PutRowIndex(3 + iCnt, iNode2FirstMomIndex + iCnt);
1061  WMA.PutColIndex(3 + iCnt, iNode2FirstPosIndex + iCnt);
1062 
1063  WMB.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
1064  WMB.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
1065  WMB.PutRowIndex(3 + iCnt, iNode2FirstMomIndex + iCnt);
1066  WMB.PutColIndex(3 + iCnt, iNode2FirstPosIndex + iCnt);
1067  }
1068 
1069  AssMats(WMA, WMA, 1.);
1070 }
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
virtual void AssMats(FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, doublereal dCoef)
Definition: vehj.cc:1074
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
const StructNode * pNode1
Definition: vehj.h:48
virtual integer iGetFirstMomentumIndex(void) const =0
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
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 & ViscousHingeJoint::AssRes ( SubVectorHandler WorkVec,
doublereal  dCoef,
const VectorHandler XCurr,
const VectorHandler XPrimeCurr 
)
virtual

Implements Elem.

Definition at line 1084 of file vehj.cc.

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

1088 {
1089  /* Dimensiona e resetta la matrice di lavoro */
1090  integer iNumRows = 0;
1091  integer iNumCols = 0;
1092  WorkSpaceDim(&iNumRows, &iNumCols);
1093  WorkVec.ResizeReset(iNumRows);
1094 
1095  /* Recupera gli indici */
1096  integer iNode1FirstMomIndex = pNode1->iGetFirstMomentumIndex() + 3;
1097  integer iNode2FirstMomIndex = pNode2->iGetFirstMomentumIndex() + 3;
1098 
1099  /* Setta gli indici della matrice */
1100  for (int iCnt = 1; iCnt <= 3; iCnt++) {
1101  WorkVec.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
1102  WorkVec.PutRowIndex(3 + iCnt, iNode2FirstMomIndex + iCnt);
1103  }
1104 
1105  AssVec(WorkVec);
1106 
1107  return WorkVec;
1108 }
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 iGetFirstMomentumIndex(void) const =0
virtual void AssVec(SubVectorHandler &WorkVec)
Definition: vehj.cc:1145
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 & ViscousHingeJoint::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 1112 of file vehj.cc.

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

1117 {
1119 
1120  bFirstRes = false;
1121 
1122  /* Dimensiona e resetta la matrice di lavoro */
1123  integer iNumRows = 0;
1124  integer iNumCols = 0;
1125  WorkSpaceDim(&iNumRows, &iNumCols);
1126  WorkVec.ResizeReset(iNumRows);
1127 
1128  /* Recupera gli indici */
1129  integer iNode1FirstMomIndex = pNode1->iGetFirstPositionIndex() + 3;
1130  integer iNode2FirstMomIndex = pNode2->iGetFirstPositionIndex() + 3;
1131 
1132  /* Setta gli indici della matrice */
1133  for (int iCnt = 1; iCnt <= 3; iCnt++) {
1134  WorkVec.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
1135  WorkVec.PutRowIndex(3 + iCnt, iNode2FirstMomIndex + iCnt);
1136  }
1137 
1138  AssVec(WorkVec);
1139 
1140  return WorkVec;
1141 }
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
#define ASSERT(expression)
Definition: colamd.c:977
virtual void AssVec(SubVectorHandler &WorkVec)
Definition: vehj.cc:1145
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 ViscousHingeJoint::AssVec ( SubVectorHandler WorkVec)
protectedvirtual

Reimplemented in ViscousHingeJointInv.

Definition at line 1145 of file vehj.cc.

References VectorHandler::Add(), DeformableHingeJoint::bFirstRes, ConstitutiveLawOwner< T, Tder >::GetF(), StructNode::GetRCurr(), StructNode::GetWCurr(), DeformableHingeJoint::M, Omega, DeformableHingeJoint::pNode1, DeformableHingeJoint::pNode2, VectorHandler::Sub(), DeformableHingeJoint::tilde_R1h, ConstitutiveLawOwner< T, Tder >::Update(), and Zero3.

Referenced by AssRes().

1146 {
1147  Mat3x3 R1h(pNode1->GetRCurr()*tilde_R1h);
1148 
1149  if (bFirstRes) {
1150  bFirstRes = false;
1151 
1152  } else {
1153  Omega = R1h.MulTV(pNode2->GetWCurr() - pNode1->GetWCurr());
1154 
1156  }
1157 
1159 
1160  WorkVec.Add(1, M);
1161  WorkVec.Sub(4, M);
1162 }
const Vec3 Zero3(0., 0., 0.)
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
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
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
void Update(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:283
const StructNode * pNode2
Definition: vehj.h:49

Here is the call graph for this function:

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

Implements DeformableHingeJoint.

Definition at line 389 of file vehj.h.

References ConstLawType::VISCOUS.

389  {
390  return ConstLawType::VISCOUS;
391  };
VariableSubMatrixHandler & ViscousHingeJoint::InitialAssJac ( VariableSubMatrixHandler WorkMat,
const VectorHandler XCurr 
)
virtual

Implements SubjectToInitialAssembly.

Definition at line 1166 of file vehj.cc.

References FullSubMatrixHandler::Add(), ConstitutiveLawOwner< T, Tder >::GetF(), ConstitutiveLawOwner< T, Tder >::GetFDEPrime(), StructNode::GetRCurr(), StructNode::GetWCurr(), StructDispNode::iGetFirstPositionIndex(), InitialWorkSpaceDim(), MatCross, DeformableHingeJoint::MDEPrime, DeformableHingeJoint::pNode1, DeformableHingeJoint::pNode2, FullSubMatrixHandler::PutColIndex(), FullSubMatrixHandler::PutRowIndex(), FullSubMatrixHandler::ResizeReset(), VariableSubMatrixHandler::SetFull(), FullSubMatrixHandler::Sub(), and DeformableHingeJoint::tilde_R1h.

1168 {
1169  FullSubMatrixHandler& WM = WorkMat.SetFull();
1170 
1171  /* Dimensiona e resetta la matrice di lavoro */
1172  integer iNumRows = 0;
1173  integer iNumCols = 0;
1174  InitialWorkSpaceDim(&iNumRows, &iNumCols);
1175  WM.ResizeReset(iNumRows, iNumCols);
1176 
1177  /* Recupera gli indici */
1178  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex() + 3;
1179  integer iNode1FirstVelIndex = iNode1FirstPosIndex + 6;
1180  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex() + 3;
1181  integer iNode2FirstVelIndex = iNode2FirstPosIndex + 6;
1182 
1183  /* Setta gli indici della matrice */
1184  for (int iCnt = 1; iCnt <= 3; iCnt++) {
1185  WM.PutRowIndex(iCnt, iNode1FirstPosIndex + iCnt);
1186  WM.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
1187  WM.PutColIndex(3 + iCnt, iNode1FirstVelIndex + iCnt);
1188 
1189  WM.PutRowIndex(3 + iCnt, iNode2FirstPosIndex + iCnt);
1190  WM.PutColIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
1191  WM.PutColIndex(9 + iCnt, iNode2FirstVelIndex + iCnt);
1192  }
1193 
1194  Mat3x3 R1h(pNode1->GetRCurr()*tilde_R1h);
1195 
1196  const Vec3& W2(pNode2->GetWCurr());
1197 
1198  MDEPrime = R1h*ConstitutiveLaw3DOwner::GetFDEPrime().MulMT(R1h);
1199 
1200  Mat3x3 Tmp(MDEPrime*Mat3x3(MatCross, W2));
1201  WM.Add(4, 7, Tmp);
1202  WM.Sub(1, 7, Tmp);
1203 
1205  WM.Add(1, 1, Tmp);
1206  WM.Sub(4, 1, Tmp);
1207 
1208  WM.Add(1, 4, MDEPrime);
1209  WM.Add(4, 10, MDEPrime);
1210 
1211  WM.Sub(1, 10, MDEPrime);
1212  WM.Sub(4, 4, MDEPrime);
1213 
1214  return WorkMat;
1215 }
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
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: vehj.h:437
const StructNode * pNode1
Definition: vehj.h:48
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
virtual void ResizeReset(integer, integer)
Definition: submat.cc:182
void PutRowIndex(integer iSubRow, integer iRow)
Definition: submat.h:311
const T & GetF(void) const
Definition: constltp.h:293
Mat3x3 tilde_R1h
Definition: vehj.h:50
void Sub(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:215
const Tder & GetFDEPrime(void) const
Definition: constltp.h:303
long int integer
Definition: colamd.c:51
Mat3x3 MDEPrime
Definition: vehj.h:67
const StructNode * pNode2
Definition: vehj.h:49

Here is the call graph for this function:

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

Implements SubjectToInitialAssembly.

Definition at line 1219 of file vehj.cc.

References VectorHandler::Add(), DeformableHingeJoint::bFirstRes, ConstitutiveLawOwner< T, Tder >::GetF(), StructNode::GetRCurr(), StructNode::GetWCurr(), StructDispNode::iGetFirstPositionIndex(), InitialWorkSpaceDim(), DeformableHingeJoint::M, Omega, DeformableHingeJoint::pNode1, DeformableHingeJoint::pNode2, SubVectorHandler::PutRowIndex(), VectorHandler::ResizeReset(), VectorHandler::Sub(), DeformableHingeJoint::tilde_R1h, ConstitutiveLawOwner< T, Tder >::Update(), and Zero3.

1221 {
1222  /* Dimensiona e resetta la matrice di lavoro */
1223  integer iNumRows = 0;
1224  integer iNumCols = 0;
1225  InitialWorkSpaceDim(&iNumRows, &iNumCols);
1226  WorkVec.ResizeReset(iNumRows);
1227 
1228  /* Recupera gli indici */
1229  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex() + 3;
1230  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex() + 3;
1231 
1232  /* Setta gli indici della matrice */
1233  for (int iCnt = 1; iCnt <= 3; iCnt++) {
1234  WorkVec.PutRowIndex(iCnt, iNode1FirstPosIndex + iCnt);
1235  WorkVec.PutRowIndex(3 + iCnt, iNode2FirstPosIndex + iCnt);
1236  }
1237 
1238  Mat3x3 R1h(pNode1->GetRCurr()*tilde_R1h);
1239 
1240  if (bFirstRes) {
1241  bFirstRes = false;
1242 
1243  } else {
1244  Omega = R1h.MulTV(pNode2->GetWCurr() - pNode1->GetWCurr());
1245 
1247  }
1248 
1250 
1251  WorkVec.Add(1, M);
1252  WorkVec.Sub(4, M);
1253 
1254  return WorkVec;
1255 }
const Vec3 Zero3(0., 0., 0.)
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
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: vehj.h:437
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 const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
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
long int integer
Definition: colamd.c:51
void Update(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:283
const StructNode * pNode2
Definition: vehj.h:49

Here is the call graph for this function:

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

Implements SubjectToInitialAssembly.

Definition at line 437 of file vehj.h.

Referenced by InitialAssJac(), and InitialAssRes().

438  {
439  *piNumRows = 6;
440  *piNumCols = 12;
441  };

Member Data Documentation

Vec3 ViscousHingeJoint::Omega
protected

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