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

#include <vehj2.h>

Inheritance diagram for ElasticDispJointInv:
Collaboration diagram for ElasticDispJointInv:

Public Member Functions

 ElasticDispJointInv (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)
 
 ~ElasticDispJointInv (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)
 
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
 
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 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 &)
 
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 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 294 of file vehj2.h.

Constructor & Destructor Documentation

ElasticDispJointInv::ElasticDispJointInv ( 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 863 of file vehj2.cc.

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

873 : Elem(uL, fOut),
874 DeformableDispJoint(uL, pDO, pCL, pN1, pN2, tilde_f1, tilde_f2, tilde_R1h, tilde_R2h, fOut)
875 {
876  /*
877  * Chiede la matrice tangente di riferimento
878  * e la porta nel sistema globale
879  */
880  Mat3x3 R1h(pNode1->GetRRef()*tilde_R1h);
881  FDE = R1h*GetFDE().MulMT(R1h);
882 }
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:

ElasticDispJointInv::~ElasticDispJointInv ( void  )

Definition at line 884 of file vehj2.cc.

References NO_OP.

885 {
886  NO_OP;
887 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

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

Reimplemented from SimulationEntity.

Definition at line 890 of file vehj2.cc.

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

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

Here is the call graph for this function:

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

Reimplemented from SimulationEntity.

Definition at line 1037 of file vehj2.cc.

References DeformableDispJoint::bFirstRes, DeformableDispJoint::FDE, ConstitutiveLawOwner< T, Tder >::GetFDE(), StructNode::GetRCurr(), StructNode::GetRRef(), StructDispNode::GetXCurr(), DeformableDispJoint::pNode1, DeformableDispJoint::pNode2, RotManip::Rot(), DeformableDispJoint::tilde_d, DeformableDispJoint::tilde_f1, DeformableDispJoint::tilde_f2, DeformableDispJoint::tilde_R1h, DeformableDispJoint::tilde_R2h, ConstitutiveLawOwner< T, Tder >::Update(), and RotManip::VecRot().

1038 {
1039  Mat3x3 R1h(pNode1->GetRRef()*tilde_R1h);
1040  Mat3x3 R2h(pNode2->GetRRef()*tilde_R2h);
1041  Vec3 ThetaCurr = RotManip::VecRot(R1h.MulTM(R2h));
1042  Mat3x3 hat_R(R1h*RotManip::Rot(ThetaCurr/2.));
1043 
1044  Vec3 f1(pNode1->GetRCurr()*tilde_f1);
1045  Vec3 f2(pNode2->GetRCurr()*tilde_f2);
1046  tilde_d = hat_R.MulTV(pNode2->GetXCurr() + f2 - pNode1->GetXCurr() - f1);
1047 
1049 
1050  /* FIXME: we need to be able to regenerate FDE
1051  * if the constitutive law throws ChangedEquationStructure */
1052  FDE = hat_R*GetFDE().MulMT(hat_R);
1053 
1054  bFirstRes = true;
1055 }
virtual const Mat3x3 & GetRRef(void) const
Definition: strnode.h:1006
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
Mat3x3 tilde_R2h
Definition: vehj2.h:51
Vec3 VecRot(const Mat3x3 &Phi)
Definition: Rot.cc:136
Mat3x3 tilde_R1h
Definition: vehj2.h:50
Mat3x3 Rot(const Vec3 &phi)
Definition: Rot.cc:62
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:

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

Implements DeformableDispJoint.

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

934 {
935  Vec3 d2(pNode2->GetRCurr()*tilde_f2);
936  Vec3 d1(pNode2->GetXCurr() + d2 - pNode1->GetXCurr());
937 
938  AssMatF(WMA, d1, d2, dCoef);
939  AssMatFDE(WMA, d1, d2, dCoef);
940 }
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 ElasticDispJointInv::AssMats ( VariableSubMatrixHandler WorkMatA,
VariableSubMatrixHandler WorkMatB,
const VectorHandler XCurr,
const VectorHandler XPrimeCurr 
)
virtual

Reimplemented from Elem.

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

902 {
903  FullSubMatrixHandler& WMA = WorkMatA.SetFull();
904  WorkMatB.SetNullMatrix();
905 
906  /* Dimensiona e resetta la matrice di lavoro */
907  integer iNumRows = 0;
908  integer iNumCols = 0;
909  WorkSpaceDim(&iNumRows, &iNumCols);
910  WMA.ResizeReset(iNumRows, iNumCols);
911 
912  /* Recupera gli indici */
913  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex();
914  integer iNode1FirstMomIndex = pNode1->iGetFirstMomentumIndex();
915  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex();
916  integer iNode2FirstMomIndex = pNode2->iGetFirstMomentumIndex();
917 
918  /* Setta gli indici della matrice */
919  for (int iCnt = 1; iCnt <= 6; iCnt++) {
920  WMA.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
921  WMA.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
922  WMA.PutRowIndex(6 + iCnt, iNode2FirstMomIndex + iCnt);
923  WMA.PutColIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
924  }
925 
926  // NOTE: the second instance of WMA is ignored (see below)
927  AssMats(WMA, WMA, 1.);
928 }
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 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
void AssMats(FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, doublereal dCoef)
Definition: vehj2.cc:931

Here is the call graph for this function:

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

Implements Elem.

Definition at line 944 of file vehj2.cc.

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

948 {
949  /* Dimensiona e resetta la matrice di lavoro */
950  integer iNumRows = 0;
951  integer iNumCols = 0;
952  WorkSpaceDim(&iNumRows, &iNumCols);
953  WorkVec.ResizeReset(iNumRows);
954 
955  /* Recupera gli indici */
956  integer iNode1FirstMomIndex = pNode1->iGetFirstMomentumIndex();
957  integer iNode2FirstMomIndex = pNode2->iGetFirstMomentumIndex();
958 
959  /* Setta gli indici della matrice */
960  for (int iCnt = 1; iCnt <= 6; iCnt++) {
961  WorkVec.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
962  WorkVec.PutRowIndex(6 + iCnt, iNode2FirstMomIndex + iCnt);
963  }
964 
965  AssVec(WorkVec);
966 
967  return WorkVec;
968 }
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:1004
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 & ElasticDispJointInv::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 972 of file vehj2.cc.

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

977 {
979 
980  bFirstRes = false;
981 
982  /* Dimensiona e resetta la matrice di lavoro */
983  integer iNumRows = 0;
984  integer iNumCols = 0;
985  WorkSpaceDim(&iNumRows, &iNumCols);
986  WorkVec.ResizeReset(iNumRows);
987 
988  /* Recupera gli indici */
989  integer iNode1FirstMomIndex = pNode1->iGetFirstPositionIndex();
990  integer iNode2FirstMomIndex = pNode2->iGetFirstPositionIndex();
991 
992  /* Setta gli indici della matrice */
993  for (int iCnt = 1; iCnt <= 6; iCnt++) {
994  WorkVec.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
995  WorkVec.PutRowIndex(6 + iCnt, iNode2FirstMomIndex + iCnt);
996  }
997 
998  AssVec(WorkVec);
999 
1000  return WorkVec;
1001 }
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
#define ASSERT(expression)
Definition: colamd.c:977
void AssVec(SubVectorHandler &WorkVec)
Definition: vehj2.cc:1004
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 ElasticDispJointInv::AssVec ( SubVectorHandler WorkVec)
protected

Definition at line 1004 of file vehj2.cc.

References VectorHandler::Add(), DeformableDispJoint::bFirstRes, Eye3, DeformableDispJoint::F, ConstitutiveLawOwner< T, Tder >::GetF(), StructNode::GetRCurr(), StructNode::GetRRef(), StructDispNode::GetXCurr(), grad::Inv(), Mat3x3::MulTV(), DeformableDispJoint::pNode1, DeformableDispJoint::pNode2, RotManip::Rot(), VectorHandler::Sub(), DeformableDispJoint::tilde_d, DeformableDispJoint::tilde_f1, DeformableDispJoint::tilde_f2, DeformableDispJoint::tilde_R1h, DeformableDispJoint::tilde_R2h, ConstitutiveLawOwner< T, Tder >::Update(), and RotManip::VecRot().

Referenced by AssRes(), and InitialAssRes().

1005 {
1006  Mat3x3 R1h(pNode1->GetRRef()*tilde_R1h);
1007  Mat3x3 R2h(pNode2->GetRRef()*tilde_R2h);
1008  Vec3 ThetaCurr = RotManip::VecRot(R1h.MulTM(R2h));
1009  Mat3x3 tilde_R = RotManip::Rot(ThetaCurr/2.);
1010  Mat3x3 hat_R(R1h*tilde_R);
1011 
1012  Mat3x3 hat_I = hat_R*((Eye3 + tilde_R).Inv()).MulMT(hat_R);
1013 
1014  Vec3 f1(pNode1->GetRCurr()*tilde_f1);
1015  Vec3 f2(pNode2->GetRCurr()*tilde_f2);
1016  Vec3 d(pNode2->GetXCurr() + f2 - pNode1->GetXCurr() - f1);
1017 
1018  if (bFirstRes) {
1019  bFirstRes = false;
1020 
1021  } else {
1022  tilde_d = hat_R.MulTV(d);
1023 
1025  }
1026 
1027  F = hat_R*GetF();
1028 
1029  Vec3 dCrossF(d.Cross(F));
1030  WorkVec.Add(1, F);
1031  WorkVec.Add(4, f1.Cross(F) + hat_I*dCrossF);
1032  WorkVec.Sub(6 + 1, F);
1033  WorkVec.Sub(6 + 4, f2.Cross(F) - hat_I.MulTV(dCrossF));
1034 }
virtual const Mat3x3 & GetRRef(void) const
Definition: strnode.h:1006
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 Mat3x3 Eye3(1., 0., 0., 0., 1., 0., 0., 0., 1.)
const StructNode * pNode1
Definition: vehj2.h:46
Mat3x3 tilde_R2h
Definition: vehj2.h:51
Vec3 VecRot(const Mat3x3 &Phi)
Definition: Rot.cc:136
Vec3 MulTV(const Vec3 &v) const
Definition: matvec3.cc:482
Mat3x3 tilde_R1h
Definition: vehj2.h:50
Matrix< T, 2, 2 > Inv(const Matrix< T, 2, 2 > &A)
Definition: matvec.h:3282
Mat3x3 Rot(const Vec3 &phi)
Definition: Rot.cc:62
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 ElasticDispJointInv::GetConstLawType ( void  ) const
inlinevirtual

Implements DeformableDispJoint.

Definition at line 316 of file vehj2.h.

References ConstLawType::ELASTIC.

316  {
317  return ConstLawType::ELASTIC;
318  };
VariableSubMatrixHandler & ElasticDispJointInv::InitialAssJac ( VariableSubMatrixHandler WorkMat,
const VectorHandler XCurr 
)
virtual

Implements SubjectToInitialAssembly.

Definition at line 1059 of file vehj2.cc.

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

1061 {
1062  FullSubMatrixHandler& WM = WorkMat.SetFull();
1063 
1064  /* Dimensiona e resetta la matrice di lavoro */
1065  integer iNumRows = 0;
1066  integer iNumCols = 0;
1067  InitialWorkSpaceDim(&iNumRows, &iNumCols);
1068  WM.ResizeReset(iNumRows, iNumCols);
1069 
1070  /* Recupera gli indici */
1071  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex();
1072  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex();
1073 
1074  /* Setta gli indici della matrice */
1075  for (int iCnt = 1; iCnt <= 6; iCnt++) {
1076  WM.PutRowIndex(iCnt, iNode1FirstPosIndex + iCnt);
1077  WM.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
1078  WM.PutRowIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
1079  WM.PutColIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
1080  }
1081 
1082  AssMats(WM, WM, 1.);
1083 
1084  return WorkMat;
1085 }
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
const StructNode * pNode1
Definition: vehj2.h:46
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:349
void PutRowIndex(integer iSubRow, integer iRow)
Definition: submat.h:311
const StructNode * pNode2
Definition: vehj2.h:47
long int integer
Definition: colamd.c:51
void AssMats(FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, doublereal dCoef)
Definition: vehj2.cc:931

Here is the call graph for this function:

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

Implements SubjectToInitialAssembly.

Definition at line 1089 of file vehj2.cc.

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

1091 {
1092  /* Dimensiona e resetta la matrice di lavoro */
1093  integer iNumRows = 0;
1094  integer iNumCols = 0;
1095  InitialWorkSpaceDim(&iNumRows, &iNumCols);
1096  WorkVec.ResizeReset(iNumRows);
1097 
1098  /* Recupera gli indici */
1099  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex();
1100  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex();
1101 
1102  /* Setta gli indici della matrice */
1103  for (int iCnt = 1; iCnt <= 6; iCnt++) {
1104  WorkVec.PutRowIndex(iCnt, iNode1FirstPosIndex + iCnt);
1105  WorkVec.PutRowIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
1106  }
1107 
1108  AssVec(WorkVec);
1109 
1110  return WorkVec;
1111 }
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
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: vehj2.h:349
void AssVec(SubVectorHandler &WorkVec)
Definition: vehj2.cc:1004
const StructNode * pNode2
Definition: vehj2.h:47
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

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

Implements SubjectToInitialAssembly.

Definition at line 349 of file vehj2.h.

Referenced by InitialAssJac(), and InitialAssRes().

349  {
350  *piNumRows = 12;
351  *piNumCols = 12;
352  };

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