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

#include <vehj2.h>

Inheritance diagram for ViscoElasticDispJoint:
Collaboration diagram for ViscoElasticDispJoint:

Public Member Functions

 ViscoElasticDispJoint (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)
 
 ~ViscoElasticDispJoint (void)
 
virtual ConstLawType::Type GetConstLawType (void) const
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP)
 
virtual void AfterPredict (VectorHandler &X, VectorHandler &XP)
 
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)
 
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 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 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 void AssMats (VariableSubMatrixHandler &WorkMatA, VariableSubMatrixHandler &WorkMatB, 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 &WorkMatA, FullSubMatrixHandler &WorkMatB, 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 496 of file vehj2.h.

Constructor & Destructor Documentation

ViscoElasticDispJoint::ViscoElasticDispJoint ( 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 1391 of file vehj2.cc.

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

1401 : Elem(uL, fOut),
1402 DeformableDispJoint(uL, pDO, pCL, pN1, pN2, tilde_f1, tilde_f2, tilde_R1h, tilde_R2h, fOut)
1403 {
1404  /*
1405  * Chiede la matrice tangente di riferimento
1406  * e la porta nel sistema globale
1407  */
1408  Mat3x3 R1h(pNode1->GetRRef()*tilde_R1h);
1409  Mat3x3 R1hT(R1h.Transpose());
1410  FDE = R1h*GetFDE()*R1hT;
1411  FDEPrime = R1h*GetFDEPrime()*R1hT;
1412 }
Mat3x3 FDEPrime
Definition: vehj2.h:62
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
const Tder & GetFDEPrime(void) const
Definition: constltp.h:303

Here is the call graph for this function:

ViscoElasticDispJoint::~ViscoElasticDispJoint ( void  )

Definition at line 1414 of file vehj2.cc.

References NO_OP.

1415 {
1416  NO_OP;
1417 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

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

Reimplemented from SimulationEntity.

Definition at line 1420 of file vehj2.cc.

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

1422 {
1424 }
Vec3 tilde_dPrime
Definition: vehj2.h:55
void AfterConvergence(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:288

Here is the call graph for this function:

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

Reimplemented from SimulationEntity.

Definition at line 1513 of file vehj2.cc.

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

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

Here is the call graph for this function:

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

Reimplemented from SimulationEntity.

Definition at line 1550 of file vehj2.cc.

References DeformableDispJoint::bFirstRes, Vec3::Cross(), DeformableDispJoint::FDE, DeformableDispJoint::FDEPrime, ConstitutiveLawOwner< T, Tder >::GetFDE(), ConstitutiveLawOwner< T, Tder >::GetFDEPrime(), StructNode::GetRCurr(), StructDispNode::GetVCurr(), StructNode::GetWCurr(), StructDispNode::GetXCurr(), DeformableDispJoint::pNode1, DeformableDispJoint::pNode2, DeformableDispJoint::tilde_d, DeformableDispJoint::tilde_dPrime, DeformableDispJoint::tilde_f2, DeformableDispJoint::tilde_R1h, DeformableDispJoint::tilde_R1hT_tilde_f1, and ConstitutiveLawOwner< T, Tder >::Update().

1551 {
1552  Mat3x3 R1h(pNode1->GetRCurr()*tilde_R1h);
1553  Mat3x3 R1hT(R1h.Transpose());
1554  Vec3 d2(pNode2->GetRCurr()*tilde_f2);
1555  Vec3 d1(pNode2->GetXCurr() + d2 - pNode1->GetXCurr());
1556  Vec3 d1Prime(pNode2->GetVCurr()
1557  + pNode2->GetWCurr().Cross(d2)
1558  - pNode1->GetVCurr());
1559 
1560  tilde_d = R1hT*d1 - tilde_R1hT_tilde_f1;
1561  tilde_dPrime = R1hT*(d1Prime - pNode1->GetWCurr().Cross(d1));
1562 
1564 
1565  /* FIXME: we need to be able to regenerate FDE and FDEPrime
1566  * if the constitutive law throws ChangedEquationStructure */
1567  FDE = R1h*GetFDE()*R1hT;
1568  FDEPrime = R1h*GetFDEPrime()*R1hT;
1569 
1570  bFirstRes = true;
1571 }
Mat3x3 FDEPrime
Definition: vehj2.h:62
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
Vec3 tilde_dPrime
Definition: vehj2.h:55
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 & GetWCurr(void) const
Definition: strnode.h:1030
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
const StructNode * pNode2
Definition: vehj2.h:47
virtual const Vec3 & GetVCurr(void) const
Definition: strnode.h:322
const Tder & GetFDEPrime(void) const
Definition: constltp.h:303
void Update(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:283

Here is the call graph for this function:

void ViscoElasticDispJoint::AssMats ( FullSubMatrixHandler WorkMatA,
FullSubMatrixHandler WorkMatB,
doublereal  dCoef 
)
protectedvirtual

Implements DeformableDispJoint.

Definition at line 1428 of file vehj2.cc.

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

1431 {
1432  Vec3 d2(pNode2->GetRCurr()*tilde_f2);
1433  Vec3 d1(pNode2->GetXCurr() + d2 - pNode1->GetXCurr());
1434 
1435  AssMatF(WMA, d1, d2, dCoef);
1436  AssMatFDE(WMA, d1, d2, dCoef);
1437  AssMatFDEPrime(WMA, WMB, d1, d2, dCoef);
1438 }
void AssMatFDEPrime(FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, const Vec3 &d1, const Vec3 &d2, doublereal dCoef)
Definition: vehj2.cc:168
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:

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

Implements Elem.

Definition at line 1442 of file vehj2.cc.

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

1446 {
1447  /* Dimensiona e resetta la matrice di lavoro */
1448  integer iNumRows = 0;
1449  integer iNumCols = 0;
1450  WorkSpaceDim(&iNumRows, &iNumCols);
1451  WorkVec.ResizeReset(iNumRows);
1452 
1453  /* Recupera gli indici */
1454  integer iNode1FirstMomIndex = pNode1->iGetFirstMomentumIndex();
1455  integer iNode2FirstMomIndex = pNode2->iGetFirstMomentumIndex();
1456 
1457  /* Setta gli indici della matrice */
1458  for (int iCnt = 1; iCnt <= 6; iCnt++) {
1459  WorkVec.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
1460  WorkVec.PutRowIndex(6 + iCnt, iNode2FirstMomIndex + iCnt);
1461  }
1462 
1463  AssVec(WorkVec);
1464 
1465  return WorkVec;
1466 }
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
const StructNode * pNode2
Definition: vehj2.h:47
void AssVec(SubVectorHandler &WorkVec)
Definition: vehj2.cc:1520
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 & ViscoElasticDispJoint::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 1470 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().

1475 {
1477 
1478  bFirstRes = false;
1479 
1480  /* Dimensiona e resetta la matrice di lavoro */
1481  integer iNumRows = 0;
1482  integer iNumCols = 0;
1483  WorkSpaceDim(&iNumRows, &iNumCols);
1484  WorkVec.ResizeReset(iNumRows);
1485 
1486  /* Recupera gli indici */
1487  integer iNode1FirstMomIndex = pNode1->iGetFirstPositionIndex();
1488  integer iNode2FirstMomIndex = pNode2->iGetFirstPositionIndex();
1489 
1490  /* Setta gli indici della matrice */
1491  for (int iCnt = 1; iCnt <= 6; iCnt++) {
1492  WorkVec.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
1493  WorkVec.PutRowIndex(6 + iCnt, iNode2FirstMomIndex + iCnt);
1494  }
1495 
1496  AssVec(WorkVec);
1497 
1498  return WorkVec;
1499 }
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
const StructNode * pNode2
Definition: vehj2.h:47
void AssVec(SubVectorHandler &WorkVec)
Definition: vehj2.cc:1520
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 ViscoElasticDispJoint::AssVec ( SubVectorHandler WorkVec)
protected

Definition at line 1520 of file vehj2.cc.

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

Referenced by AssRes().

1521 {
1522  Mat3x3 R1h(pNode1->GetRCurr()*tilde_R1h);
1523  Vec3 d2(pNode2->GetRCurr()*tilde_f2);
1524  Vec3 d1(pNode2->GetXCurr() + d2 - pNode1->GetXCurr());
1525 
1526  if (bFirstRes) {
1527  bFirstRes = false;
1528 
1529  } else {
1530  Mat3x3 R1hT(R1h.Transpose());
1531  Vec3 d1Prime(pNode2->GetVCurr()
1532  + pNode2->GetWCurr().Cross(d2)
1533  - pNode1->GetVCurr());
1534 
1535  tilde_d = R1hT*d1 - tilde_R1hT_tilde_f1;
1536  tilde_dPrime = R1hT*(d1Prime - pNode1->GetWCurr().Cross(d1));
1537 
1539  }
1540 
1541  Vec3 F(R1h*GetF());
1542 
1543  WorkVec.Add(1, F);
1544  WorkVec.Add(4, d1.Cross(F));
1545  WorkVec.Sub(6 + 1, F);
1546  WorkVec.Sub(6 + 4, d2.Cross(F));
1547 }
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
Vec3 tilde_dPrime
Definition: vehj2.h:55
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 & GetWCurr(void) const
Definition: strnode.h:1030
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
virtual const Vec3 & GetVCurr(void) const
Definition: strnode.h:322
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 ViscoElasticDispJoint::GetConstLawType ( void  ) const
inlinevirtual

Implements DeformableDispJoint.

Definition at line 519 of file vehj2.h.

References ConstLawType::VISCOELASTIC.

519  {
521  };
VariableSubMatrixHandler & ViscoElasticDispJoint::InitialAssJac ( VariableSubMatrixHandler WorkMat,
const VectorHandler XCurr 
)
virtual

Implements SubjectToInitialAssembly.

Definition at line 1575 of file vehj2.cc.

References FullSubMatrixHandler::Add(), DeformableDispJoint::F, DeformableDispJoint::FDE, DeformableDispJoint::FDEPrime, ConstitutiveLawOwner< T, Tder >::GetF(), ConstitutiveLawOwner< T, Tder >::GetFDE(), ConstitutiveLawOwner< T, Tder >::GetFDEPrime(), StructNode::GetRRef(), StructNode::GetWRef(), StructDispNode::iGetFirstPositionIndex(), InitialWorkSpaceDim(), MatCross, DeformableDispJoint::pNode1, DeformableDispJoint::pNode2, FullSubMatrixHandler::PutColIndex(), FullSubMatrixHandler::PutRowIndex(), FullSubMatrixHandler::ResizeReset(), VariableSubMatrixHandler::SetFull(), FullSubMatrixHandler::Sub(), and DeformableDispJoint::tilde_R1h.

1577 {
1578  FullSubMatrixHandler& WM = WorkMat.SetFull();
1579 
1580  /* Dimensiona e resetta la matrice di lavoro */
1581  integer iNumRows = 0;
1582  integer iNumCols = 0;
1583  InitialWorkSpaceDim(&iNumRows, &iNumCols);
1584  WM.ResizeReset(iNumRows, iNumCols);
1585 
1586  /* Recupera gli indici */
1587  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex();
1588  integer iNode1FirstVelIndex = iNode1FirstPosIndex + 6;
1589  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex();
1590  integer iNode2FirstVelIndex = iNode2FirstPosIndex + 6;
1591 
1592  /* Setta gli indici della matrice */
1593  for (int iCnt = 1; iCnt <= 6; iCnt++) {
1594  WM.PutRowIndex(iCnt, iNode1FirstPosIndex + iCnt);
1595  WM.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
1596  WM.PutColIndex(6 + iCnt, iNode1FirstVelIndex + iCnt);
1597 
1598  WM.PutRowIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
1599  WM.PutColIndex(12 + iCnt, iNode2FirstPosIndex + iCnt);
1600  WM.PutColIndex(18 + iCnt, iNode2FirstVelIndex + iCnt);
1601  }
1602 
1603  Mat3x3 R1h(pNode1->GetRRef()*tilde_R1h);
1604  Vec3 Omega1(pNode1->GetWRef());
1605  Vec3 Omega2(pNode2->GetWRef());
1606 
1607  Vec3 F(R1h*GetF());
1608  Mat3x3 FDE(R1h*GetFDE().MulMT(R1h));
1609  Mat3x3 FDEPrime(R1h*GetFDEPrime().MulMT(R1h));
1610 
1611  Mat3x3 Tmp(Mat3x3(MatCross, F) - FDEPrime*Mat3x3(MatCross, Omega2 - Omega1) + FDE);
1612 
1613  // FIXME: check and rewrite
1614 
1615  WM.Add(1, 1, Tmp);
1616  WM.Sub(4, 1, Tmp);
1617 
1618  WM.Add(4, 6 + 1, FDE);
1619  WM.Sub(1, 6 + 1, FDE);
1620 
1621  WM.Add(1, 4, FDEPrime);
1622  WM.Add(4, 6 + 4, FDEPrime);
1623 
1624  WM.Sub(1, 6 + 4, FDEPrime);
1625  WM.Sub(4, 4, FDEPrime);
1626 
1627  return WorkMat;
1628 }
Mat3x3 FDEPrime
Definition: vehj2.h:62
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
virtual const Mat3x3 & GetRRef(void) const
Definition: strnode.h:1006
Definition: matvec3.h:98
const MatCross_Manip MatCross
Definition: matvec3.cc:639
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
void Add(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:209
const Tder & GetFDE(void) const
Definition: constltp.h:298
const StructNode * pNode1
Definition: vehj2.h:46
virtual const Vec3 & GetWRef(void) const
Definition: strnode.h:1024
Mat3x3 tilde_R1h
Definition: vehj2.h:50
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: vehj2.h:553
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 T & GetF(void) const
Definition: constltp.h:293
const StructNode * pNode2
Definition: vehj2.h:47
void Sub(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:215
const Tder & GetFDEPrime(void) const
Definition: constltp.h:303
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

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

Implements SubjectToInitialAssembly.

Definition at line 1632 of file vehj2.cc.

References VectorHandler::Add(), Vec3::Cross(), DeformableDispJoint::F, ConstitutiveLawOwner< T, Tder >::GetF(), StructNode::GetRCurr(), StructDispNode::GetVCurr(), StructNode::GetWCurr(), StructDispNode::GetXCurr(), StructDispNode::iGetFirstPositionIndex(), InitialWorkSpaceDim(), DeformableDispJoint::pNode1, DeformableDispJoint::pNode2, SubVectorHandler::PutRowIndex(), VectorHandler::ResizeReset(), VectorHandler::Sub(), DeformableDispJoint::tilde_d, DeformableDispJoint::tilde_dPrime, DeformableDispJoint::tilde_f2, DeformableDispJoint::tilde_R1h, DeformableDispJoint::tilde_R1hT_tilde_f1, and ConstitutiveLawOwner< T, Tder >::Update().

1634 {
1635  /* Dimensiona e resetta la matrice di lavoro */
1636  integer iNumRows = 0;
1637  integer iNumCols = 0;
1638  InitialWorkSpaceDim(&iNumRows, &iNumCols);
1639  WorkVec.ResizeReset(iNumRows);
1640 
1641  /* Recupera gli indici */
1642  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex();
1643  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex();
1644 
1645  /* Setta gli indici della matrice */
1646  for (int iCnt = 1; iCnt <= 6; iCnt++) {
1647  WorkVec.PutRowIndex(iCnt, iNode1FirstPosIndex + iCnt);
1648  WorkVec.PutRowIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
1649  }
1650 
1651  Mat3x3 R1h(pNode1->GetRCurr()*tilde_R1h);
1652  Vec3 d2(pNode2->GetRCurr()*tilde_f2);
1653  Vec3 d1(pNode2->GetXCurr() + d2 - pNode1->GetXCurr());
1654 
1655  Mat3x3 R1hT(R1h.Transpose());
1656  Vec3 d1Prime(pNode2->GetVCurr()
1657  + pNode2->GetWCurr().Cross(d2)
1658  - pNode1->GetVCurr());
1659 
1660  tilde_d = R1hT*d1 - tilde_R1hT_tilde_f1;
1661  tilde_dPrime = R1hT*(d1Prime - pNode1->GetWCurr().Cross(d1));
1662 
1664 
1665  Vec3 F(R1h*GetF());
1666 
1667  WorkVec.Add(1, F);
1668  WorkVec.Add(4, d1.Cross(F));
1669  WorkVec.Sub(6 + 1, F);
1670  WorkVec.Sub(6 + 4, d2.Cross(F));
1671 
1672  return WorkVec;
1673 }
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
Vec3 tilde_dPrime
Definition: vehj2.h:55
Definition: matvec3.h:98
virtual void ResizeReset(integer)
Definition: vh.cc:55
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
virtual void Sub(integer iRow, const Vec3 &v)
Definition: vh.cc:78
const StructNode * pNode1
Definition: vehj2.h:46
Vec3 tilde_R1hT_tilde_f1
Definition: vehj2.h:52
Mat3x3 tilde_R1h
Definition: vehj2.h:50
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: vehj2.h:553
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
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
virtual const Vec3 & GetVCurr(void) const
Definition: strnode.h:322
long int integer
Definition: colamd.c:51
void Update(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:283

Here is the call graph for this function:

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

Implements SubjectToInitialAssembly.

Definition at line 553 of file vehj2.h.

Referenced by InitialAssJac(), and InitialAssRes().

553  {
554  *piNumRows = 12;
555  *piNumCols = 24;
556  };
void ViscoElasticDispJoint::Update ( const VectorHandler XCurr,
InverseDynamics::Order  iOrder = InverseDynamics::INVERSE_DYNAMICS 
)
virtual

Reimplemented from SimulationEntity.

Definition at line 1503 of file vehj2.cc.

References InverseDynamics::INVERSE_DYNAMICS, and Joint::Update().

1504 {
1505  if (iOrder != InverseDynamics::INVERSE_DYNAMICS) {
1506  // issue "default" warning message
1507  Joint::Update(XCurr, iOrder);
1508  }
1509 }
virtual void Update(const VectorHandler &XCurr, InverseDynamics::Order iOrder=InverseDynamics::INVERSE_DYNAMICS)
Definition: joint.cc:163

Here is the call graph for this function:


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