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

#include <vehj2.h>

Inheritance diagram for ViscousDispJoint:
Collaboration diagram for ViscousDispJoint:

Public Member Functions

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

Constructor & Destructor Documentation

ViscousDispJoint::ViscousDispJoint ( 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 1118 of file vehj2.cc.

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

1128 : Elem(uL, fOut),
1129 DeformableDispJoint(uL, pDO, pCL, pN1, pN2, tilde_f1, tilde_f2, tilde_R1h, tilde_R2h, fOut)
1130 {
1131  /*
1132  * Chiede la matrice tangente di riferimento
1133  * e la porta nel sistema globale
1134  */
1135  Mat3x3 R1h(pNode1->GetRRef()*tilde_R1h);
1136  FDEPrime = R1h*GetFDEPrime()*R1h.Transpose();
1137 }
Mat3x3 FDEPrime
Definition: vehj2.h:62
virtual const Mat3x3 & GetRRef(void) const
Definition: strnode.h:1006
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:

ViscousDispJoint::~ViscousDispJoint ( void  )

Definition at line 1139 of file vehj2.cc.

References NO_OP.

1140 {
1141  NO_OP;
1142 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

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

Reimplemented from SimulationEntity.

Definition at line 1145 of file vehj2.cc.

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

1147 {
1149 }
const Vec3 Zero3(0., 0., 0.)
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 ViscousDispJoint::AfterConvergence ( const VectorHandler X,
const VectorHandler XP,
const VectorHandler XPP 
)
virtual

Reimplemented from SimulationEntity.

Definition at line 1236 of file vehj2.cc.

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

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

Here is the call graph for this function:

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

Reimplemented from SimulationEntity.

Definition at line 1272 of file vehj2.cc.

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

1273 {
1274  Mat3x3 R1h(pNode1->GetRCurr()*tilde_R1h);
1275  Mat3x3 R1hT(R1h.Transpose());
1276  Vec3 d2(pNode2->GetRCurr()*tilde_f2);
1277  Vec3 d1(pNode2->GetXCurr() + d2 - pNode1->GetXCurr());
1278  Vec3 d1Prime(pNode2->GetVCurr()
1279  + pNode2->GetWCurr().Cross(d2)
1280  - pNode1->GetVCurr());
1281 
1282  tilde_dPrime = R1h.Transpose()*(d1Prime
1283  - pNode1->GetWCurr().Cross(d1));
1284 
1285  ConstitutiveLaw3DOwner::Update(Zero3, tilde_dPrime);
1286 
1287  /* FIXME: we need to be able to regenerate FDE
1288  * if the constitutive law throws ChangedEquationStructure */
1289  FDEPrime = R1h*GetFDEPrime()*R1hT;
1290 
1291  bFirstRes = true;
1292 }
Mat3x3 FDEPrime
Definition: vehj2.h:62
const Vec3 Zero3(0., 0., 0.)
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 StructNode * pNode1
Definition: vehj2.h:46
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 ViscousDispJoint::AssMats ( FullSubMatrixHandler WMA,
FullSubMatrixHandler WMB,
doublereal  dCoef 
)
protectedvirtual

Implements DeformableDispJoint.

Definition at line 1152 of file vehj2.cc.

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

1155 {
1156  Vec3 d2(pNode2->GetRCurr()*tilde_f2);
1157  Vec3 d1(pNode2->GetXCurr() + d2 - pNode1->GetXCurr());
1158 
1159  AssMatF(WMA, d1, d2, dCoef);
1160  AssMatFDEPrime(WMA, WMB, d1, d2, dCoef);
1161 }
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
const StructNode * pNode2
Definition: vehj2.h:47

Here is the call graph for this function:

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

Implements Elem.

Definition at line 1165 of file vehj2.cc.

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

1169 {
1170  /* Dimensiona e resetta la matrice di lavoro */
1171  integer iNumRows = 0;
1172  integer iNumCols = 0;
1173  WorkSpaceDim(&iNumRows, &iNumCols);
1174  WorkVec.ResizeReset(iNumRows);
1175 
1176  /* Recupera gli indici */
1177  integer iNode1FirstMomIndex = pNode1->iGetFirstMomentumIndex();
1178  integer iNode2FirstMomIndex = pNode2->iGetFirstMomentumIndex();
1179 
1180  /* Setta gli indici della matrice */
1181  for (int iCnt = 1; iCnt <= 6; iCnt++) {
1182  WorkVec.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
1183  WorkVec.PutRowIndex(6 + iCnt, iNode2FirstMomIndex + iCnt);
1184  }
1185 
1186  AssVec(WorkVec);
1187 
1188  return WorkVec;
1189 }
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:1243
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 & ViscousDispJoint::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 1193 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().

1198 {
1200 
1201  bFirstRes = false;
1202 
1203  /* Dimensiona e resetta la matrice di lavoro */
1204  integer iNumRows = 0;
1205  integer iNumCols = 0;
1206  WorkSpaceDim(&iNumRows, &iNumCols);
1207  WorkVec.ResizeReset(iNumRows);
1208 
1209  /* Recupera gli indici */
1210  integer iNode1FirstMomIndex = pNode1->iGetFirstPositionIndex();
1211  integer iNode2FirstMomIndex = pNode2->iGetFirstPositionIndex();
1212 
1213  /* Setta gli indici della matrice */
1214  for (int iCnt = 1; iCnt <= 6; iCnt++) {
1215  WorkVec.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
1216  WorkVec.PutRowIndex(6 + iCnt, iNode2FirstMomIndex + iCnt);
1217  }
1218 
1219  AssVec(WorkVec);
1220 
1221  return WorkVec;
1222 }
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:1243
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 ViscousDispJoint::AssVec ( SubVectorHandler WorkVec)
protected

Definition at line 1243 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_dPrime, DeformableDispJoint::tilde_f2, DeformableDispJoint::tilde_R1h, ConstitutiveLawOwner< T, Tder >::Update(), and Zero3.

Referenced by AssRes().

1244 {
1245  Mat3x3 R1h(pNode1->GetRCurr()*tilde_R1h);
1246  Vec3 d2(pNode2->GetRCurr()*tilde_f2);
1247  Vec3 d1(pNode2->GetXCurr() + d2 - pNode1->GetXCurr());
1248 
1249  if (bFirstRes) {
1250  bFirstRes = false;
1251 
1252  } else {
1253  Vec3 d1Prime(pNode2->GetVCurr()
1254  + pNode2->GetWCurr().Cross(d2)
1255  - pNode1->GetVCurr());
1256 
1257  tilde_dPrime = R1h.Transpose()*(d1Prime
1258  - pNode1->GetWCurr().Cross(d1));
1259 
1260  ConstitutiveLaw3DOwner::Update(Zero3, tilde_dPrime);
1261  }
1262 
1263  Vec3 F(R1h*GetF());
1264 
1265  WorkVec.Add(1, F);
1266  WorkVec.Add(4, d1.Cross(F));
1267  WorkVec.Sub(6 + 1, F);
1268  WorkVec.Sub(6 + 4, d2.Cross(F));
1269 }
const Vec3 Zero3(0., 0., 0.)
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
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 ViscousDispJoint::GetConstLawType ( void  ) const
inlinevirtual

Implements DeformableDispJoint.

Definition at line 417 of file vehj2.h.

References ConstLawType::VISCOUS.

417  {
418  return ConstLawType::VISCOUS;
419  };
VariableSubMatrixHandler & ViscousDispJoint::InitialAssJac ( VariableSubMatrixHandler WorkMat,
const VectorHandler XCurr 
)
virtual

Implements SubjectToInitialAssembly.

Definition at line 1296 of file vehj2.cc.

References FullSubMatrixHandler::Add(), DeformableDispJoint::F, DeformableDispJoint::FDEPrime, ConstitutiveLawOwner< T, Tder >::GetF(), 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.

1298 {
1299  FullSubMatrixHandler& WM = WorkMat.SetFull();
1300 
1301  /* Dimensiona e resetta la matrice di lavoro */
1302  integer iNumRows = 0;
1303  integer iNumCols = 0;
1304  InitialWorkSpaceDim(&iNumRows, &iNumCols);
1305  WM.ResizeReset(iNumRows, iNumCols);
1306 
1307  /* Recupera gli indici */
1308  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex();
1309  integer iNode1FirstVelIndex = iNode1FirstPosIndex + 6;
1310  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex();
1311  integer iNode2FirstVelIndex = iNode2FirstPosIndex + 6;
1312 
1313  /* Setta gli indici della matrice */
1314  for (int iCnt = 1; iCnt <= 6; iCnt++) {
1315  WM.PutRowIndex(iCnt, iNode1FirstPosIndex + iCnt);
1316  WM.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
1317  WM.PutColIndex(6 + iCnt, iNode1FirstVelIndex + iCnt);
1318 
1319  WM.PutRowIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
1320  WM.PutColIndex(12 + iCnt, iNode2FirstPosIndex + iCnt);
1321  WM.PutColIndex(18 + iCnt, iNode2FirstVelIndex + iCnt);
1322  }
1323 
1324  Mat3x3 R1h(pNode1->GetRRef()*tilde_R1h);
1325  Vec3 Omega1(pNode1->GetWRef());
1326  Vec3 Omega2(pNode2->GetWRef());
1327 
1328  Vec3 F(R1h*GetF());
1329  Mat3x3 FDEPrime(R1h*GetFDEPrime()*R1h.Transpose());
1330  Mat3x3 Tmp(Mat3x3(MatCross, F) - FDEPrime*Mat3x3(MatCross, Omega2 - Omega1));
1331 
1332  WM.Add(1, 1, Tmp);
1333  WM.Sub(4, 1, Tmp);
1334 
1335  WM.Add(1, 4, FDEPrime);
1336  WM.Add(4, 6 + 4, FDEPrime);
1337 
1338  WM.Sub(1, 6 + 4, FDEPrime);
1339  WM.Sub(4, 4, FDEPrime);
1340 
1341  return WorkMat;
1342 }
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 StructNode * pNode1
Definition: vehj2.h:46
virtual const Vec3 & GetWRef(void) const
Definition: strnode.h:1024
Mat3x3 tilde_R1h
Definition: vehj2.h:50
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
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: vehj2.h:451

Here is the call graph for this function:

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

Implements SubjectToInitialAssembly.

Definition at line 1346 of file vehj2.cc.

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

1348 {
1349  /* Dimensiona e resetta la matrice di lavoro */
1350  integer iNumRows = 0;
1351  integer iNumCols = 0;
1352  InitialWorkSpaceDim(&iNumRows, &iNumCols);
1353  WorkVec.ResizeReset(iNumRows);
1354 
1355  /* Recupera gli indici */
1356  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex();
1357  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex();
1358 
1359  /* Setta gli indici della matrice */
1360  for (int iCnt = 1; iCnt <= 6; iCnt++) {
1361  WorkVec.PutRowIndex(iCnt, iNode1FirstPosIndex + iCnt);
1362  WorkVec.PutRowIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
1363  }
1364 
1365  Mat3x3 R1h(pNode1->GetRCurr()*tilde_R1h);
1366  Vec3 Omega1(pNode1->GetWCurr());
1367  Vec3 Omega2(pNode2->GetWCurr());
1368 
1369  Vec3 g1(pNode1->GetgCurr());
1370  Vec3 g2(pNode2->GetgCurr());
1371 
1372  /* Aggiornamento: tilde_d += R1h^T(G(g2)*g2-G(g1)*g1) */
1373  tilde_d = R1h.Transpose()*(g2*(4./(4. + g2.Dot()))
1374  - g1*(4./(4. + g1.Dot())));
1375  tilde_dPrime = R1h.Transpose()*(Omega2 - Omega1);
1377 
1378  Vec3 F(R1h*GetF());
1379 
1380  WorkVec.Add(1, F);
1381  WorkVec.Sub(4, F);
1382 
1383  return WorkVec;
1384 }
Vec3 tilde_dPrime
Definition: vehj2.h:55
Definition: matvec3.h:98
virtual void ResizeReset(integer)
Definition: vh.cc:55
virtual const Vec3 & GetgCurr(void) const
Definition: strnode.h:982
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
Mat3x3 tilde_R1h
Definition: vehj2.h:50
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
virtual void 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
long int integer
Definition: colamd.c:51
void Update(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:283
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: vehj2.h:451

Here is the call graph for this function:

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

Implements SubjectToInitialAssembly.

Definition at line 451 of file vehj2.h.

Referenced by InitialAssJac(), and InitialAssRes().

451  {
452  *piNumRows = 12;
453  *piNumCols = 12;
454  };
void ViscousDispJoint::Update ( const VectorHandler XCurr,
InverseDynamics::Order  iOrder = InverseDynamics::INVERSE_DYNAMICS 
)
virtual

Reimplemented from SimulationEntity.

Definition at line 1226 of file vehj2.cc.

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

1227 {
1228  if (iOrder != InverseDynamics::INVERSE_DYNAMICS) {
1229  // issue "default" warning message
1230  Joint::Update(XCurr, iOrder);
1231  }
1232 }
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: