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

#include <vehj2.h>

Inheritance diagram for ElasticDispJoint:
Collaboration diagram for ElasticDispJoint:

Public Member Functions

 ElasticDispJoint (unsigned int uL, const DofOwner *pDO, const ConstitutiveLaw3D *pCL, const StructNode *pN1, const StructNode *pN2, const Vec3 &tilde_f1, const Vec3 &tilde_f2, const Mat3x3 &tilde_R1, const Mat3x3 &tilde_R2, flag fOut)
 
 ~ElasticDispJoint (void)
 
virtual ConstLawType::Type GetConstLawType (void) const
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP)
 
virtual void AfterPredict (VectorHandler &X, VectorHandler &XP)
 
virtual void AssMats (VariableSubMatrixHandler &WorkMatA, VariableSubMatrixHandler &WorkMatB, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual SubVectorHandlerAssRes (SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
VariableSubMatrixHandlerAssJac (VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
 
SubVectorHandlerAssRes (SubVectorHandler &WorkVec, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr, const VectorHandler &XPrimePrimeCurr, InverseDynamics::Order iOrder=InverseDynamics::INVERSE_DYNAMICS)
 
void Update (const VectorHandler &XCurr, InverseDynamics::Order iOrder=InverseDynamics::INVERSE_DYNAMICS)
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP, const VectorHandler &XPP)
 
virtual void InitialWorkSpaceDim (integer *piNumRows, integer *piNumCols) const
 
virtual VariableSubMatrixHandlerInitialAssJac (VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
 
virtual SubVectorHandlerInitialAssRes (SubVectorHandler &WorkVec, const VectorHandler &XCurr)
 
- Public Member Functions inherited from Elem
 Elem (unsigned int uL, flag fOut)
 
virtual ~Elem (void)
 
virtual std::ostream & DescribeDof (std::ostream &out, const char *prefix="", bool bInitial=false) const
 
virtual void DescribeDof (std::vector< std::string > &desc, bool bInitial=false, int i=-1) const
 
virtual std::ostream & DescribeEq (std::ostream &out, const char *prefix="", bool bInitial=false) const
 
virtual void DescribeEq (std::vector< std::string > &desc, bool bInitial=false, int i=-1) const
 
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 DeformableDispJoint
 DeformableDispJoint (unsigned int uL, const DofOwner *pDO, const ConstitutiveLaw3D *pCL, const StructNode *pN1, const StructNode *pN2, const Vec3 &tilde_f1, const Vec3 &tilde_f2, const Mat3x3 &tilde_R1, const Mat3x3 &tilde_R2, flag fOut)
 
virtual ~DeformableDispJoint (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 unsigned int iGetNumDof (void) const
 
virtual DofOrder::Order GetDofType (unsigned int) const
 
virtual void WorkSpaceDim (integer *piNumRows, integer *piNumCols) const
 
virtual bool bInverseDynamics (void) const
 
virtual unsigned int iGetInitialNumDof (void) const
 
virtual VariableSubMatrixHandlerAssJac (VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
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
 
- 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 DeformableDispJoint
void AssMatF (FullSubMatrixHandler &WMA, const Vec3 &d1, const Vec3 &d2, doublereal dCoef)
 
void AssMatFDE (FullSubMatrixHandler &WMA, const Vec3 &d1, const Vec3 &d2, doublereal dCoef)
 
void AssMatFDEPrime (FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, const Vec3 &d1, const Vec3 &d2, doublereal dCoef)
 
- 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
 

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
}
 
- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 
- Protected Attributes inherited from ToBeOutput
flag fOutput
 
- Protected Attributes inherited from DeformableDispJoint
const StructNodepNode1
 
const StructNodepNode2
 
Vec3 tilde_f1
 
Vec3 tilde_f2
 
Mat3x3 tilde_R1h
 
Mat3x3 tilde_R2h
 
Vec3 tilde_R1hT_tilde_f1
 
Vec3 tilde_d
 
Vec3 tilde_dPrime
 
bool bFirstRes
 
Vec3 F
 
Mat3x3 FDE
 
Mat3x3 FDEPrime
 
- Protected Attributes inherited from GravityOwner
GravitypGravity
 
- Protected Attributes inherited from ConstitutiveLawOwner< T, Tder >
ConstitutiveLaw< T, Tder > * pConstLaw
 

Detailed Description

Definition at line 180 of file vehj2.h.

Constructor & Destructor Documentation

ElasticDispJoint::ElasticDispJoint ( unsigned int  uL,
const DofOwner pDO,
const ConstitutiveLaw3D pCL,
const StructNode pN1,
const StructNode pN2,
const Vec3 tilde_f1,
const Vec3 tilde_f2,
const Mat3x3 tilde_R1,
const Mat3x3 tilde_R2,
flag  fOut 
)

Definition at line 590 of file vehj2.cc.

References DeformableDispJoint::FDE, ConstitutiveLawOwner< T, Tder >::GetFDE(), StructNode::GetRRef(), DeformableDispJoint::pNode1, and DeformableDispJoint::tilde_R1h.

600 : Elem(uL, fOut),
601 DeformableDispJoint(uL, pDO, pCL, pN1, pN2, tilde_f1, tilde_f2, tilde_R1h, tilde_R2h, fOut)
602 {
603  /*
604  * Chiede la matrice tangente di riferimento
605  * e la porta nel sistema globale
606  */
607  Mat3x3 R1h(pNode1->GetRRef()*tilde_R1h);
608  FDE = R1h*GetFDE().MulMT(R1h);
609 }
virtual const Mat3x3 & GetRRef(void) const
Definition: strnode.h:1006
const Tder & GetFDE(void) const
Definition: constltp.h:298
const StructNode * pNode1
Definition: vehj2.h:46
Mat3x3 tilde_R2h
Definition: vehj2.h:51
Mat3x3 tilde_R1h
Definition: vehj2.h:50
DeformableDispJoint(unsigned int uL, const DofOwner *pDO, const ConstitutiveLaw3D *pCL, const StructNode *pN1, const StructNode *pN2, const Vec3 &tilde_f1, const Vec3 &tilde_f2, const Mat3x3 &tilde_R1, const Mat3x3 &tilde_R2, flag fOut)
Definition: vehj2.cc:43
Elem(unsigned int uL, flag fOut)
Definition: elem.cc:41

Here is the call graph for this function:

ElasticDispJoint::~ElasticDispJoint ( void  )

Definition at line 611 of file vehj2.cc.

References NO_OP.

612 {
613  NO_OP;
614 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

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

Reimplemented from SimulationEntity.

Definition at line 617 of file vehj2.cc.

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

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

Here is the call graph for this function:

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

Reimplemented from SimulationEntity.

Definition at line 754 of file vehj2.cc.

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

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

Here is the call graph for this function:

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

Reimplemented from SimulationEntity.

Definition at line 785 of file vehj2.cc.

References DeformableDispJoint::bFirstRes, DeformableDispJoint::FDE, ConstitutiveLawOwner< T, Tder >::GetFDE(), StructNode::GetRCurr(), StructDispNode::GetXCurr(), DeformableDispJoint::pNode1, DeformableDispJoint::pNode2, DeformableDispJoint::tilde_d, DeformableDispJoint::tilde_f2, DeformableDispJoint::tilde_R1h, DeformableDispJoint::tilde_R1hT_tilde_f1, and ConstitutiveLawOwner< T, Tder >::Update().

Referenced by AssJac().

786 {
788  Vec3 d2(pNode2->GetRCurr()*tilde_f2);
789 
790  tilde_d = R1h.MulTV(pNode2->GetXCurr() + d2 - pNode1->GetXCurr())
792 
794 
795  /* FIXME: we need to be able to regenerate FDE
796  * if the constitutive law throws ChangedEquationStructure */
797  FDE = R1h*GetFDE().MulMT(R1h);
798 
799  bFirstRes = true;
800 }
Definition: matvec3.h:98
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
const Tder & GetFDE(void) const
Definition: constltp.h:298
const StructNode * pNode1
Definition: vehj2.h:46
Vec3 tilde_R1hT_tilde_f1
Definition: vehj2.h:52
Mat3x3 tilde_R1h
Definition: vehj2.h:50
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
const StructNode * pNode2
Definition: vehj2.h:47
void Update(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:283

Here is the call graph for this function:

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

Reimplemented from Elem.

Definition at line 699 of file vehj2.cc.

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

701 {
702  ASSERT(bIsErgonomy());
703 
704  // HACK? Need to call AfterPredict() here to update MDE and so
705  // const_cast because AfterPredict() does not modify X, XP
706  AfterPredict(const_cast<VectorHandler&>(XCurr), const_cast<VectorHandler&>(XCurr));
707 
708  return DeformableDispJoint::AssJac(WorkMat, 1., XCurr, XCurr);
709 }
virtual void AfterPredict(VectorHandler &X, VectorHandler &XP)
Definition: vehj2.cc:785
bool bIsErgonomy(void) const
Definition: elem.cc:83
virtual VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: vehj2.cc:248
#define ASSERT(expression)
Definition: colamd.c:977

Here is the call graph for this function:

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

Implements DeformableDispJoint.

Definition at line 658 of file vehj2.cc.

References DeformableDispJoint::AssMatF(), DeformableDispJoint::AssMatFDE(), StructNode::GetRCurr(), StructDispNode::GetXCurr(), DeformableDispJoint::pNode1, DeformableDispJoint::pNode2, and DeformableDispJoint::tilde_f2.

Referenced by AssMats(), and InitialAssJac().

661 {
662  Vec3 d2(pNode2->GetRCurr()*tilde_f2);
663  Vec3 d1(pNode2->GetXCurr() + d2 - pNode1->GetXCurr());
664 
665  AssMatF(WMA, d1, d2, dCoef);
666  AssMatFDE(WMA, d1, d2, dCoef);
667 }
Definition: matvec3.h:98
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
const StructNode * pNode1
Definition: vehj2.h:46
void AssMatF(FullSubMatrixHandler &WMA, const Vec3 &d1, const Vec3 &d2, doublereal dCoef)
Definition: vehj2.cc:83
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
void AssMatFDE(FullSubMatrixHandler &WMA, const Vec3 &d1, const Vec3 &d2, doublereal dCoef)
Definition: vehj2.cc:108
const StructNode * pNode2
Definition: vehj2.h:47

Here is the call graph for this function:

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

Reimplemented from Elem.

Definition at line 625 of file vehj2.cc.

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

629 {
630  FullSubMatrixHandler& WMA = WorkMatA.SetFull();
631  WorkMatB.SetNullMatrix();
632 
633  /* Dimensiona e resetta la matrice di lavoro */
634  integer iNumRows = 0;
635  integer iNumCols = 0;
636  WorkSpaceDim(&iNumRows, &iNumCols);
637  WMA.ResizeReset(iNumRows, iNumCols);
638 
639  /* Recupera gli indici */
640  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex();
641  integer iNode1FirstMomIndex = pNode1->iGetFirstMomentumIndex();
642  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex();
643  integer iNode2FirstMomIndex = pNode2->iGetFirstMomentumIndex();
644 
645  /* Setta gli indici della matrice */
646  for (int iCnt = 1; iCnt <= 6; iCnt++) {
647  WMA.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
648  WMA.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
649  WMA.PutRowIndex(6 + iCnt, iNode2FirstMomIndex + iCnt);
650  WMA.PutColIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
651  }
652 
653  // NOTE: the second instance of WMA is ignored (see below)
654  AssMats(WMA, WMA, 1.);
655 }
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
const StructNode * pNode1
Definition: vehj2.h:46
void AssMats(FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, doublereal dCoef)
Definition: vehj2.cc:658
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
const StructNode * pNode2
Definition: vehj2.h:47
virtual void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const =0
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

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

Implements Elem.

Definition at line 671 of file vehj2.cc.

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

675 {
676  /* Dimensiona e resetta la matrice di lavoro */
677  integer iNumRows = 0;
678  integer iNumCols = 0;
679  WorkSpaceDim(&iNumRows, &iNumCols);
680  WorkVec.ResizeReset(iNumRows);
681 
682  /* Recupera gli indici */
683  integer iNode1FirstMomIndex = pNode1->iGetFirstMomentumIndex();
684  integer iNode2FirstMomIndex = pNode2->iGetFirstMomentumIndex();
685 
686  /* Setta gli indici della matrice */
687  for (int iCnt = 1; iCnt <= 6; iCnt++) {
688  WorkVec.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
689  WorkVec.PutRowIndex(6 + iCnt, iNode2FirstMomIndex + iCnt);
690  }
691 
692  AssVec(WorkVec);
693 
694  return WorkVec;
695 }
virtual void ResizeReset(integer)
Definition: vh.cc:55
const StructNode * pNode1
Definition: vehj2.h:46
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
virtual integer iGetFirstMomentumIndex(void) const =0
void AssVec(SubVectorHandler &WorkVec)
Definition: vehj2.cc:761
const StructNode * pNode2
Definition: vehj2.h:47
virtual void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const =0
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

SubVectorHandler & ElasticDispJoint::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 713 of file vehj2.cc.

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

718 {
720  || (iOrder == InverseDynamics::POSITION && bIsErgonomy()));
721 
722  bFirstRes = false;
723 
724  /* Dimensiona e resetta la matrice di lavoro */
725  integer iNumRows = 0;
726  integer iNumCols = 0;
727  WorkSpaceDim(&iNumRows, &iNumCols);
728  WorkVec.ResizeReset(iNumRows);
729 
730  /* Recupera gli indici */
731  integer iNode1FirstMomIndex = pNode1->iGetFirstPositionIndex();
732  integer iNode2FirstMomIndex = pNode2->iGetFirstPositionIndex();
733 
734  /* Setta gli indici della matrice */
735  for (int iCnt = 1; iCnt <= 6; iCnt++) {
736  WorkVec.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
737  WorkVec.PutRowIndex(6 + iCnt, iNode2FirstMomIndex + iCnt);
738  }
739 
740  AssVec(WorkVec);
741 
742  return WorkVec;
743 }
virtual void ResizeReset(integer)
Definition: vh.cc:55
bool bIsErgonomy(void) const
Definition: elem.cc:83
const StructNode * pNode1
Definition: vehj2.h:46
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
void AssVec(SubVectorHandler &WorkVec)
Definition: vehj2.cc:761
#define ASSERT(expression)
Definition: colamd.c:977
const StructNode * pNode2
Definition: vehj2.h:47
virtual void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const =0
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

void ElasticDispJoint::AssVec ( SubVectorHandler WorkVec)
protected

Definition at line 761 of file vehj2.cc.

References VectorHandler::Add(), DeformableDispJoint::bFirstRes, DeformableDispJoint::F, ConstitutiveLawOwner< T, Tder >::GetF(), StructNode::GetRCurr(), StructDispNode::GetXCurr(), DeformableDispJoint::pNode1, DeformableDispJoint::pNode2, VectorHandler::Sub(), DeformableDispJoint::tilde_d, DeformableDispJoint::tilde_f2, DeformableDispJoint::tilde_R1h, DeformableDispJoint::tilde_R1hT_tilde_f1, and ConstitutiveLawOwner< T, Tder >::Update().

Referenced by AssRes(), and InitialAssRes().

762 {
764  Vec3 d2(pNode2->GetRCurr()*tilde_f2);
765  Vec3 d1(pNode2->GetXCurr() + d2 - pNode1->GetXCurr());
766 
767  if (bFirstRes) {
768  bFirstRes = false;
769 
770  } else {
771  tilde_d = R1h.MulTV(d1) - tilde_R1hT_tilde_f1;
772 
774  }
775 
776  F = R1h*GetF();
777 
778  WorkVec.Add(1, F);
779  WorkVec.Add(4, d1.Cross(F));
780  WorkVec.Sub(6 + 1, F);
781  WorkVec.Sub(6 + 4, d2.Cross(F));
782 }
Definition: matvec3.h:98
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: vehj2.h:46
Vec3 tilde_R1hT_tilde_f1
Definition: vehj2.h:52
Mat3x3 tilde_R1h
Definition: vehj2.h:50
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: vehj2.h:47
void Update(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:283

Here is the call graph for this function:

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

Implements DeformableDispJoint.

Definition at line 202 of file vehj2.h.

References ConstLawType::ELASTIC.

202  {
203  return ConstLawType::ELASTIC;
204  };
VariableSubMatrixHandler & ElasticDispJoint::InitialAssJac ( VariableSubMatrixHandler WorkMat,
const VectorHandler XCurr 
)
virtual

Implements SubjectToInitialAssembly.

Definition at line 804 of file vehj2.cc.

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

806 {
807  FullSubMatrixHandler& WM = WorkMat.SetFull();
808 
809  /* Dimensiona e resetta la matrice di lavoro */
810  integer iNumRows = 0;
811  integer iNumCols = 0;
812  InitialWorkSpaceDim(&iNumRows, &iNumCols);
813  WM.ResizeReset(iNumRows, iNumCols);
814 
815  /* Recupera gli indici */
816  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex();
817  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex();
818 
819  /* Setta gli indici della matrice */
820  for (int iCnt = 1; iCnt <= 6; iCnt++) {
821  WM.PutRowIndex(iCnt, iNode1FirstPosIndex + iCnt);
822  WM.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
823  WM.PutRowIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
824  WM.PutColIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
825  }
826 
827  AssMats(WM, WM, 1.);
828 
829  return WorkMat;
830 }
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
const StructNode * pNode1
Definition: vehj2.h:46
void AssMats(FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, doublereal dCoef)
Definition: vehj2.cc:658
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: vehj2.h:248
void PutRowIndex(integer iSubRow, integer iRow)
Definition: submat.h:311
const StructNode * pNode2
Definition: vehj2.h:47
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

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

Implements SubjectToInitialAssembly.

Definition at line 834 of file vehj2.cc.

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

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

Here is the call graph for this function:

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

Implements SubjectToInitialAssembly.

Definition at line 248 of file vehj2.h.

Referenced by InitialAssJac(), and InitialAssRes().

248  {
249  *piNumRows = 12;
250  *piNumCols = 12;
251  };
void ElasticDispJoint::Update ( const VectorHandler XCurr,
InverseDynamics::Order  iOrder = InverseDynamics::INVERSE_DYNAMICS 
)
virtual

Reimplemented from SimulationEntity.

Definition at line 747 of file vehj2.cc.

References NO_OP.

748 {
749  NO_OP;
750 }
#define NO_OP
Definition: myassert.h:74

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