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

#include <vehj3.h>

Inheritance diagram for DeformableJoint:
Collaboration diagram for DeformableJoint:

Public Member Functions

 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 ConstLawType::Type GetConstLawType (void) const =0
 
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 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 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
 
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 AfterPredict (VectorHandler &X, VectorHandler &XP)
 
virtual void Update (const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual void DerivativesUpdate (const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP)
 
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 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 &)
 
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)
 
virtual void InitialWorkSpaceDim (integer *piNumRows, integer *piNumCols) const =0
 
virtual VariableSubMatrixHandlerInitialAssJac (VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)=0
 
- 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 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)
 
virtual void AssMats (FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, doublereal dCoef)=0
 
virtual void AssVec (SubVectorHandler &WorkVec)=0
 
- 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

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 WithLabel
unsigned int uLabel
 
std::string sName
 
- Protected Attributes inherited from ToBeOutput
flag fOutput
 
- 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 43 of file vehj3.h.

Constructor & Destructor Documentation

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 
)

Definition at line 57 of file vehj3.cc.

References ASSERT, StructDispNode::GetNodeType(), StructNode::GetRRef(), pNode1, pNode2, R1h, Node::STRUCTURAL, and tilde_R1h.

68 : Elem(uL, fOut),
69 Joint(uL, pDO, fOut),
71 pNode1(pN1), pNode2(pN2),
72 tilde_f1(tilde_f1), tilde_f2(tilde_f2),
73 tilde_R1h(tilde_R1h), tilde_R2h(tilde_R2h),
74 od(od),
76 #ifdef USE_NETCDF
77 Var_tilde_d(0),
78 Var_tilde_dPrime(0),
79 Var_d(0),
80 Var_dPrime(0),
81 Var_Phi(0),
82 Var_Omega(0),
83 #endif // USE_NETCDF
84 bFirstRes(false)
85 {
86  ASSERT(pNode1 != NULL);
87  ASSERT(pNode2 != NULL);
90 
92 }
virtual const Mat3x3 & GetRRef(void) const
Definition: strnode.h:1006
OrientationDescription od
Definition: vehj3.h:53
Vec6 tilde_k
Definition: vehj3.h:56
virtual Node::Type GetNodeType(void) const
Definition: strnode.cc:145
Mat3x3 tilde_R2h
Definition: vehj3.h:51
ConstitutiveLawOwner< Vec6, Mat6x6 > ConstitutiveLaw6DOwner
Definition: constltp.h:380
Joint(unsigned int uL, const DofOwner *pD, flag fOut)
Definition: joint.cc:83
Vec3 tilde_f2
Definition: vehj3.h:49
Mat3x3 R1h
Definition: vehj3.h:74
Mat3x3 tilde_R1h
Definition: vehj3.h:50
const Vec6 Zero6(0., 0., 0., 0., 0., 0.)
#define ASSERT(expression)
Definition: colamd.c:977
Vec3 tilde_f1
Definition: vehj3.h:48
Elem(unsigned int uL, flag fOut)
Definition: elem.cc:41
const StructNode * pNode2
Definition: vehj3.h:47
const StructNode * pNode1
Definition: vehj3.h:46
bool bFirstRes
Definition: vehj3.h:70
Vec6 tilde_kPrime
Definition: vehj3.h:59

Here is the call graph for this function:

DeformableJoint::~DeformableJoint ( void  )
virtual

Definition at line 96 of file vehj3.cc.

References NO_OP.

97 {
98  NO_OP;
99 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

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

Implements Elem.

Definition at line 648 of file vehj3.cc.

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

Referenced by ElasticJoint::AssJac().

652 {
653  FullSubMatrixHandler& WM = WorkMat.SetFull();
654 
655  /* Dimensiona e resetta la matrice di lavoro */
656  integer iNumRows = 0;
657  integer iNumCols = 0;
658  WorkSpaceDim(&iNumRows, &iNumCols);
659  WM.ResizeReset(iNumRows, iNumCols);
660 
661  /* Recupera gli indici */
662  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex();
663  integer iNode1FirstMomIndex = pNode1->iGetFirstMomentumIndex();
664  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex();
665  integer iNode2FirstMomIndex = pNode2->iGetFirstMomentumIndex();
666 
667  /* Setta gli indici della matrice */
668  for (int iCnt = 1; iCnt <= 6; iCnt++) {
669  WM.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
670  WM.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
671  WM.PutRowIndex(6 + iCnt, iNode2FirstMomIndex + iCnt);
672  WM.PutColIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
673  }
674 
675  AssMats(WM, WM, dCoef);
676 
677  return WorkMat;
678 }
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
virtual void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: vehj3.h:151
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
const StructNode * pNode2
Definition: vehj3.h:47
long int integer
Definition: colamd.c:51
const StructNode * pNode1
Definition: vehj3.h:46
virtual void AssMats(FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, doublereal dCoef)=0

Here is the call graph for this function:

void DeformableJoint::AssMatCommon ( FullSubMatrixHandler WM,
doublereal  dCoef 
)
protected

Definition at line 461 of file vehj3.cc.

References FullSubMatrixHandler::Add(), d1, d2, F, StructNode::GetRCurr(), Vec6::GetVec1(), Vec6::GetVec2(), StructDispNode::GetXCurr(), MatCross, MatCrossCross, pNode1, pNode2, FullSubMatrixHandler::Sub(), and tilde_f2.

Referenced by ElasticJoint::AssMats(), ElasticJointInv::AssMats(), ViscousJoint::AssMats(), and ViscoElasticJoint::AssMats().

462 {
463  d2 = pNode2->GetRCurr()*tilde_f2;
464  d1 = pNode2->GetXCurr() + d2 - pNode1->GetXCurr();
465 
466  Vec3 FTmp(F.GetVec1()*dCoef);
467  Mat3x3 FCross(MatCross, FTmp);
468  Mat3x3 MCross(MatCross, F.GetVec2()*dCoef);
469 
470  WM.Add(1, 4, FCross);
471  WM.Sub(4, 1, FCross);
472  WM.Add(4, 6 + 1, FCross);
473  WM.Sub(6 + 1, 4, FCross);
474 
475  Mat3x3 MTmp(MatCrossCross, FTmp, d2);
476 
477  WM.Add(6 + 4, 6 + 4, MTmp);
478  WM.Sub(4, 6 + 4, MTmp);
479 
480  MTmp = Mat3x3(MatCrossCross, d2, FTmp) + MCross;
481 
482  WM.Sub(6 + 4, 4, MTmp);
483 
484  MTmp = Mat3x3(MatCrossCross, d1, FTmp) + MCross;
485 
486  WM.Add(4, 4, MTmp);
487 }
Definition: matvec3.h:98
const Vec3 & GetVec2(void) const
Definition: matvec6.h:76
const MatCross_Manip MatCross
Definition: matvec3.cc:639
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
void Add(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:209
Vec3 tilde_f2
Definition: vehj3.h:49
const Vec3 & GetVec1(void) const
Definition: matvec6.h:72
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
const MatCrossCross_Manip MatCrossCross
Definition: matvec3.cc:640
void Sub(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:215
const StructNode * pNode2
Definition: vehj3.h:47
const StructNode * pNode1
Definition: vehj3.h:46

Here is the call graph for this function:

void DeformableJoint::AssMatElastic ( FullSubMatrixHandler WM,
doublereal  dCoef,
const Mat6x6 FDE 
)
protected

Definition at line 490 of file vehj3.cc.

References FullSubMatrixHandler::Add(), Vec3::Cross(), d1, d2, Mat6x6::GetMat11(), Mat6x6::GetMat12(), Mat6x6::GetMat21(), Mat6x6::GetMat22(), MatCross, and FullSubMatrixHandler::Sub().

Referenced by ElasticJoint::AssMats(), ElasticJointInv::AssMats(), and ViscoElasticJoint::AssMats().

492 {
493  Mat3x3 F_d = FDE.GetMat11()*dCoef;
494  Mat3x3 F_theta = FDE.GetMat12()*dCoef;
495  Mat3x3 M_d = FDE.GetMat21()*dCoef;
496  Mat3x3 M_theta = FDE.GetMat22()*dCoef;
497 
498  /* D11 */
499  WM.Add(1, 1, F_d);
500  WM.Sub(1, 6 + 1, F_d);
501  WM.Sub(6 + 1, 1, F_d);
502  WM.Add(6 + 1, 6 + 1, F_d);
503 
504  /* D11 * [d1 x] */
505  Mat3x3 FTmp = F_d*Mat3x3(MatCross, d1) - F_theta;
506 
507  WM.Sub(1, 4, FTmp);
508  WM.Add(6 + 1, 4, FTmp);
509 
510  /* */
511  Mat3x3 MTmp(M_d*Mat3x3(MatCross, d1) - M_theta);
512 
513  WM.Sub(4, 4, d1.Cross(FTmp) + MTmp);
514  WM.Add(6 + 4, 4, d2.Cross(FTmp) + MTmp);
515 
516  /* D11 * [d2 x] */
517  FTmp = F_d*Mat3x3(MatCross, d2) - F_theta;
518 
519  WM.Add(1, 6 + 4, FTmp);
520  WM.Sub(6 + 1, 6 + 4, FTmp);
521 
522  /* */
523  MTmp = M_d*Mat3x3(MatCross, d2) - M_theta;
524 
525  WM.Add(4, 6 + 4, d1.Cross(FTmp) + MTmp);
526  WM.Sub(6 + 4, 6 + 4, d2.Cross(FTmp) + MTmp);
527 
528  /* [d1 x] * D11 */
529  FTmp = d1.Cross(F_d) + M_d;
530 
531  WM.Add(4, 1, FTmp);
532  WM.Sub(4, 6 + 1, FTmp);
533 
534  /* [d2 x] * D11 */
535  FTmp = d2.Cross(F_d) + M_d;
536 
537  WM.Sub(6 + 4, 1, FTmp);
538  WM.Add(6 + 4, 6 + 1, FTmp);
539 }
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
Mat3x3 GetMat12(void)
Definition: matvec6.h:328
const MatCross_Manip MatCross
Definition: matvec3.cc:639
void Add(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:209
Mat3x3 GetMat21(void)
Definition: matvec6.h:324
Mat3x3 GetMat22(void)
Definition: matvec6.h:332
Mat3x3 GetMat11(void)
Definition: matvec6.h:320
void Sub(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:215

Here is the call graph for this function:

virtual void DeformableJoint::AssMats ( FullSubMatrixHandler WMA,
FullSubMatrixHandler WMB,
doublereal  dCoef 
)
protectedpure virtual

Implemented in ViscoElasticJoint, ViscousJoint, ElasticJointInv, and ElasticJoint.

Referenced by AssJac(), and AssMats().

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

Reimplemented from Elem.

Reimplemented in ElasticJointInv, and ElasticJoint.

Definition at line 682 of file vehj3.cc.

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

686 {
687  FullSubMatrixHandler& WMA = WorkMatA.SetFull();
688  FullSubMatrixHandler& WMB = WorkMatB.SetFull();
689 
690  /* Dimensiona e resetta la matrice di lavoro */
691  integer iNumRows = 0;
692  integer iNumCols = 0;
693  WorkSpaceDim(&iNumRows, &iNumCols);
694  WMA.ResizeReset(iNumRows, iNumCols);
695  WMB.ResizeReset(iNumRows, iNumCols);
696 
697  /* Recupera gli indici */
698  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex();
699  integer iNode1FirstMomIndex = pNode1->iGetFirstMomentumIndex();
700  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex();
701  integer iNode2FirstMomIndex = pNode2->iGetFirstMomentumIndex();
702 
703  /* Setta gli indici della matrice */
704  for (int iCnt = 1; iCnt <= 6; iCnt++) {
705  WMA.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
706  WMA.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
707  WMA.PutRowIndex(6 + iCnt, iNode2FirstMomIndex + iCnt);
708  WMA.PutColIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
709 
710  WMB.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
711  WMB.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
712  WMB.PutRowIndex(6 + iCnt, iNode2FirstMomIndex + iCnt);
713  WMB.PutColIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
714  }
715 
716  AssMats(WMA, WMB, 1.);
717 }
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
virtual void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: vehj3.h:151
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
const StructNode * pNode2
Definition: vehj3.h:47
long int integer
Definition: colamd.c:51
const StructNode * pNode1
Definition: vehj3.h:46
virtual void AssMats(FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, doublereal dCoef)=0

Here is the call graph for this function:

void DeformableJoint::AssMatViscous ( FullSubMatrixHandler WMA,
FullSubMatrixHandler WMB,
doublereal  dCoef,
const Mat6x6 FDEPrime 
)
protected

Definition at line 543 of file vehj3.cc.

References FullSubMatrixHandler::Add(), Vec3::Cross(), d1, d1Prime, d2, d2Prime, Mat6x6::GetMat11(), Mat6x6::GetMat12(), Mat6x6::GetMat21(), Mat6x6::GetMat22(), StructNode::GetWCurr(), MatCross, MatCrossCross, pNode1, pNode2, and FullSubMatrixHandler::Sub().

Referenced by ViscousJoint::AssMats(), and ViscoElasticJoint::AssMats().

546 {
547  const Mat3x3& F_dPrime = FDEPrime.GetMat11();
548  const Mat3x3& F_thetaPrime = FDEPrime.GetMat12();
549  const Mat3x3& M_dPrime = FDEPrime.GetMat21();
550  const Mat3x3& M_thetaPrime = FDEPrime.GetMat22();
551 
552  const Vec3& Omega1 = pNode1->GetWCurr();
553  const Vec3& Omega2 = pNode2->GetWCurr();
554 
555  /* D11 */
556  WMB.Add(1, 1, F_dPrime);
557  WMB.Sub(1, 6 + 1, F_dPrime);
558  WMB.Sub(6 + 1, 1, F_dPrime);
559  WMB.Add(6 + 1, 6 + 1, F_dPrime);
560 
561  /* D11 * [d1 x] */
562  Mat3x3 FTmp = F_dPrime*Mat3x3(MatCross, d1) - F_thetaPrime;
563 
564  WMB.Sub(1, 4, FTmp);
565  WMB.Add(6 + 1, 4, FTmp);
566 
567  /* */
568  Mat3x3 MTmp(M_dPrime*Mat3x3(MatCross, d1) - M_thetaPrime);
569 
570  WMB.Sub(4, 4, d1.Cross(FTmp) + MTmp);
571  WMB.Add(6 + 4, 4, d2.Cross(FTmp) + MTmp);
572 
573  /* D11 * [d2 x] */
574  FTmp = F_dPrime*Mat3x3(MatCross, d2) - F_thetaPrime;
575 
576  WMB.Add(1, 6 + 4, FTmp);
577  WMB.Sub(6 + 1, 6 + 4, FTmp);
578 
579  /* */
580  MTmp = M_dPrime*Mat3x3(MatCross, d2) - M_thetaPrime;
581 
582  WMB.Add(4, 6 + 4, d1.Cross(FTmp) + MTmp);
583  WMB.Sub(6 + 4, 6 + 4, d2.Cross(FTmp) + MTmp);
584 
585  /* [d1 x] * D11 */
586  FTmp = d1.Cross(F_dPrime) + M_dPrime;
587 
588  WMB.Add(4, 1, FTmp);
589  WMB.Sub(4, 6 + 1, FTmp);
590 
591  /* [d2 x] * D11 */
592  FTmp = d2.Cross(F_dPrime) + M_dPrime;
593 
594  WMB.Sub(6 + 4, 1, FTmp);
595  WMB.Add(6 + 4, 6 + 1, FTmp);
596 
597  // ~~~ o ~~~ o ~~~ o ~~~
598 
599  MTmp = F_dPrime*Mat3x3(MatCross, Omega1*dCoef);
600 
601  WMA.Sub(1, 1, MTmp);
602  WMA.Add(6 + 1, 1, MTmp);
603  WMA.Add(1, 6 + 1, MTmp);
604  WMA.Sub(6 + 1, 6 + 1, MTmp);
605 
606  Mat3x3 A1dP(d1.Cross(F_dPrime) + M_dPrime);
607  Mat3x3 A2dP(d2.Cross(F_dPrime) + M_dPrime);
608 
609  Mat3x3 A1tPw((d1.Cross(F_thetaPrime) + M_thetaPrime)*Mat3x3(MatCross, Omega2*dCoef));
610  Mat3x3 A2tPw((d2.Cross(F_thetaPrime) + M_thetaPrime)*Mat3x3(MatCross, Omega2*dCoef));
611 
612  Mat3x3 D1(Mat3x3(MatCross, d1Prime*dCoef) - Mat3x3(MatCrossCross, Omega1, d1*dCoef));
613  Mat3x3 D2(Mat3x3(MatCross, d2Prime*dCoef) - Mat3x3(MatCrossCross, Omega1, d2*dCoef));
614 
615  MTmp = A1dP*Mat3x3(MatCross, Omega1*dCoef);
616 
617  WMA.Sub(4, 1, MTmp);
618  WMA.Add(4, 6 + 1, MTmp);
619 
620  MTmp = A2dP*Mat3x3(MatCross, Omega1*dCoef);
621 
622  WMA.Add(6 + 4, 1, MTmp);
623  WMA.Sub(6 + 4, 6 + 1, MTmp);
624 
625  FTmp = F_thetaPrime*Mat3x3(MatCross, Omega2*dCoef);
626 
627  MTmp = F_dPrime*D1 + FTmp;
628 
629  WMA.Sub(1, 4, MTmp);
630  WMA.Add(6 + 1, 4, MTmp);
631 
632  MTmp = F_dPrime*D2 + FTmp;
633 
634  WMA.Add(1, 6 + 4, MTmp);
635  WMA.Sub(6 + 1, 6 + 4, MTmp);
636 
637  WMA.Sub(4, 4, A1dP*D1 + A1tPw);
638 
639  WMA.Add(6 + 4, 4, A2dP*D1 + A2tPw);
640 
641  WMA.Add(4, 6 + 4, A1dP*D2 + A1tPw);
642 
643  WMA.Sub(6 + 4, 6 + 4, A2dP*D2 + A2tPw);
644 }
Vec3 d2Prime
Definition: vehj3.h:73
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
Mat3x3 GetMat12(void)
Definition: matvec6.h:328
Definition: matvec3.h:98
const MatCross_Manip MatCross
Definition: matvec3.cc:639
void Add(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:209
Mat3x3 GetMat21(void)
Definition: matvec6.h:324
Mat3x3 GetMat22(void)
Definition: matvec6.h:332
Mat3x3 GetMat11(void)
Definition: matvec6.h:320
Vec3 d1Prime
Definition: vehj3.h:73
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
const MatCrossCross_Manip MatCrossCross
Definition: matvec3.cc:640
void Sub(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:215
const StructNode * pNode2
Definition: vehj3.h:47
const StructNode * pNode1
Definition: vehj3.h:46

Here is the call graph for this function:

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

Implements Elem.

Definition at line 721 of file vehj3.cc.

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

725 {
726  /* Dimensiona e resetta la matrice di lavoro */
727  integer iNumRows = 0;
728  integer iNumCols = 0;
729  WorkSpaceDim(&iNumRows, &iNumCols);
730  WorkVec.ResizeReset(iNumRows);
731 
732  /* Recupera gli indici */
733  integer iNode1FirstMomIndex = pNode1->iGetFirstMomentumIndex();
734  integer iNode2FirstMomIndex = pNode2->iGetFirstMomentumIndex();
735 
736  /* Setta gli indici della matrice */
737  for (int iCnt = 1; iCnt <= 6; iCnt++) {
738  WorkVec.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
739  WorkVec.PutRowIndex(6 + iCnt, iNode2FirstMomIndex + iCnt);
740  }
741 
742  AssVec(WorkVec);
743 
744  return WorkVec;
745 }
virtual void AssVec(SubVectorHandler &WorkVec)=0
virtual void ResizeReset(integer)
Definition: vh.cc:55
virtual void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: vehj3.h:151
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
virtual integer iGetFirstMomentumIndex(void) const =0
const StructNode * pNode2
Definition: vehj3.h:47
long int integer
Definition: colamd.c:51
const StructNode * pNode1
Definition: vehj3.h:46

Here is the call graph for this function:

SubVectorHandler & DeformableJoint::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 749 of file vehj3.cc.

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

754 {
756  || (iOrder == InverseDynamics::POSITION && bIsErgonomy()));
757 
758  bFirstRes = false;
759 
760  /* Dimensiona e resetta la matrice di lavoro */
761  integer iNumRows = 0;
762  integer iNumCols = 0;
763  WorkSpaceDim(&iNumRows, &iNumCols);
764  WorkVec.ResizeReset(iNumRows);
765 
766  /* Recupera gli indici */
767  integer iNode1FirstMomIndex = pNode1->iGetFirstPositionIndex();
768  integer iNode2FirstMomIndex = pNode2->iGetFirstPositionIndex();
769 
770  /* Setta gli indici della matrice */
771  for (int iCnt = 1; iCnt <= 6; iCnt++) {
772  WorkVec.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
773  WorkVec.PutRowIndex(6 + iCnt, iNode2FirstMomIndex + iCnt);
774  }
775 
776  AssVec(WorkVec);
777 
778  return WorkVec;
779 }
virtual void AssVec(SubVectorHandler &WorkVec)=0
virtual void ResizeReset(integer)
Definition: vh.cc:55
bool bIsErgonomy(void) const
Definition: elem.cc:83
virtual void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: vehj3.h:151
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
#define ASSERT(expression)
Definition: colamd.c:977
const StructNode * pNode2
Definition: vehj3.h:47
long int integer
Definition: colamd.c:51
const StructNode * pNode1
Definition: vehj3.h:46
bool bFirstRes
Definition: vehj3.h:70

Here is the call graph for this function:

virtual void DeformableJoint::AssVec ( SubVectorHandler WorkVec)
protectedpure virtual
bool DeformableJoint::bInverseDynamics ( void  ) const
virtual

Reimplemented from Elem.

Definition at line 278 of file vehj3.cc.

279 {
280  return true;
281 }
doublereal DeformableJoint::dGetPrivData ( unsigned int  i) const
virtual

Reimplemented from ConstitutiveLawOwner< T, Tder >.

Definition at line 393 of file vehj3.cc.

References ASSERT, grad::Cross(), ConstitutiveLawOwner< T, Tder >::dGetPrivData(), ConstitutiveLawOwner< T, Tder >::GetF(), StructNode::GetRCurr(), StructDispNode::GetVCurr(), StructNode::GetWCurr(), StructDispNode::GetXCurr(), iGetNumPrivData(), pNode1, pNode2, tilde_f1, tilde_f2, tilde_R1h, tilde_R2h, Mat3x3::Transpose(), grad::Transpose(), and RotManip::VecRot().

394 {
395  ASSERT(i > 0);
396 
397  ASSERT(i <= iGetNumPrivData());
398 
399  switch (i) {
400  case 1:
401  case 2:
402  case 3:
403  {
404  Vec3 f1(pNode1->GetRCurr()*tilde_f1);
405  Vec3 f2(pNode2->GetRCurr()*tilde_f2);
407  Vec3 tilde_d(R1hT*(pNode2->GetXCurr() + f2 - pNode1->GetXCurr() - f1));
408 
409  return tilde_d(i);
410  }
411 
412  case 4:
413  case 5:
414  case 6:
415  {
418 
419  Vec3 tilde_Theta(RotManip::VecRot(R1hT*R2h));
420 
421  return tilde_Theta(i - 3);
422  }
423 
424  case 7:
425  case 8:
426  case 9:
427  {
428  Vec3 f2(pNode2->GetRCurr()*tilde_f2);
429  Mat3x3 R1hT(pNode1->GetRCurr().Transpose());
430  Vec3 tilde_dPrime(R1hT*(pNode2->GetVCurr() - pNode1->GetVCurr()
432  - f2.Cross(pNode2->GetWCurr() - pNode1->GetWCurr())));
433 
434  return tilde_dPrime(i - 6);
435  }
436 
437  case 10:
438  case 11:
439  case 12:
440  {
442  Vec3 tilde_Omega = R1hT*(pNode2->GetWCurr() - pNode1->GetWCurr());
443 
444  return tilde_Omega(i - 9);
445  }
446 
447  case 13:
448  case 14:
449  case 15:
450  case 16:
451  case 17:
452  case 18:
453  return GetF()(i - 12);
454 
455  default:
457  }
458 }
MatrixExpression< TransposedMatrix< MatrixDirectExpr< Matrix< T, N_rows, N_cols > > >, N_cols, N_rows > Transpose(const Matrix< T, N_rows, N_cols > &A)
Definition: matvec.h:2206
Definition: matvec3.h:98
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
Mat3x3 tilde_R2h
Definition: vehj3.h:51
Vec3 tilde_f2
Definition: vehj3.h:49
Vec3 VecRot(const Mat3x3 &Phi)
Definition: Rot.cc:136
Mat3x3 tilde_R1h
Definition: vehj3.h:50
virtual unsigned int iGetNumPrivData(void) const
Definition: vehj3.cc:322
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
#define ASSERT(expression)
Definition: colamd.c:977
VectorExpression< VectorCrossExpr< VectorLhsExpr, VectorRhsExpr >, 3 > Cross(const VectorExpression< VectorLhsExpr, 3 > &u, const VectorExpression< VectorRhsExpr, 3 > &v)
Definition: matvec.h:3248
Vec3 tilde_f1
Definition: vehj3.h:48
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
virtual doublereal dGetPrivData(unsigned int i) const
Definition: constltp.h:369
Mat3x3 Transpose(void) const
Definition: matvec3.h:816
const T & GetF(void) const
Definition: constltp.h:293
virtual const Vec3 & GetVCurr(void) const
Definition: strnode.h:322
const StructNode * pNode2
Definition: vehj3.h:47
const StructNode * pNode1
Definition: vehj3.h:46

Here is the call graph for this function:

virtual void DeformableJoint::GetConnectedNodes ( std::vector< const Node * > &  connectedNodes) const
inlinevirtual

Reimplemented from Elem.

Definition at line 169 of file vehj3.h.

References pNode1, and pNode2.

169  {
170  connectedNodes.resize(2);
171  connectedNodes[0] = pNode1;
172  connectedNodes[1] = pNode2;
173  };
const StructNode * pNode2
Definition: vehj3.h:47
const StructNode * pNode1
Definition: vehj3.h:46
virtual ConstLawType::Type DeformableJoint::GetConstLawType ( void  ) const
pure virtual

Implemented in ViscoElasticJoint, ViscousJoint, ElasticJointInv, and ElasticJoint.

Referenced by Output().

virtual DofOrder::Order DeformableJoint::GetDofType ( unsigned int  ) const
inlinevirtual

Reimplemented from ConstitutiveLawOwner< T, Tder >.

Definition at line 147 of file vehj3.h.

References DofOrder::UNKNOWN.

147  {
148  return DofOrder::UNKNOWN;
149  };
virtual Joint::Type DeformableJoint::GetJointType ( void  ) const
inlinevirtual

Implements Joint.

Definition at line 120 of file vehj3.h.

References Joint::DEFORMABLEJOINT.

120  {
121  return Joint::DEFORMABLEJOINT;
122  };
virtual unsigned int DeformableJoint::iGetInitialNumDof ( void  ) const
inlinevirtual

Implements SubjectToInitialAssembly.

Definition at line 158 of file vehj3.h.

158  {
159  return 0;
160  };
virtual unsigned int DeformableJoint::iGetNumDof ( void  ) const
inlinevirtual

Reimplemented from ConstitutiveLawOwner< T, Tder >.

Definition at line 143 of file vehj3.h.

143  {
144  return 0;
145  };
unsigned int DeformableJoint::iGetNumPrivData ( void  ) const
virtual

Reimplemented from ConstitutiveLawOwner< T, Tder >.

Definition at line 322 of file vehj3.cc.

References ConstitutiveLawOwner< T, Tder >::iGetNumPrivData().

Referenced by dGetPrivData().

323 {
325 }
virtual unsigned int iGetNumPrivData(void) const
Definition: constltp.h:352

Here is the call graph for this function:

unsigned int DeformableJoint::iGetPrivDataIdx ( const char *  s) const
virtual

Reimplemented from ConstitutiveLawOwner< T, Tder >.

Definition at line 328 of file vehj3.cc.

References ASSERT, ConstitutiveLawOwner< T, Tder >::iGetPrivDataIdx(), and STRLENOF.

329 {
330  ASSERT(s != NULL);
331 
332  unsigned idx = 0;
333 
334  switch (s[0]) {
335  case 'd':
336  break;
337 
338  case 'r':
339  idx += 3;
340  break;
341 
342  case 'v':
343  idx += 6;
344  break;
345 
346  case 'w':
347  idx += 9;
348  break;
349 
350  case 'F':
351  idx += 12;
352  break;
353 
354  case 'M':
355  idx += 15;
356  break;
357 
358  default:
359  {
360  size_t l = STRLENOF("constitutiveLaw.");
361  if (strncmp(s, "constitutiveLaw.", l) == 0) {
363  if (idx > 0) {
364  return 18 + idx;
365  }
366  }
367  return 0;
368  }
369  }
370 
371  switch (s[1]) {
372  case 'x':
373  idx += 1;
374  break;
375  case 'y':
376  idx += 2;
377  break;
378  case 'z':
379  idx += 3;
380  break;
381  default:
382  return 0;
383  }
384 
385  if (s[2] != '\0') {
386  return 0;
387  }
388 
389  return idx;
390 }
virtual unsigned int iGetPrivDataIdx(const char *s) const
Definition: constltp.h:361
#define ASSERT(expression)
Definition: colamd.c:977
#define STRLENOF(s)
Definition: mbdyn.h:166

Here is the call graph for this function:

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

Implements SubjectToInitialAssembly.

Definition at line 783 of file vehj3.cc.

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

785 {
786  /* Dimensiona e resetta la matrice di lavoro */
787  integer iNumRows = 0;
788  integer iNumCols = 0;
789  InitialWorkSpaceDim(&iNumRows, &iNumCols);
790  WorkVec.ResizeReset(iNumRows);
791 
792  /* Recupera gli indici */
793  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex();
794  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex();
795 
796  /* Setta gli indici della matrice */
797  for (int iCnt = 1; iCnt <= 6; iCnt++) {
798  WorkVec.PutRowIndex(iCnt, iNode1FirstPosIndex + iCnt);
799  WorkVec.PutRowIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
800  }
801 
802  AssVec(WorkVec);
803 
804  return WorkVec;
805 }
virtual void AssVec(SubVectorHandler &WorkVec)=0
virtual void ResizeReset(integer)
Definition: vh.cc:55
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const =0
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
const StructNode * pNode2
Definition: vehj3.h:47
long int integer
Definition: colamd.c:51
const StructNode * pNode1
Definition: vehj3.h:46

Here is the call graph for this function:

void DeformableJoint::Output ( OutputHandler OH) const
virtual

Reimplemented from ToBeOutput.

Definition at line 143 of file vehj3.cc.

References ToBeOutput::bToBeOutput(), dRaDegr, EULER_123, EULER_313, EULER_321, F, GetConstLawType(), OutputHandler::GetCurrentStep(), ConstitutiveLawOwner< T, Tder >::GetF(), WithLabel::GetLabel(), StructNode::GetRCurr(), Vec6::GetVec1(), OutputHandler::JOINTS, OutputHandler::Joints(), MatR2EulerAngles123(), MatR2EulerAngles313(), MatR2EulerAngles321(), Mat3x3::MulTM(), od, ORIENTATION_MATRIX, ORIENTATION_VECTOR, Joint::Output(), Mat3x3::pGetMat(), Vec3::pGetVec(), pNode1, pNode2, R, R1h, tilde_k, tilde_kPrime, tilde_R1h, tilde_R2h, OutputHandler::UseNetCDF(), OutputHandler::UseText(), RotManip::VecRot(), and ConstLawType::VISCOUS.

144 {
145  if (bToBeOutput()) {
148  Mat3x3 R(R1h.MulTM(R2h));
149  Vec3 F(GetF().GetVec1());
150  Vec3 M(GetF().GetVec2());
151  Vec3 E;
152 
153  // angular strain
154  switch (od) {
155  case EULER_123:
157  break;
158 
159  case EULER_313:
161  break;
162 
163  case EULER_321:
165  break;
166 
167  case ORIENTATION_VECTOR:
168  E = RotManip::VecRot(R);
169  break;
170 
171  case ORIENTATION_MATRIX:
172  break;
173 
174  default:
175  /* impossible */
176  break;
177  }
178 
179 
180 #ifdef USE_NETCDF
182  Var_F_local->put_rec((R1h*F).pGetVec(), OH.GetCurrentStep());
183  Var_M_local->put_rec((R1h*M).pGetVec(), OH.GetCurrentStep());
184  Var_F_global->put_rec(F.pGetVec(), OH.GetCurrentStep());
185  Var_M_global->put_rec(M.pGetVec(), OH.GetCurrentStep());
186 
187  switch (od) {
188  case EULER_123:
189  case EULER_313:
190  case EULER_321:
191  case ORIENTATION_VECTOR:
192  Var_Phi->put_rec(E.pGetVec(), OH.GetCurrentStep());
193  break;
194  case ORIENTATION_MATRIX:
195  Var_Phi->put_rec(R.pGetMat(), OH.GetCurrentStep());
196  break;
197  default:
198  /* impossible */
199  break;
200  }
201  }
202 #endif // USE_NETCDF
203  if (OH.UseText(OutputHandler::JOINTS)) {
204  Joint::Output(OH.Joints(), "DeformableJoint", GetLabel(),
205  F, M, R1h*F, R1h*M);
206 
207  // linear strain
208  OH.Joints() << " " << tilde_k.GetVec1() << " ";
209 
210  // Angular strain
211  switch (od) {
212  case EULER_123:
213  case EULER_313:
214  case EULER_321:
215  case ORIENTATION_VECTOR:
216  OH.Joints() << E;
217  break;
218  case ORIENTATION_MATRIX:
219  OH.Joints() << R;
220  break;
221  default:
222  /* impossible */
223  break;
224  }
225 
227  OH.Joints() << " " << tilde_kPrime;
228  }
229 
230  OH.Joints() << std::endl;
231  }
232  }
233 }
virtual bool bToBeOutput(void) const
Definition: output.cc:890
Definition: matvec3.h:98
OrientationDescription od
Definition: vehj3.h:53
Vec6 tilde_k
Definition: vehj3.h:56
bool UseNetCDF(int out) const
Definition: output.cc:491
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
Mat3x3 tilde_R2h
Definition: vehj3.h:51
Mat3x3 R1h
Definition: vehj3.h:74
Vec3 VecRot(const Mat3x3 &Phi)
Definition: Rot.cc:136
Mat3x3 tilde_R1h
Definition: vehj3.h:50
const Vec3 & GetVec1(void) const
Definition: matvec6.h:72
Vec3 MatR2EulerAngles313(const Mat3x3 &R)
Definition: matvec3.cc:927
long GetCurrentStep(void) const
Definition: output.h:116
Vec3 MatR2EulerAngles123(const Mat3x3 &R)
Definition: matvec3.cc:893
virtual ConstLawType::Type GetConstLawType(void) const =0
const doublereal dRaDegr
Definition: matvec3.cc:884
std::ostream & Joints(void) const
Definition: output.h:443
Mat3x3 MulTM(const Mat3x3 &m) const
Definition: matvec3.cc:500
const doublereal * pGetMat(void) const
Definition: matvec3.h:743
const T & GetF(void) const
Definition: constltp.h:293
const doublereal * pGetVec(void) const
Definition: matvec3.h:192
Vec3 MatR2EulerAngles321(const Mat3x3 &R)
Definition: matvec3.cc:941
const StructNode * pNode2
Definition: vehj3.h:47
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
Definition: joint.cc:138
unsigned int GetLabel(void) const
Definition: withlab.cc:62
const StructNode * pNode1
Definition: vehj3.h:46
Mat3x3 R
bool UseText(int out) const
Definition: output.cc:446
Vec6 tilde_kPrime
Definition: vehj3.h:59

Here is the call graph for this function:

void DeformableJoint::OutputPrepare ( OutputHandler OH)
virtual

Reimplemented from ToBeOutput.

Definition at line 119 of file vehj3.cc.

References ToBeOutput::bToBeOutput(), OutputHandler::JOINTS, od, Joint::OutputPrepare_int(), and OutputHandler::UseNetCDF().

120 {
121  if (bToBeOutput()) {
122 #ifdef USE_NETCDF
124  std::string name;
125  OutputPrepare_int("deformable joint", OH, name);
126  Var_tilde_d = OH.CreateVar<Vec3>(name + "d", "m",
127  "relative position in local frame (x, y, z)");
128  Var_tilde_dPrime = OH.CreateVar<Vec3>(name + "dPrime", "m/s",
129  "relative linear velocity in local frame (x, y, z)");
130  Var_d = OH.CreateVar<Vec3>(name + "D", "m",
131  "relative position in global frame (x, y, z)");
132  Var_dPrime = OH.CreateVar<Vec3>(name + "DPrime", "m/s",
133  "relative linear velocity in global frame (x, y, z)");
134  Var_Phi = OH.CreateRotationVar(name, "", od, "global");
135  Var_Omega = OH.CreateVar<Vec3>(name + "Omega", "radian/s",
136  "local relative angular velocity (x, y, z)");
137  }
138 #endif
139  }
140 }
virtual bool bToBeOutput(void) const
Definition: output.cc:890
Definition: matvec3.h:98
OrientationDescription od
Definition: vehj3.h:53
bool UseNetCDF(int out) const
Definition: output.cc:491
virtual void OutputPrepare_int(const std::string &type, OutputHandler &OH, std::string &name)
Definition: joint.cc:107

Here is the call graph for this function:

Hint * DeformableJoint::ParseHint ( DataManager pDM,
const char *  s 
) const
virtual

Reimplemented from SimulationEntity.

Definition at line 284 of file vehj3.cc.

References SimulationEntity::ParseHint(), and STRLENOF.

285 {
286  if (strncasecmp(s, "offset{" /*}*/ , STRLENOF("offset{" /*}*/ )) == 0)
287  {
288  s += STRLENOF("offset{" /*}*/ );
289 
290  if (strcmp(&s[1], /*{*/ "}") != 0) {
291  return 0;
292  }
293 
294  switch (s[0]) {
295  case '1':
296  return new Joint::OffsetHint<1>;
297 
298  case '2':
299  return new Joint::OffsetHint<2>;
300  }
301 
302  } else if (strncasecmp(s, "hinge{" /*}*/, STRLENOF("hinge{" /*}*/)) == 0) {
303  s += STRLENOF("hinge{" /*}*/);
304 
305  if (strcmp(&s[1], /*{*/ "}") != 0) {
306  return 0;
307  }
308 
309  switch (s[0]) {
310  case '1':
311  return new Joint::HingeHint<1>;
312 
313  case '2':
314  return new Joint::HingeHint<2>;
315  }
316  }
317 
318  return ConstitutiveLaw6DOwner::ParseHint(pDM, s);
319 }
virtual Hint * ParseHint(DataManager *pDM, const char *s) const
Definition: simentity.cc:76
#define STRLENOF(s)
Definition: mbdyn.h:166

Here is the call graph for this function:

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

Implements Elem.

Definition at line 104 of file vehj3.cc.

References WithLabel::GetLabel(), Mat3x3::GetVec(), ConstitutiveLawOwner< T, Tder >::pGetConstLaw(), pNode1, pNode2, Joint::Restart(), tilde_f1, tilde_f2, tilde_R1h, tilde_R2h, Write(), and Vec3::Write().

105 {
106  Joint::Restart(out) << ", deformable joint, "
107  << pNode1->GetLabel() << ", reference, node, ",
108  tilde_f1.Write(out, ", ") << ", hinge, reference, node, 1, ",
109  (tilde_R1h.GetVec(1)).Write(out, ", ")
110  << ", 2, ", (tilde_R1h.GetVec(2)).Write(out, ", ") << ", "
111  << pNode2->GetLabel() << ", reference, node, ",
112  tilde_f2.Write(out, ", ") << ", hinge, reference, node, 1, ",
113  (tilde_R2h.GetVec(1)).Write(out, ", ")
114  << ", 2, ", (tilde_R2h.GetVec(2)).Write(out, ", ") << ", ";
115  return pGetConstLaw()->Restart(out) << ';' << std::endl;
116 }
std::ostream & Write(std::ostream &out, const char *sFill=" ") const
Definition: matvec3.cc:738
ConstitutiveLaw< T, Tder > * pGetConstLaw(void) const
Definition: constltp.h:278
Mat3x3 tilde_R2h
Definition: vehj3.h:51
std::ostream & Write(std::ostream &out, const FullMatrixHandler &m, const char *s, const char *s2)
Definition: fullmh.cc:376
Vec3 tilde_f2
Definition: vehj3.h:49
Vec3 GetVec(unsigned short int i) const
Definition: matvec3.h:893
Mat3x3 tilde_R1h
Definition: vehj3.h:50
virtual std::ostream & Restart(std::ostream &out) const
Definition: joint.h:195
Vec3 tilde_f1
Definition: vehj3.h:48
const StructNode * pNode2
Definition: vehj3.h:47
unsigned int GetLabel(void) const
Definition: withlab.cc:62
const StructNode * pNode1
Definition: vehj3.h:46

Here is the call graph for this function:

void DeformableJoint::SetValue ( DataManager pDM,
VectorHandler X,
VectorHandler XP,
SimulationEntity::Hints ph = 0 
)
virtual

Reimplemented from Joint.

Definition at line 236 of file vehj3.cc.

References StructNode::GetRCurr(), StructDispNode::GetXCurr(), pNode1, pNode2, SimulationEntity::SetValue(), tilde_f1, tilde_f2, tilde_R1h, tilde_R2h, and Mat3x3::Transpose().

239 {
240  if (ph) {
241  for (unsigned i = 0; i < ph->size(); i++) {
242  Joint::JointHint *pjh = dynamic_cast<Joint::JointHint *>((*ph)[i]);
243 
244  if (pjh) {
245  if (dynamic_cast<Joint::OffsetHint<1> *>(pjh)) {
246  Mat3x3 R1t(pNode1->GetRCurr().Transpose());
247  Vec3 f2(pNode2->GetRCurr()*tilde_f2);
248 
249  tilde_f1 = R1t*(pNode2->GetXCurr() + f2 - pNode1->GetXCurr());
250 
251  } else if (dynamic_cast<Joint::OffsetHint<2> *>(pjh)) {
252  Mat3x3 R2t(pNode2->GetRCurr().Transpose());
253  Vec3 f1(pNode1->GetRCurr()*tilde_f1);
254 
255  tilde_f2 = R2t*(pNode1->GetXCurr() + f1 - pNode2->GetXCurr());
256 
257  } else if (dynamic_cast<Joint::HingeHint<1> *>(pjh)) {
259 
260  } else if (dynamic_cast<Joint::HingeHint<2> *>(pjh)) {
262 
263  } else if (dynamic_cast<Joint::ReactionsHint *>(pjh)) {
264  /* TODO */
265  }
266 
267  continue;
268  }
269 
270  /* else, pass to constitutive law */
271  ConstitutiveLaw6DOwner::SetValue(pDM, X, XP, ph);
272  }
273  }
274 }
Definition: matvec3.h:98
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
Mat3x3 tilde_R2h
Definition: vehj3.h:51
Vec3 tilde_f2
Definition: vehj3.h:49
Mat3x3 tilde_R1h
Definition: vehj3.h:50
Vec3 tilde_f1
Definition: vehj3.h:48
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
Mat3x3 Transpose(void) const
Definition: matvec3.h:816
virtual void SetValue(DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *h=0)
Definition: simentity.cc:63
const StructNode * pNode2
Definition: vehj3.h:47
const StructNode * pNode1
Definition: vehj3.h:46

Here is the call graph for this function:

virtual void DeformableJoint::WorkSpaceDim ( integer piNumRows,
integer piNumCols 
) const
inlinevirtual

Implements Elem.

Definition at line 151 of file vehj3.h.

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

151  {
152  *piNumRows = 12;
153  *piNumCols = 12;
154  };

Member Data Documentation

Vec3 DeformableJoint::d1Prime
protected
Vec3 DeformableJoint::d2Prime
protected
Vec6 DeformableJoint::F
protected
OrientationDescription DeformableJoint::od
protected

Definition at line 53 of file vehj3.h.

Referenced by Output(), and OutputPrepare().


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