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

#include <vehj3.h>

Inheritance diagram for ElasticJoint:
Collaboration diagram for ElasticJoint:

Public Member Functions

 ElasticJoint (unsigned int uL, const DofOwner *pDO, const ConstitutiveLaw6D *pCL, const StructNode *pN1, const StructNode *pN2, const Vec3 &tilde_f1, const Vec3 &tilde_f2, const Mat3x3 &tilde_R1h, const Mat3x3 &tilde_R2h, const OrientationDescription &od, flag fOut)
 
 ~ElasticJoint (void)
 
virtual ConstLawType::Type GetConstLawType (void) const
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP)
 
virtual void AssMats (VariableSubMatrixHandler &WorkMatA, VariableSubMatrixHandler &WorkMatB, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
VariableSubMatrixHandlerAssJac (VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
 
virtual void AfterPredict (VectorHandler &X, VectorHandler &XP)
 
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)
 
- 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
 
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 DeformableJoint
 DeformableJoint (unsigned int uL, const DofOwner *pDO, const ConstitutiveLaw6D *pCL, const StructNode *pN1, const StructNode *pN2, const Vec3 &tilde_f1, const Vec3 &tilde_f2, const Mat3x3 &tilde_R1h, const Mat3x3 &tilde_R2h, const OrientationDescription &od, flag fOut)
 
virtual ~DeformableJoint (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
 
void SetValue (DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)
 
virtual HintParseHint (DataManager *pDM, const char *s) const
 
virtual bool bInverseDynamics (void) const
 
virtual unsigned int iGetNumDof (void) const
 
virtual DofOrder::Order GetDofType (unsigned int) const
 
virtual void WorkSpaceDim (integer *piNumRows, integer *piNumCols) const
 
virtual unsigned int iGetInitialNumDof (void) const
 
virtual unsigned int iGetNumPrivData (void) const
 
virtual unsigned int iGetPrivDataIdx (const char *s) const
 
virtual doublereal dGetPrivData (unsigned int i) const
 
virtual void GetConnectedNodes (std::vector< const Node * > &connectedNodes) const
 
virtual VariableSubMatrixHandlerAssJac (VariableSubMatrixHandler &WorkMat, doublereal dCoef, 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 SubVectorHandlerInitialAssRes (SubVectorHandler &WorkVec, const VectorHandler &XCurr)
 
- 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 SetInitialValue (VectorHandler &)
 
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 std::ostream & OutputAppend (std::ostream &out) const
 

Protected Member Functions

void AssMats (FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, doublereal dCoef)
 
void AssVec (SubVectorHandler &WorkVec)
 
- Protected Member Functions inherited from DeformableJoint
void AssMatCommon (FullSubMatrixHandler &WM, doublereal dCoef)
 
void AssMatElastic (FullSubMatrixHandler &WM, doublereal dCoef, const Mat6x6 &FDE)
 
void AssMatViscous (FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, doublereal dCoef, const Mat6x6 &FDEPrime)
 
- 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
 
Mat6x6 FDE
 
- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 
- Protected Attributes inherited from ToBeOutput
flag fOutput
 
- Protected Attributes inherited from DeformableJoint
const StructNodepNode1
 
const StructNodepNode2
 
Vec3 tilde_f1
 
Vec3 tilde_f2
 
Mat3x3 tilde_R1h
 
Mat3x3 tilde_R2h
 
OrientationDescription od
 
Vec6 tilde_k
 
Vec6 tilde_kPrime
 
bool bFirstRes
 
Vec3 d1
 
Vec3 d2
 
Vec3 d1Prime
 
Vec3 d2Prime
 
Mat3x3 R1h
 
Vec6 F
 
- 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 215 of file vehj3.h.

Constructor & Destructor Documentation

ElasticJoint::ElasticJoint ( unsigned int  uL,
const DofOwner pDO,
const ConstitutiveLaw6D pCL,
const StructNode pN1,
const StructNode pN2,
const Vec3 tilde_f1,
const Vec3 tilde_f2,
const Mat3x3 tilde_R1h,
const Mat3x3 tilde_R2h,
const OrientationDescription od,
flag  fOut 
)

Definition at line 812 of file vehj3.cc.

References FDE, ConstitutiveLawOwner< T, Tder >::GetFDE(), MultRMRt(), and DeformableJoint::R1h.

823 : Elem(uL, fOut),
824 DeformableJoint(uL, pDO, pCL, pN1, pN2, tilde_f1, tilde_f2, tilde_R1h, tilde_R2h, od, fOut),
826 {
827  /*
828  * Chiede la matrice tangente di riferimento
829  * e la porta nel sistema globale
830  */
832 }
Mat3x3 MultRMRt(const Mat3x3 &m, const Mat3x3 &R)
Definition: matvec3.cc:1162
const Vec3 Zero3(0., 0., 0.)
OrientationDescription od
Definition: vehj3.h:53
const Tder & GetFDE(void) const
Definition: constltp.h:298
Mat6x6 FDE
Definition: vehj3.h:219
Mat3x3 R1h
Definition: vehj3.h:74
Vec3 ThetaRef
Definition: vehj3.h:217
Elem(unsigned int uL, flag fOut)
Definition: elem.cc:41
DeformableJoint(unsigned int uL, const DofOwner *pDO, const ConstitutiveLaw6D *pCL, const StructNode *pN1, const StructNode *pN2, const Vec3 &tilde_f1, const Vec3 &tilde_f2, const Mat3x3 &tilde_R1h, const Mat3x3 &tilde_R2h, const OrientationDescription &od, flag fOut)
Definition: vehj3.cc:57

Here is the call graph for this function:

ElasticJoint::~ElasticJoint ( void  )

Definition at line 834 of file vehj3.cc.

References NO_OP.

835 {
836  NO_OP;
837 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

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

Reimplemented from SimulationEntity.

Definition at line 840 of file vehj3.cc.

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

842 {
844 }
Vec6 tilde_k
Definition: vehj3.h:56
void AfterConvergence(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:288

Here is the call graph for this function:

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

Reimplemented from SimulationEntity.

Definition at line 911 of file vehj3.cc.

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

913 {
915 }
Vec6 tilde_k
Definition: vehj3.h:56
void AfterConvergence(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:288

Here is the call graph for this function:

void ElasticJoint::AfterPredict ( VectorHandler X,
VectorHandler XP 
)
virtual

Reimplemented from SimulationEntity.

Definition at line 946 of file vehj3.cc.

References DeformableJoint::bFirstRes, DeformableJoint::d1, DeformableJoint::d2, RotManip::DRot_I(), FDE, ConstitutiveLawOwner< T, Tder >::GetFDE(), StructNode::GetRRef(), StructDispNode::GetXCurr(), Mat3x3::MulTM(), MultRMRtGammam1(), Mat3x3::MulTV(), DeformableJoint::pNode1, DeformableJoint::pNode2, DeformableJoint::R1h, ThetaRef, DeformableJoint::tilde_f1, DeformableJoint::tilde_f2, DeformableJoint::tilde_k, DeformableJoint::tilde_R1h, DeformableJoint::tilde_R2h, ConstitutiveLawOwner< T, Tder >::Update(), and RotManip::VecRot().

Referenced by AssJac().

948 {
949  /* Calcola le deformazioni, aggiorna il legame costitutivo
950  * e crea la FDE */
951 
952  /* Recupera i dati */
954 
955  /* Calcola la deformazione corrente nel sistema locale (nodo a) */
957 
958  /* Calcola l'inversa di Gamma di ThetaRef */
959  Mat3x3 GammaRefm1 = RotManip::DRot_I(ThetaRef);
960 
961  d2 = pNode2->GetRRef()*tilde_f2;
962  d1 = pNode2->GetXCurr() + d2 - pNode1->GetXCurr();
963  Vec3 f1(pNode1->GetRRef()*tilde_f1);
964 
965  tilde_k = Vec6(R1h.MulTV(d1 - f1), ThetaRef);
966 
967  /* Aggiorna il legame costitutivo */
969 
970  /* Chiede la matrice tangente di riferimento e la porta
971  * nel sistema globale */
973  MultRMRtGammam1(FDE, R1h, GammaRefm1);
974 
975  bFirstRes = true;
976 }
virtual const Mat3x3 & GetRRef(void) const
Definition: strnode.h:1006
Definition: matvec3.h:98
Vec6 tilde_k
Definition: vehj3.h:56
Mat3x3 tilde_R2h
Definition: vehj3.h:51
const Tder & GetFDE(void) const
Definition: constltp.h:298
Vec3 tilde_f2
Definition: vehj3.h:49
Mat6x6 FDE
Definition: vehj3.h:219
Mat3x3 R1h
Definition: vehj3.h:74
Vec3 VecRot(const Mat3x3 &Phi)
Definition: Rot.cc:136
Vec3 MulTV(const Vec3 &v) const
Definition: matvec3.cc:482
Mat3x3 tilde_R1h
Definition: vehj3.h:50
Definition: matvec6.h:37
Vec3 ThetaRef
Definition: vehj3.h:217
Mat3x3 MulTM(const Mat3x3 &m) const
Definition: matvec3.cc:500
Vec3 tilde_f1
Definition: vehj3.h:48
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
static void MultRMRtGammam1(Mat6x6 &M, const Mat3x3 &R, const Mat3x3 &Gammam1)
Definition: vehj3.cc:44
const StructNode * pNode2
Definition: vehj3.h:47
void Update(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:283
const StructNode * pNode1
Definition: vehj3.h:46
bool bFirstRes
Definition: vehj3.h:70
Mat3x3 DRot_I(const Vec3 &phi)
Definition: Rot.cc:111

Here is the call graph for this function:

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

Reimplemented from Elem.

Definition at line 890 of file vehj3.cc.

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

892 {
893  ASSERT(bIsErgonomy());
894 
895  // HACK? Need to call AfterPredict() here to update MDE and so
896  // const_cast because AfterPredict() does not modify X, XP
897  AfterPredict(const_cast<VectorHandler&>(XCurr), const_cast<VectorHandler&>(XCurr));
898 
899  return DeformableJoint::AssJac(WorkMat, 1., XCurr, XCurr);
900 }
bool bIsErgonomy(void) const
Definition: elem.cc:83
virtual void AfterPredict(VectorHandler &X, VectorHandler &XP)
Definition: vehj3.cc:946
#define ASSERT(expression)
Definition: colamd.c:977
virtual VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: vehj3.cc:648

Here is the call graph for this function:

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

Implements DeformableJoint.

Definition at line 880 of file vehj3.cc.

References DeformableJoint::AssMatCommon(), DeformableJoint::AssMatElastic(), and FDE.

Referenced by AssMats(), and InitialAssJac().

883 {
884  AssMatCommon(WMA, dCoef);
885  AssMatElastic(WMA, dCoef, FDE);
886 }
void AssMatElastic(FullSubMatrixHandler &WM, doublereal dCoef, const Mat6x6 &FDE)
Definition: vehj3.cc:490
Mat6x6 FDE
Definition: vehj3.h:219
void AssMatCommon(FullSubMatrixHandler &WM, doublereal dCoef)
Definition: vehj3.cc:461

Here is the call graph for this function:

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

Reimplemented from Elem.

Definition at line 848 of file vehj3.cc.

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

852 {
853  FullSubMatrixHandler& WMA = WorkMatA.SetFull();
854  WorkMatB.SetNullMatrix();
855 
856  /* Dimensiona e resetta la matrice di lavoro */
857  integer iNumRows = 0;
858  integer iNumCols = 0;
859  WorkSpaceDim(&iNumRows, &iNumCols);
860  WMA.ResizeReset(iNumRows, iNumCols);
861 
862  /* Recupera gli indici */
863  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex();
864  integer iNode1FirstMomIndex = pNode1->iGetFirstMomentumIndex();
865  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex();
866  integer iNode2FirstMomIndex = pNode2->iGetFirstMomentumIndex();
867 
868  /* Setta gli indici della matrice */
869  for (int iCnt = 1; iCnt <= 6; iCnt++) {
870  WMA.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
871  WMA.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
872  WMA.PutRowIndex(6 + iCnt, iNode2FirstMomIndex + iCnt);
873  WMA.PutColIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
874  }
875 
876  AssMats(WMA, WMA, 1.);
877 }
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
void SetNullMatrix(void)
Definition: submat.h:1159
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
const StructNode * pNode2
Definition: vehj3.h:47
long int integer
Definition: colamd.c:51
const StructNode * pNode1
Definition: vehj3.h:46
void AssMats(FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, doublereal dCoef)
Definition: vehj3.cc:880

Here is the call graph for this function:

void ElasticJoint::AssVec ( SubVectorHandler WorkVec)
protectedvirtual

Implements DeformableJoint.

Definition at line 918 of file vehj3.cc.

References VectorHandler::Add(), DeformableJoint::bFirstRes, Vec3::Cross(), DeformableJoint::d1, DeformableJoint::d2, DeformableJoint::F, ConstitutiveLawOwner< T, Tder >::GetF(), StructNode::GetRCurr(), Vec6::GetVec1(), Vec6::GetVec2(), StructDispNode::GetXCurr(), Mat3x3::MulTM(), MultRV(), Mat3x3::MulTV(), DeformableJoint::pNode1, DeformableJoint::pNode2, DeformableJoint::R1h, VectorHandler::Sub(), DeformableJoint::tilde_f1, DeformableJoint::tilde_f2, DeformableJoint::tilde_k, DeformableJoint::tilde_R1h, DeformableJoint::tilde_R2h, ConstitutiveLawOwner< T, Tder >::Update(), and RotManip::VecRot().

919 {
920  if (bFirstRes) {
921  bFirstRes = false;
922 
923  } else {
925 
926  d2 = pNode2->GetRCurr()*tilde_f2;
927  d1 = pNode2->GetXCurr() + d2 - pNode1->GetXCurr();
928 
930  Vec3 f1(pNode1->GetRCurr()*tilde_f1);
931 
932  tilde_k = Vec6(R1h.MulTV(d1 - f1), RotManip::VecRot(R1h.MulTM(R2h)));
933 
935  }
936 
937  F = MultRV(GetF(), R1h);
938 
939  WorkVec.Add(1, F.GetVec1());
940  WorkVec.Add(4, d1.Cross(F.GetVec1()) + F.GetVec2());
941  WorkVec.Sub(6 + 1, F.GetVec1());
942  WorkVec.Sub(6 + 4, d2.Cross(F.GetVec1()) + F.GetVec2());
943 }
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
Vec3 MultRV(const Vec3 &v, const Mat3x3 &R)
Definition: matvec3.cc:1144
Definition: matvec3.h:98
Vec6 tilde_k
Definition: vehj3.h:56
const Vec3 & GetVec2(void) const
Definition: matvec6.h:76
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
Mat3x3 tilde_R2h
Definition: vehj3.h:51
virtual void Sub(integer iRow, const Vec3 &v)
Definition: vh.cc:78
Vec3 tilde_f2
Definition: vehj3.h:49
Mat3x3 R1h
Definition: vehj3.h:74
Vec3 VecRot(const Mat3x3 &Phi)
Definition: Rot.cc:136
Vec3 MulTV(const Vec3 &v) const
Definition: matvec3.cc:482
Mat3x3 tilde_R1h
Definition: vehj3.h:50
Definition: matvec6.h:37
const Vec3 & GetVec1(void) const
Definition: matvec6.h:72
Mat3x3 MulTM(const Mat3x3 &m) const
Definition: matvec3.cc:500
Vec3 tilde_f1
Definition: vehj3.h:48
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
virtual void Add(integer iRow, const Vec3 &v)
Definition: vh.cc:63
const T & GetF(void) const
Definition: constltp.h:293
const StructNode * pNode2
Definition: vehj3.h:47
void Update(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:283
const StructNode * pNode1
Definition: vehj3.h:46
bool bFirstRes
Definition: vehj3.h:70

Here is the call graph for this function:

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

Implements DeformableJoint.

Definition at line 242 of file vehj3.h.

References ConstLawType::ELASTIC.

242  {
243  return ConstLawType::ELASTIC;
244  };
VariableSubMatrixHandler & ElasticJoint::InitialAssJac ( VariableSubMatrixHandler WorkMat,
const VectorHandler XCurr 
)
virtual

Implements SubjectToInitialAssembly.

Definition at line 981 of file vehj3.cc.

References AssMats(), StructDispNode::iGetFirstPositionIndex(), InitialWorkSpaceDim(), DeformableJoint::pNode1, DeformableJoint::pNode2, FullSubMatrixHandler::PutColIndex(), FullSubMatrixHandler::PutRowIndex(), FullSubMatrixHandler::ResizeReset(), and VariableSubMatrixHandler::SetFull().

983 {
984  FullSubMatrixHandler& WM = WorkMat.SetFull();
985 
986  /* Dimensiona e resetta la matrice di lavoro */
987  integer iNumRows = 0;
988  integer iNumCols = 0;
989  InitialWorkSpaceDim(&iNumRows, &iNumCols);
990  WM.ResizeReset(iNumRows, iNumCols);
991 
992  /* Recupera gli indici */
993  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex();
994  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex();
995 
996  /* Setta gli indici della matrice */
997  for (int iCnt = 1; iCnt <= 6; iCnt++) {
998  WM.PutRowIndex(iCnt, iNode1FirstPosIndex + iCnt);
999  WM.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
1000  WM.PutRowIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
1001  WM.PutColIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
1002  }
1003 
1004  AssMats(WM, WM, 1.);
1005 
1006  return WorkMat;
1007 }
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
virtual void ResizeReset(integer, integer)
Definition: submat.cc:182
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: vehj3.h:272
void PutRowIndex(integer iSubRow, integer iRow)
Definition: submat.h:311
const StructNode * pNode2
Definition: vehj3.h:47
long int integer
Definition: colamd.c:51
const StructNode * pNode1
Definition: vehj3.h:46
void AssMats(FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, doublereal dCoef)
Definition: vehj3.cc:880

Here is the call graph for this function:

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

Implements SubjectToInitialAssembly.

Definition at line 272 of file vehj3.h.

Referenced by InitialAssJac().

272  {
273  *piNumRows = 12;
274  *piNumCols = 12;
275  };
void ElasticJoint::Update ( const VectorHandler XCurr,
InverseDynamics::Order  iOrder = InverseDynamics::INVERSE_DYNAMICS 
)
virtual

Reimplemented from SimulationEntity.

Definition at line 904 of file vehj3.cc.

References NO_OP.

905 {
906  NO_OP;
907 }
#define NO_OP
Definition: myassert.h:74

Member Data Documentation

Mat6x6 ElasticJoint::FDE
protected

Definition at line 219 of file vehj3.h.

Referenced by AfterPredict(), AssMats(), and ElasticJoint().

Vec3 ElasticJoint::ThetaRef
protected

Definition at line 217 of file vehj3.h.

Referenced by AfterPredict().


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