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

#include <vehj.h>

Inheritance diagram for ViscoElasticHingeJoint:
Collaboration diagram for ViscoElasticHingeJoint:

Public Member Functions

 ViscoElasticHingeJoint (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)
 
 ~ViscoElasticHingeJoint (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 AssMats (FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, doublereal dCoef)
 
virtual void AfterPredict (void)
 
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
 
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 536 of file vehj.h.

Constructor & Destructor Documentation

ViscoElasticHingeJoint::ViscoElasticHingeJoint ( 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 1364 of file vehj.cc.

References AfterPredict().

1373 : Elem(uL, fOut),
1374 DeformableHingeJoint(uL, pDO, pCL, pN1, pN2, tilde_R1h, tilde_R2h, od, fOut),
1375 ThetaRef(Zero3)
1376 {
1377  // force update of MDE/MDEPrime as needed
1378  AfterPredict();
1379 }
const Vec3 Zero3(0., 0., 0.)
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
Elem(unsigned int uL, flag fOut)
Definition: elem.cc:41
virtual void AfterPredict(void)
Definition: vehj.cc:1394

Here is the call graph for this function:

ViscoElasticHingeJoint::~ViscoElasticHingeJoint ( void  )

Definition at line 1381 of file vehj.cc.

References NO_OP.

1382 {
1383  NO_OP;
1384 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

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

Reimplemented from SimulationEntity.

Definition at line 1387 of file vehj.cc.

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

1389 {
1391 }
void AfterConvergence(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:288

Here is the call graph for this function:

void ViscoElasticHingeJoint::AfterPredict ( void  )
protectedvirtual

Implements DeformableHingeJoint.

Reimplemented in ViscoElasticHingeJointInv.

Definition at line 1394 of file vehj.cc.

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

Referenced by ViscoElasticHingeJoint().

1395 {
1396  /* Computes strains, updates constitutive law and generates
1397  * MDE and MDEPrime */
1398 
1399  Mat3x3 R1h(pNode1->GetRRef()*tilde_R1h);
1400  Mat3x3 R2h(pNode2->GetRRef()*tilde_R2h);
1401 
1402  /* Current strain in material reference frame (node 1) */
1403  ThetaCurr = ThetaRef = RotManip::VecRot(R1h.MulTM(R2h));
1404 
1405  /* Relative angular velocity */
1406  Omega = R1h.MulTV(pNode2->GetWRef() - pNode1->GetWRef());
1407 
1408  /* Updates constitutive law */
1410 
1411  /* don't repeat the above operations during AssRes */
1412  bFirstRes = true;
1413 
1414  /* Inverse of Gamma(ThetaRef) */
1415  Mat3x3 GammaRefm1 = RotManip::DRot_I(ThetaRef);
1416 
1417  /* Tangent matrices are updated and projected in the global
1418  * reference frame; they won't change during the solution
1419  * of the current time step, according to the updated-updated
1420  * approach */
1421  MDE = R1h*ConstitutiveLaw3DOwner::GetFDE()*GammaRefm1.MulMT(R1h);
1422  MDEPrime = R1h*GetFDEPrime().MulMT(R1h);
1423 }
virtual const Mat3x3 & GetRRef(void) const
Definition: strnode.h:1006
const Tder & GetFDE(void) const
Definition: constltp.h:298
virtual const Vec3 & GetWRef(void) const
Definition: strnode.h:1024
const StructNode * pNode1
Definition: vehj.h:48
Vec3 VecRot(const Mat3x3 &Phi)
Definition: Rot.cc:136
Mat3x3 tilde_R1h
Definition: vehj.h:50
Mat3x3 MulMT(const Mat3x3 &m) const
Definition: matvec3.cc:444
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 DRot_I(const Vec3 &phi)
Definition: Rot.cc:111
Mat3x3 MDEPrime
Definition: vehj.h:67
Mat3x3 tilde_R2h
Definition: vehj.h:51
const StructNode * pNode2
Definition: vehj.h:49

Here is the call graph for this function:

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

Implements Elem.

Definition at line 1427 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().

1431 {
1432  FullSubMatrixHandler& WM = WorkMat.SetFull();
1433 
1434  /* Dimensiona e resetta la matrice di lavoro */
1435  integer iNumRows = 0;
1436  integer iNumCols = 0;
1437  WorkSpaceDim(&iNumRows, &iNumCols);
1438  WM.ResizeReset(iNumRows, iNumCols);
1439 
1440  /* Recupera gli indici */
1441  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex() + 3;
1442  integer iNode1FirstMomIndex = pNode1->iGetFirstMomentumIndex() + 3;
1443  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex() + 3;
1444  integer iNode2FirstMomIndex = pNode2->iGetFirstMomentumIndex() + 3;
1445 
1446  /* Setta gli indici della matrice */
1447  for (int iCnt = 1; iCnt <= 3; iCnt++) {
1448  WM.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
1449  WM.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
1450  WM.PutRowIndex(3 + iCnt, iNode2FirstMomIndex + iCnt);
1451  WM.PutColIndex(3 + iCnt, iNode2FirstPosIndex + iCnt);
1452  }
1453 
1454  AssMats(WM, WM, dCoef);
1455 
1456  return WorkMat;
1457 }
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
virtual void AssMats(FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, doublereal dCoef)
Definition: vehj.cc:1500
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 ViscoElasticHingeJoint::AssMats ( FullSubMatrixHandler WMA,
FullSubMatrixHandler WMB,
doublereal  dCoef 
)
protectedvirtual

Definition at line 1500 of file vehj.cc.

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

Referenced by AssJac(), and AssMats().

1503 {
1504  AssMatM(WMA, dCoef);
1505  AssMatMDE(WMA, dCoef);
1506  AssMatMDEPrime(WMA, WMB, dCoef);
1507 }
virtual void AssMatM(FullSubMatrixHandler &WMA, doublereal dCoef)
Definition: vehj.cc:83
void AssMatMDE(FullSubMatrixHandler &WMA, doublereal dCoef)
Definition: vehj.cc:113
virtual void AssMatMDEPrime(FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, doublereal dCoef)
Definition: vehj.cc:126

Here is the call graph for this function:

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

Reimplemented from Elem.

Definition at line 1461 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().

1465 {
1466  FullSubMatrixHandler& WMA = WorkMatA.SetFull();
1467  FullSubMatrixHandler& WMB = WorkMatB.SetFull();
1468 
1469  /* Dimensiona e resetta la matrice di lavoro */
1470  integer iNumRows = 0;
1471  integer iNumCols = 0;
1472  WorkSpaceDim(&iNumRows, &iNumCols);
1473  WMA.ResizeReset(iNumRows, iNumCols);
1474  WMB.ResizeReset(iNumRows, iNumCols);
1475 
1476  /* Recupera gli indici */
1477  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex() + 3;
1478  integer iNode1FirstMomIndex = pNode1->iGetFirstMomentumIndex() + 3;
1479  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex() + 3;
1480  integer iNode2FirstMomIndex = pNode2->iGetFirstMomentumIndex() + 3;
1481 
1482  /* Setta gli indici della matrice */
1483  for (int iCnt = 1; iCnt <= 3; iCnt++) {
1484  WMA.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
1485  WMA.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
1486  WMA.PutRowIndex(3 + iCnt, iNode2FirstMomIndex + iCnt);
1487  WMA.PutColIndex(3 + iCnt, iNode2FirstPosIndex + iCnt);
1488 
1489  WMB.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
1490  WMB.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
1491  WMB.PutRowIndex(3 + iCnt, iNode2FirstMomIndex + iCnt);
1492  WMB.PutColIndex(3 + iCnt, iNode2FirstPosIndex + iCnt);
1493  }
1494 
1495  AssMats(WMA, WMB, 1.);
1496 }
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
virtual void AssMats(FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, doublereal dCoef)
Definition: vehj.cc:1500
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 & ViscoElasticHingeJoint::AssRes ( SubVectorHandler WorkVec,
doublereal  dCoef,
const VectorHandler XCurr,
const VectorHandler XPrimeCurr 
)
virtual

Implements Elem.

Definition at line 1511 of file vehj.cc.

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

1515 {
1516  /* Dimensiona e resetta la matrice di lavoro */
1517  integer iNumRows = 0;
1518  integer iNumCols = 0;
1519  WorkSpaceDim(&iNumRows, &iNumCols);
1520  WorkVec.ResizeReset(iNumRows);
1521 
1522  /* Recupera gli indici */
1523  integer iNode1FirstMomIndex = pNode1->iGetFirstMomentumIndex() + 3;
1524  integer iNode2FirstMomIndex = pNode2->iGetFirstMomentumIndex() + 3;
1525 
1526  /* Setta gli indici della matrice */
1527  for (int iCnt = 1; iCnt <= 3; iCnt++) {
1528  WorkVec.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
1529  WorkVec.PutRowIndex(3 + iCnt, iNode2FirstMomIndex + iCnt);
1530  }
1531 
1532  AssVec(WorkVec);
1533 
1534  return WorkVec;
1535 }
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:1572
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 & ViscoElasticHingeJoint::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 1539 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().

1544 {
1546 
1547  bFirstRes = false;
1548 
1549  /* Dimensiona e resetta la matrice di lavoro */
1550  integer iNumRows = 0;
1551  integer iNumCols = 0;
1552  WorkSpaceDim(&iNumRows, &iNumCols);
1553  WorkVec.ResizeReset(iNumRows);
1554 
1555  /* Recupera gli indici */
1556  integer iNode1FirstMomIndex = pNode1->iGetFirstPositionIndex() + 3;
1557  integer iNode2FirstMomIndex = pNode2->iGetFirstPositionIndex() + 3;
1558 
1559  /* Setta gli indici della matrice */
1560  for (int iCnt = 1; iCnt <= 3; iCnt++) {
1561  WorkVec.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
1562  WorkVec.PutRowIndex(3 + iCnt, iNode2FirstMomIndex + iCnt);
1563  }
1564 
1565  AssVec(WorkVec);
1566 
1567  return WorkVec;
1568 }
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:1572
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 ViscoElasticHingeJoint::AssVec ( SubVectorHandler WorkVec)
protectedvirtual

Reimplemented in ViscoElasticHingeJointInv.

Definition at line 1572 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(), ThetaCurr, DeformableHingeJoint::tilde_R1h, DeformableHingeJoint::tilde_R2h, ConstitutiveLawOwner< T, Tder >::Update(), and RotManip::VecRot().

Referenced by AssRes().

1573 {
1574  Mat3x3 R1h(pNode1->GetRCurr()*tilde_R1h);
1575 
1576  if (bFirstRes) {
1577  bFirstRes = false;
1578 
1579  } else {
1580  Mat3x3 R2h(pNode2->GetRCurr()*tilde_R2h);
1581 
1582  /* orientazione intermedia */
1583  ThetaCurr = RotManip::VecRot(R1h.MulTM(R2h));
1584 
1585  /* velocita' relativa nel riferimento intermedio */
1586  Omega = R1h.MulTV(pNode2->GetWCurr() - pNode1->GetWCurr());
1587 
1588  /* aggiorna il legame costitutivo */
1589  ConstitutiveLaw3DOwner::Update(ThetaCurr, Omega);
1590  }
1591 
1593 
1594  WorkVec.Add(1, M);
1595  WorkVec.Sub(4, M);
1596 }
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 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
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 ViscoElasticHingeJoint::GetConstLawType ( void  ) const
inlinevirtual

Implements DeformableHingeJoint.

Definition at line 568 of file vehj.h.

References ConstLawType::VISCOELASTIC.

568  {
570  };
VariableSubMatrixHandler & ViscoElasticHingeJoint::InitialAssJac ( VariableSubMatrixHandler WorkMat,
const VectorHandler XCurr 
)
virtual

Implements SubjectToInitialAssembly.

Definition at line 1600 of file vehj.cc.

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

1602 {
1603  FullSubMatrixHandler& WM = WorkMat.SetFull();
1604 
1605  /* Dimensiona e resetta la matrice di lavoro */
1606  integer iNumRows = 0;
1607  integer iNumCols = 0;
1608  InitialWorkSpaceDim(&iNumRows, &iNumCols);
1609  WM.ResizeReset(iNumRows, iNumCols);
1610 
1611  /* Recupera gli indici */
1612  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex() + 3;
1613  integer iNode1FirstVelIndex = iNode1FirstPosIndex + 6;
1614  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex() + 3;
1615  integer iNode2FirstVelIndex = iNode2FirstPosIndex + 6;
1616 
1617  /* Setta gli indici della matrice */
1618  for (int iCnt = 1; iCnt <= 3; iCnt++) {
1619  WM.PutRowIndex(iCnt, iNode1FirstPosIndex + iCnt);
1620  WM.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
1621  WM.PutColIndex(3 + iCnt, iNode1FirstVelIndex + iCnt);
1622 
1623  WM.PutRowIndex(3 + iCnt, iNode2FirstPosIndex + iCnt);
1624  WM.PutColIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
1625  WM.PutColIndex(9 + iCnt, iNode2FirstVelIndex + iCnt);
1626  }
1627 
1628  Mat3x3 R1h(pNode1->GetRCurr()*tilde_R1h);
1629  const Vec3& W2(pNode2->GetWCurr());
1630 
1631  MDE = R1h*ConstitutiveLaw3DOwner::GetFDE().MulMT(R1h);
1632  MDEPrime = R1h*ConstitutiveLaw3DOwner::GetFDEPrime().MulMT(R1h);
1633 
1634  Mat3x3 Tmp(MDE + MDEPrime*Mat3x3(MatCross, W2));
1635  WM.Add(4, 7, Tmp);
1636  WM.Sub(1, 7, Tmp);
1637 
1639  WM.Add(1, 1, Tmp);
1640  WM.Sub(4, 1, Tmp);
1641 
1642  WM.Add(1, 4, MDEPrime);
1643  WM.Add(4, 10, MDEPrime);
1644 
1645  WM.Sub(1, 10, MDEPrime);
1646  WM.Sub(4, 4, MDEPrime);
1647 
1648  return WorkMat;
1649 }
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
const Tder & GetFDE(void) const
Definition: constltp.h:298
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 InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: vehj.h:615
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 & ViscoElasticHingeJoint::InitialAssRes ( SubVectorHandler WorkVec,
const VectorHandler XCurr 
)
virtual

Implements SubjectToInitialAssembly.

Definition at line 1653 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(), ThetaCurr, DeformableHingeJoint::tilde_R1h, DeformableHingeJoint::tilde_R2h, ConstitutiveLawOwner< T, Tder >::Update(), and RotManip::VecRot().

1655 {
1656  /* Dimensiona e resetta la matrice di lavoro */
1657  integer iNumRows = 0;
1658  integer iNumCols = 0;
1659  InitialWorkSpaceDim(&iNumRows, &iNumCols);
1660  WorkVec.ResizeReset(iNumRows);
1661 
1662  /* Recupera gli indici */
1663  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex() + 3;
1664  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex() + 3;
1665 
1666  /* Setta gli indici della matrice */
1667  for (int iCnt = 1; iCnt <= 3; iCnt++) {
1668  WorkVec.PutRowIndex(iCnt, iNode1FirstPosIndex + iCnt);
1669  WorkVec.PutRowIndex(3 + iCnt, iNode2FirstPosIndex + iCnt);
1670  }
1671 
1672  Mat3x3 R1h(pNode1->GetRCurr()*tilde_R1h);
1673 
1674  if (bFirstRes) {
1675  bFirstRes = false;
1676 
1677  } else {
1678  Mat3x3 R2h(pNode2->GetRCurr()*tilde_R2h);
1679 
1680  ThetaCurr = RotManip::VecRot(R1h.MulTM(R2h));
1681  Omega = R1h.MulTV(pNode2->GetWCurr() - pNode1->GetWCurr());
1682 
1683  ConstitutiveLaw3DOwner::Update(ThetaCurr, Omega);
1684  }
1685 
1687 
1688  WorkVec.Add(1, M);
1689  WorkVec.Sub(4, M);
1690 
1691  return WorkVec;
1692 }
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
const StructNode * pNode1
Definition: vehj.h:48
Vec3 VecRot(const Mat3x3 &Phi)
Definition: Rot.cc:136
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 InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: vehj.h:615
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
Mat3x3 tilde_R2h
Definition: vehj.h:51
const StructNode * pNode2
Definition: vehj.h:49

Here is the call graph for this function:

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

Implements SubjectToInitialAssembly.

Definition at line 615 of file vehj.h.

Referenced by InitialAssJac(), and InitialAssRes().

616  {
617  *piNumRows = 6;
618  *piNumCols = 12;
619  };

Member Data Documentation

Vec3 ViscoElasticHingeJoint::Omega
protected
Vec3 ViscoElasticHingeJoint::ThetaCurr
protected
Vec3 ViscoElasticHingeJoint::ThetaRef
protected

Definition at line 539 of file vehj.h.

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


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