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

#include <inplanej.h>

Inheritance diagram for InPlaneWithOffsetJoint:
Collaboration diagram for InPlaneWithOffsetJoint:

Public Member Functions

 InPlaneWithOffsetJoint (unsigned int uL, const DofOwner *pDO, const StructNode *pN1, const StructNode *pN2, const Vec3 &vT, const Vec3 &pT, const Vec3 &qT, flag fOut)
 
 ~InPlaneWithOffsetJoint (void)
 
virtual Joint::Type GetJointType (void) const
 
virtual std::ostream & Restart (std::ostream &out) const
 
virtual unsigned int iGetNumDof (void) const
 
virtual DofOrder::Order GetDofType (unsigned int) const
 
virtual void WorkSpaceDim (integer *piNumRows, integer *piNumCols) const
 
VariableSubMatrixHandlerAssJac (VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
SubVectorHandlerAssRes (SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual void Output (OutputHandler &OH) const
 
virtual unsigned int iGetInitialNumDof (void) const
 
virtual void InitialWorkSpaceDim (integer *piNumRows, integer *piNumCols) const
 
VariableSubMatrixHandlerInitialAssJac (VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
 
SubVectorHandlerInitialAssRes (SubVectorHandler &WorkVec, const VectorHandler &XCurr)
 
virtual void SetInitialValue (VectorHandler &X)
 
virtual void GetConnectedNodes (std::vector< const Node * > &connectedNodes) const
 
- 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
 
virtual void AssMats (VariableSubMatrixHandler &WorkMatA, VariableSubMatrixHandler &WorkMatB, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual bool bInverseDynamics (void) 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 SubVectorHandlerAssRes (SubVectorHandler &WorkVec, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr, const VectorHandler &XPrimePrimeCurr, InverseDynamics::Order iOrder=InverseDynamics::INVERSE_DYNAMICS)
 
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 HintParseHint (DataManager *pDM, const char *s) const
 
virtual void BeforePredict (VectorHandler &, VectorHandler &, VectorHandler &, VectorHandler &) const
 
virtual void AfterPredict (VectorHandler &X, VectorHandler &XP)
 
virtual void Update (const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual void DerivativesUpdate (const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP)
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP, const VectorHandler &XPP)
 
virtual unsigned int iGetNumPrivData (void) const
 
virtual unsigned int iGetPrivDataIdx (const char *s) const
 
virtual doublereal dGetPrivData (unsigned int i) const
 
virtual std::ostream & OutputAppend (std::ostream &out) const
 
virtual void ReadInitialState (MBDynParser &HP)
 
- Public Member Functions inherited from ToBeOutput
 ToBeOutput (flag fOut=fDefaultOut)
 
virtual ~ToBeOutput (void)
 
virtual void OutputPrepare (OutputHandler &OH)
 
virtual void Output (OutputHandler &OH, const VectorHandler &X, const VectorHandler &XP) const
 
virtual flag fToBeOutput (void) const
 
virtual bool bToBeOutput (void) const
 
virtual void SetOutputFlag (flag f=flag(1))
 
- Public Member Functions inherited from Joint
 Joint (unsigned int uL, const DofOwner *pD, flag fOut)
 
virtual ~Joint (void)
 
virtual Elem::Type GetElemType (void) const
 
std::ostream & Output (std::ostream &out, const char *sJointName, unsigned int uLabel, const Vec3 &FLocal, const Vec3 &MLocal, const Vec3 &FGlobal, const Vec3 &MGlobal) const
 
virtual void SetValue (DataManager *pDM, VectorHandler &, VectorHandler &, SimulationEntity::Hints *ph=0)
 
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)
 

Private Attributes

const StructNodepNode1
 
const StructNodepNode2
 
const Vec3 v
 
const Vec3 p
 
const Vec3 q
 
doublereal dF
 

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 Member Functions inherited from Joint
virtual void OutputPrepare_int (const std::string &type, OutputHandler &OH, std::string &name)
 
- Protected Member Functions inherited from ElemGravityOwner
virtual Vec3 GetS_int (void) const
 
virtual Mat3x3 GetJ_int (void) const
 
virtual Vec3 GetB_int (void) const
 
virtual Vec3 GetG_int (void) const
 
- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 
- Protected Attributes inherited from ToBeOutput
flag fOutput
 
- Protected Attributes inherited from GravityOwner
GravitypGravity
 

Detailed Description

Definition at line 156 of file inplanej.h.

Constructor & Destructor Documentation

InPlaneWithOffsetJoint::InPlaneWithOffsetJoint ( unsigned int  uL,
const DofOwner pDO,
const StructNode pN1,
const StructNode pN2,
const Vec3 vT,
const Vec3 pT,
const Vec3 qT,
flag  fOut 
)

Definition at line 354 of file inplanej.cc.

References NO_OP.

362 : Elem(uL, fOut), Joint(uL, pDO, fOut),
363 pNode1(pN1), pNode2(pN2), v(vT), p(pT), q(qT), dF(0.)
364 {
365  NO_OP;
366 };
const StructNode * pNode2
Definition: inplanej.h:159
Joint(unsigned int uL, const DofOwner *pD, flag fOut)
Definition: joint.cc:83
#define NO_OP
Definition: myassert.h:74
Elem(unsigned int uL, flag fOut)
Definition: elem.cc:41
const StructNode * pNode1
Definition: inplanej.h:158
InPlaneWithOffsetJoint::~InPlaneWithOffsetJoint ( void  )

Definition at line 369 of file inplanej.cc.

References NO_OP.

370 {
371  NO_OP;
372 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

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

Implements Elem.

Definition at line 389 of file inplanej.cc.

References DEBUGCOUT, dF, Vec3::dGet(), StructNode::GetRRef(), StructDispNode::GetXCurr(), DofOwnerOwner::iGetFirstIndex(), StructDispNode::iGetFirstMomentumIndex(), StructDispNode::iGetFirstPositionIndex(), MatCrossCross, pNode1, pNode2, SparseSubMatrixHandler::PutCross(), SparseSubMatrixHandler::PutItem(), SparseSubMatrixHandler::PutMat3x3(), q, SparseSubMatrixHandler::ResizeReset(), VariableSubMatrixHandler::SetSparse(), and v.

393 {
394  DEBUGCOUT("Entering InPlaneWithOffsetJoint::AssJac()" << std::endl);
395  SparseSubMatrixHandler& WM = WorkMat.SetSparse();
396  WM.ResizeReset(84, 0);
397 
398  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex();
399  integer iNode1FirstMomIndex = pNode1->iGetFirstMomentumIndex();
400  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex();
401  integer iNode2FirstMomIndex = pNode2->iGetFirstMomentumIndex();
402  integer iFirstReactionIndex = iGetFirstIndex();
403 
404  Vec3 vTmp(pNode1->GetRRef()*v);
405  Vec3 qTmp(pNode2->GetRRef()*q);
406  Vec3 x2pqmx1(pNode2->GetXCurr()+qTmp-pNode1->GetXCurr());
407  Vec3 F(vTmp*(dF*dCoef));
408 
409 
410  Vec3 Tmp1(vTmp.Cross(x2pqmx1));
411  Vec3 Tmp2(qTmp.Cross(vTmp));
412  for(int iCnt = 1; iCnt <= 3; iCnt++) {
413  doublereal d = vTmp.dGet(iCnt);
414  WM.PutItem(iCnt, iNode1FirstMomIndex+iCnt,
415  iFirstReactionIndex+1, -d);
416  WM.PutItem(3+iCnt, iNode2FirstMomIndex+iCnt,
417  iFirstReactionIndex+1, d);
418 
419  WM.PutItem(6+iCnt, iFirstReactionIndex+1,
420  iNode1FirstPosIndex+iCnt, -d);
421  WM.PutItem(9+iCnt, iFirstReactionIndex+1,
422  iNode2FirstPosIndex+iCnt, d);
423 
424  d = Tmp1.dGet(iCnt);
425  WM.PutItem(12+iCnt, iNode1FirstMomIndex+3+iCnt,
426  iFirstReactionIndex+1, d);
427 
428  WM.PutItem(15+iCnt, iFirstReactionIndex+1,
429  iNode1FirstPosIndex+3+iCnt, d);
430 
431  d = Tmp2.dGet(iCnt);
432  WM.PutItem(18+iCnt, iNode2FirstMomIndex+3+iCnt,
433  iFirstReactionIndex+1, d);
434 
435  WM.PutItem(21+iCnt, iFirstReactionIndex+1,
436  iNode2FirstPosIndex+3+iCnt, d);
437  }
438 
439  WM.PutCross(25, iNode1FirstMomIndex,
440  iNode1FirstPosIndex+3, F);
441  WM.PutCross(31, iNode1FirstMomIndex+3,
442  iNode1FirstPosIndex, -F);
443  WM.PutMat3x3(37, iNode1FirstMomIndex+3,
444  iNode1FirstPosIndex+3, Mat3x3(MatCrossCross, x2pqmx1, F));
445  WM.PutCross(46, iNode1FirstMomIndex+3,
446  iNode2FirstPosIndex, F);
447  WM.PutCross(52, iNode2FirstMomIndex,
448  iNode2FirstPosIndex+3, -F);
449 
450  Mat3x3 MTmp(MatCrossCross, F, qTmp);
451  WM.PutMat3x3(58, iNode1FirstMomIndex+3,
452  iNode2FirstPosIndex+3, -MTmp);
453  WM.PutMat3x3(67, iNode2FirstMomIndex+3,
454  iNode2FirstPosIndex+3, -MTmp);
455 
456  WM.PutMat3x3(76, iNode2FirstMomIndex+3,
457  iNode1FirstPosIndex+3, Mat3x3(MatCrossCross, -qTmp, F));
458 
459  return WorkMat;
460 }
void PutMat3x3(integer iSubIt, integer iFirstRow, integer iFirstCol, const Mat3x3 &m)
Definition: submat.cc:1331
virtual const Mat3x3 & GetRRef(void) const
Definition: strnode.h:1006
Definition: matvec3.h:98
const StructNode * pNode2
Definition: inplanej.h:159
void ResizeReset(integer iNewRow, integer iNewCol)
Definition: submat.cc:1084
void PutCross(integer iSubIt, integer iFirstRow, integer iFirstCol, const Vec3 &v)
Definition: submat.cc:1236
void PutItem(integer iSubIt, integer iRow, integer iCol, const doublereal &dCoef)
Definition: submat.h:997
const doublereal & dGet(unsigned short int iRow) const
Definition: matvec3.h:285
#define DEBUGCOUT(msg)
Definition: myassert.h:232
virtual integer iGetFirstMomentumIndex(void) const =0
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
const MatCrossCross_Manip MatCrossCross
Definition: matvec3.cc:640
SparseSubMatrixHandler & SetSparse(void)
Definition: submat.h:1178
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
double doublereal
Definition: colamd.c:52
const StructNode * pNode1
Definition: inplanej.h:158
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

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

Implements Elem.

Definition at line 464 of file inplanej.cc.

References VectorHandler::Add(), Vec3::Cross(), DEBUGCOUT, dF, Vec3::Dot(), StructNode::GetRCurr(), StructDispNode::GetXCurr(), DofOwnerOwner::iGetFirstIndex(), StructDispNode::iGetFirstMomentumIndex(), p, pNode1, pNode2, VectorHandler::PutCoef(), SubVectorHandler::PutRowIndex(), q, VectorHandler::ResizeReset(), and v.

468 {
469  DEBUGCOUT("Entering InPlaneWithOffsetJoint::AssRes()" << std::endl);
470  WorkVec.ResizeReset(13);
471 
472  // integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex();
473  integer iNode1FirstMomIndex = pNode1->iGetFirstMomentumIndex();
474  // integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex();
475  integer iNode2FirstMomIndex = pNode2->iGetFirstMomentumIndex();
476  integer iFirstReactionIndex = iGetFirstIndex();
477 
478  /* Indici equazioni */
479  for(int iCnt = 1; iCnt <= 6; iCnt++) {
480  WorkVec.PutRowIndex(iCnt, iNode1FirstMomIndex+iCnt);
481  WorkVec.PutRowIndex(6+iCnt, iNode2FirstMomIndex+iCnt);
482  }
483 
484  /* Indice equazione vincolo */
485  WorkVec.PutRowIndex(13, iFirstReactionIndex+1);
486 
487  Vec3 vTmp(pNode1->GetRCurr()*v);
488  Vec3 qTmp(pNode2->GetRCurr()*q);
489  Vec3 x2pqmx1(pNode2->GetXCurr()+qTmp-pNode1->GetXCurr());
490 
491  /* Aggiorna i dati propri */
492  dF = XCurr(iFirstReactionIndex+1);
493  Vec3 F(vTmp*dF);
494 
495  WorkVec.Add(1, F);
496  WorkVec.Add(4, x2pqmx1.Cross(F));
497  WorkVec.Add(7, -F);
498  WorkVec.Add(10, F.Cross(qTmp));
499  if(dCoef != 0.) {
500  WorkVec.PutCoef(13, (v.Dot(p)-vTmp.Dot(x2pqmx1))/dCoef);
501  }
502 
503  return WorkVec;
504 }
Definition: matvec3.h:98
virtual void ResizeReset(integer)
Definition: vh.cc:55
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
doublereal Dot(const Vec3 &v) const
Definition: matvec3.h:243
const StructNode * pNode2
Definition: inplanej.h:159
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
#define DEBUGCOUT(msg)
Definition: myassert.h:232
virtual integer iGetFirstMomentumIndex(void) const =0
virtual void PutCoef(integer iRow, const doublereal &dCoef)=0
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
virtual void Add(integer iRow, const Vec3 &v)
Definition: vh.cc:63
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
const StructNode * pNode1
Definition: inplanej.h:158
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

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

Reimplemented from Elem.

Definition at line 238 of file inplanej.h.

References pNode1, and pNode2.

238  {
239  connectedNodes.resize(2);
240  connectedNodes[0] = pNode1;
241  connectedNodes[1] = pNode2;
242  };
const StructNode * pNode2
Definition: inplanej.h:159
const StructNode * pNode1
Definition: inplanej.h:158
virtual DofOrder::Order InPlaneWithOffsetJoint::GetDofType ( unsigned int  ) const
inlinevirtual

Reimplemented from Elem.

Definition at line 191 of file inplanej.h.

References DofOrder::ALGEBRAIC, and ASSERT.

193  {
194  ASSERT(i >= 0 && i < 1);
195  return DofOrder::ALGEBRAIC;
196  };
#define ASSERT(expression)
Definition: colamd.c:977
virtual Joint::Type InPlaneWithOffsetJoint::GetJointType ( void  ) const
inlinevirtual

Implements Joint.

Definition at line 177 of file inplanej.h.

References Joint::INPLANE.

177  {
178  return INPLANE;
179  };
virtual unsigned int InPlaneWithOffsetJoint::iGetInitialNumDof ( void  ) const
inlinevirtual

Implements SubjectToInitialAssembly.

Definition at line 215 of file inplanej.h.

215 { return 2; };
virtual unsigned int InPlaneWithOffsetJoint::iGetNumDof ( void  ) const
inlinevirtual

Reimplemented from Elem.

Definition at line 184 of file inplanej.h.

184  {
185  return 1;
186  };
VariableSubMatrixHandler & InPlaneWithOffsetJoint::InitialAssJac ( VariableSubMatrixHandler WorkMat,
const VectorHandler XCurr 
)
virtual

Implements SubjectToInitialAssembly.

Definition at line 519 of file inplanej.cc.

References FullSubMatrixHandler::Add(), Vec3::Cross(), grad::Cross(), DEBUGCOUT, dF, Vec3::dGet(), StructNode::GetRRef(), StructDispNode::GetVCurr(), StructNode::GetWRef(), StructDispNode::GetXCurr(), DofOwnerOwner::iGetFirstIndex(), StructDispNode::iGetFirstPositionIndex(), MatCross, MatCrossCross, pNode1, pNode2, FullSubMatrixHandler::PutCoef(), FullSubMatrixHandler::PutColIndex(), FullSubMatrixHandler::PutRowIndex(), q, FullSubMatrixHandler::ResizeReset(), VariableSubMatrixHandler::SetFull(), FullSubMatrixHandler::Sub(), Mat3x3::Transpose(), and v.

521 {
522  DEBUGCOUT("Entering InPlaneWithOffsetJoint::InitialAssJac()" << std::endl);
523  FullSubMatrixHandler& WM = WorkMat.SetFull();
524  WM.ResizeReset(26, 26);
525 
526  /* Indici gdl */
527  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex();
528  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex();
529  integer iFirstReactionIndex = iGetFirstIndex();
530  integer iReactionPrimeIndex = iFirstReactionIndex+1;
531 
532  /* Indici equazioni nodi */
533  for(int iCnt = 1; iCnt <= 12; iCnt++) {
534  WM.PutRowIndex(iCnt, iNode1FirstPosIndex+iCnt);
535  WM.PutColIndex(iCnt, iNode1FirstPosIndex+iCnt);
536  WM.PutRowIndex(12+iCnt, iNode2FirstPosIndex+iCnt);
537  WM.PutColIndex(12+iCnt, iNode2FirstPosIndex+iCnt);
538  }
539 
540  /* Indici vincoli */
541  for(int iCnt = 1; iCnt <= 2; iCnt++) {
542  WM.PutRowIndex(24+iCnt, iFirstReactionIndex+iCnt);
543  WM.PutColIndex(24+iCnt, iFirstReactionIndex+iCnt);
544  }
545 
546  /* Dati */
547  Vec3 Omega1(pNode1->GetWRef());
548  Vec3 Omega2(pNode2->GetWRef());
549  Vec3 vTmp(pNode1->GetRRef()*v);
550  Vec3 qTmp(pNode2->GetRRef()*q);
551  Vec3 x2pqmx1(pNode2->GetXCurr()+qTmp-pNode1->GetXCurr());
552  Vec3 xp2pqpmxp1(pNode2->GetVCurr()+Omega2.Cross(qTmp)-pNode1->GetVCurr());
553 
554  /* Aggiorna i dati propri */
555  doublereal dFPrime = XCurr(iReactionPrimeIndex+1);
556  Vec3 F(vTmp*dF);
557  Vec3 FPrime(vTmp*dFPrime);
558 
559  Vec3 Tmp1(vTmp.Cross(x2pqmx1));
560  Vec3 Tmp2(Omega1.Cross(vTmp));
561  Vec3 Tmp3((Omega1.Cross(x2pqmx1) - xp2pqpmxp1).Cross(vTmp));
562  Vec3 Tmp4(-(xp2pqpmxp1.Cross(vTmp) + x2pqmx1.Cross(Tmp2)));
563 
564  Vec3 Tmp5(qTmp.Cross(vTmp));
565  Vec3 Tmp6(qTmp.Cross(vTmp.Cross(Omega2-Omega1)));
566  Vec3 Tmp7(qTmp.Cross(Omega1.Cross(vTmp)) - vTmp.Cross(Omega2.Cross(qTmp)));
567  for(int iCnt = 1; iCnt <= 3; iCnt++) {
568  doublereal d = vTmp.dGet(iCnt);
569  WM.PutCoef(iCnt, 25, -d);
570  WM.PutCoef(12+iCnt, 25, d);
571 
572  WM.PutCoef(25, iCnt, -d);
573  WM.PutCoef(25, 12+iCnt, d);
574 
575  WM.PutCoef(6+iCnt, 26, -d);
576  WM.PutCoef(18+iCnt, 26, d);
577 
578  WM.PutCoef(26, 6+iCnt, -d);
579  WM.PutCoef(26, 18+iCnt, d);
580 
581  d = Tmp1.dGet(iCnt);
582  WM.PutCoef(3+iCnt, 25, d);
583  WM.PutCoef(25, 3+iCnt, d);
584 
585  WM.PutCoef(26, 9+iCnt, d);
586  WM.PutCoef(9+iCnt, 26, d);
587 
588  d = Tmp2.dGet(iCnt);
589  WM.PutCoef(26, iCnt, -d);
590  WM.PutCoef(26, 12+iCnt, d);
591 
592  WM.PutCoef(6+iCnt, 25, -d);
593  WM.PutCoef(18+iCnt, 25, d);
594 
595  d = Tmp3.dGet(iCnt);
596  WM.PutCoef(26, 3+iCnt, d);
597 
598  d = Tmp4.dGet(iCnt);
599  WM.PutCoef(9+iCnt, 25, d);
600 
601  d = Tmp5.dGet(iCnt);
602  WM.PutCoef(15+iCnt, 25, d);
603  WM.PutCoef(21+iCnt, 26, d);
604 
605  WM.PutCoef(25, 15+iCnt, d);
606  WM.PutCoef(26, 21+iCnt, d);
607 
608  d = Tmp6.dGet(iCnt);
609  WM.PutCoef(26, 15+iCnt, d);
610 
611  d = Tmp7.dGet(iCnt);
612  WM.PutCoef(21+iCnt, 25, d);
613  }
614 
615  Mat3x3 MTmp(MatCross, F);
616  WM.Add(1, 4, MTmp);
617  WM.Add(4, 13, MTmp);
618 
619  WM.Add(7, 10, MTmp);
620  WM.Add(10, 19, MTmp);
621 
622  WM.Sub(4, 1, MTmp);
623  WM.Sub(13, 4, MTmp);
624 
625  WM.Sub(19, 10, MTmp);
626  WM.Sub(10, 7, MTmp);
627 
628  MTmp = Mat3x3(MatCrossCross, x2pqmx1, F);
629  WM.Add(4, 4, MTmp);
630 
631  WM.Add(10, 10, MTmp);
632 
633  MTmp = Mat3x3(MatCrossCross, Omega1, F) + Mat3x3(MatCross, FPrime);
634  WM.Add(7, 4, MTmp);
635  WM.Sub(19, 4, MTmp);
636 
637  MTmp = Mat3x3(MatCross, Omega1.Cross(F) + FPrime);
638  WM.Sub(10, 1, MTmp);
639  WM.Add(10, 13, MTmp);
640 
641  MTmp = (Mat3x3(MatCross, xp2pqpmxp1) + Mat3x3(MatCrossCross, x2pqmx1, Omega1))*Mat3x3(MatCross, F)
642  + Mat3x3(MatCrossCross, x2pqmx1, FPrime);
643  WM.Add(10, 4, MTmp);
644 
645  MTmp = Mat3x3(MatCrossCross, F, qTmp);
646  WM.Add(16, 16, MTmp);
647  WM.Add(22, 22, MTmp);
648 
649  WM.Sub(4, 16, MTmp);
650  WM.Sub(10, 22, MTmp);
651 
652  MTmp = MTmp.Transpose();
653  WM.Add(16, 4, MTmp);
654  WM.Add(22, 10, MTmp);
655 
656  MTmp = (Mat3x3(MatCrossCross, F, Omega2) + Mat3x3(MatCross, Omega1.Cross(F) + FPrime))*Mat3x3(MatCross, qTmp);
657  WM.Add(22, 16, MTmp);
658  WM.Sub(10, 16, MTmp);
659 
660  MTmp = Mat3x3(MatCrossCross, qTmp.Cross(Omega2), F)
661  - qTmp.Cross(Mat3x3(MatCrossCross, Omega1, F) + Mat3x3(MatCross, FPrime));
662  WM.Add(22, 4, MTmp);
663 
664  return WorkMat;
665 }
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
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
const StructNode * pNode2
Definition: inplanej.h:159
void Add(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:209
void PutCoef(integer iRow, integer iCol, const doublereal &dCoef)
Definition: submat.h:672
virtual const Vec3 & GetWRef(void) const
Definition: strnode.h:1024
#define DEBUGCOUT(msg)
Definition: myassert.h:232
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
VectorExpression< VectorCrossExpr< VectorLhsExpr, VectorRhsExpr >, 3 > Cross(const VectorExpression< VectorLhsExpr, 3 > &u, const VectorExpression< VectorRhsExpr, 3 > &v)
Definition: matvec.h:3248
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
virtual void ResizeReset(integer, integer)
Definition: submat.cc:182
const MatCrossCross_Manip MatCrossCross
Definition: matvec3.cc:640
void PutRowIndex(integer iSubRow, integer iRow)
Definition: submat.h:311
virtual const Vec3 & GetVCurr(void) const
Definition: strnode.h:322
void Sub(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:215
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
double doublereal
Definition: colamd.c:52
const StructNode * pNode1
Definition: inplanej.h:158
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

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

Implements SubjectToInitialAssembly.

Definition at line 670 of file inplanej.cc.

References VectorHandler::Add(), Vec3::Cross(), DEBUGCOUT, dF, Vec3::Dot(), StructNode::GetRCurr(), StructDispNode::GetVCurr(), StructNode::GetWCurr(), StructDispNode::GetXCurr(), DofOwnerOwner::iGetFirstIndex(), StructDispNode::iGetFirstPositionIndex(), p, pNode1, pNode2, VectorHandler::PutCoef(), SubVectorHandler::PutRowIndex(), q, VectorHandler::ResizeReset(), and v.

672 {
673  DEBUGCOUT("Entering InPlaneWithOffsetJoint::InitialAssRes()" << std::endl);
674  WorkVec.ResizeReset(26);
675 
676  /* Indici gdl */
677  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex();
678  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex();
679  integer iFirstReactionIndex = iGetFirstIndex();
680  integer iReactionPrimeIndex = iFirstReactionIndex+1;
681 
682  /* Indici equazioni nodi */
683  for(int iCnt = 1; iCnt <= 12; iCnt++) {
684  WorkVec.PutRowIndex(iCnt, iNode1FirstPosIndex+iCnt);
685  WorkVec.PutRowIndex(12+iCnt, iNode2FirstPosIndex+iCnt);
686  }
687 
688  /* Indici equazioni vincoli */
689  WorkVec.PutRowIndex(25, iFirstReactionIndex+1);
690  WorkVec.PutRowIndex(26, iReactionPrimeIndex+1);
691 
692  /* Dati */
693  Vec3 Omega1(pNode1->GetWCurr());
694  Vec3 Omega2(pNode2->GetWCurr());
695  Vec3 vTmp(pNode1->GetRCurr()*v);
696  Vec3 qTmp(pNode2->GetRCurr()*q);
697 
698  Vec3 x2pqmx1(pNode2->GetXCurr()+qTmp-pNode1->GetXCurr());
699  Vec3 xp2pqpmxp1(pNode2->GetVCurr()+Omega2.Cross(qTmp)-pNode1->GetVCurr());
700 
701  /* Aggiorna i dati propri */
702  dF = XCurr(iFirstReactionIndex+1);
703  doublereal dFPrime = XCurr(iReactionPrimeIndex+1);
704  Vec3 F(vTmp*dF);
705  Vec3 FPrime(vTmp*dFPrime);
706  Vec3 Tmp(Omega1.Cross(F)+FPrime);
707 
708  WorkVec.Add(1, F);
709  WorkVec.Add(4, x2pqmx1.Cross(F));
710  WorkVec.Add(7, Tmp);
711  WorkVec.Add(10, xp2pqpmxp1.Cross(F)+x2pqmx1.Cross(Tmp));
712  WorkVec.Add(13, -F);
713  WorkVec.Add(16, F.Cross(qTmp));
714  WorkVec.Add(19, -Tmp);
715  WorkVec.Add(22, F.Cross(Omega2.Cross(qTmp))-qTmp.Cross(Tmp));
716 
717  WorkVec.PutCoef(25, v.Dot(p)-vTmp.Dot(x2pqmx1));
718  WorkVec.PutCoef(26, x2pqmx1.Dot(vTmp.Cross(Omega1))
719  -vTmp.Dot(xp2pqpmxp1));
720 
721  return WorkVec;
722 }
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
Definition: matvec3.h:98
virtual void ResizeReset(integer)
Definition: vh.cc:55
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
doublereal Dot(const Vec3 &v) const
Definition: matvec3.h:243
const StructNode * pNode2
Definition: inplanej.h:159
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
#define DEBUGCOUT(msg)
Definition: myassert.h:232
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
virtual void PutCoef(integer iRow, const doublereal &dCoef)=0
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
virtual void Add(integer iRow, const Vec3 &v)
Definition: vh.cc:63
virtual const Vec3 & GetVCurr(void) const
Definition: strnode.h:322
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
double doublereal
Definition: colamd.c:52
const StructNode * pNode1
Definition: inplanej.h:158
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

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

Implements SubjectToInitialAssembly.

Definition at line 216 of file inplanej.h.

218  { *piNumRows = 26; *piNumCols = 26; };
void InPlaneWithOffsetJoint::Output ( OutputHandler OH) const
virtual

Reimplemented from ToBeOutput.

Definition at line 507 of file inplanej.cc.

References ToBeOutput::bToBeOutput(), dF, WithLabel::GetLabel(), StructNode::GetRCurr(), OutputHandler::Joints(), Joint::Output(), pNode1, v, and Zero3.

508 {
509  if(bToBeOutput()) {
510  Vec3 vTmp(pNode1->GetRCurr()*v);
511  Joint::Output(OH.Joints(), "InPlaneWithOffs", GetLabel(),
512  Vec3(dF, 0., 0.), Zero3, vTmp*dF, Zero3) << std::endl;
513  }
514 }
const Vec3 Zero3(0., 0., 0.)
virtual bool bToBeOutput(void) const
Definition: output.cc:890
Definition: matvec3.h:98
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
std::ostream & Joints(void) const
Definition: output.h:443
std::ostream & Output(std::ostream &out, const char *sJointName, unsigned int uLabel, const Vec3 &FLocal, const Vec3 &MLocal, const Vec3 &FGlobal, const Vec3 &MGlobal) const
Definition: joint.cc:138
const StructNode * pNode1
Definition: inplanej.h:158
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

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

Implements Elem.

Definition at line 375 of file inplanej.cc.

References WithLabel::GetLabel(), p, pNode1, pNode2, q, Joint::Restart(), v, and Vec3::Write().

376 {
377  Joint::Restart(out) << ", in plane, "
378  << pNode1->GetLabel()
379  << ", reference, node, ",
380  p.Write(out, ", ")
381  << ", reference, node, ",
382  v.Write(out, ", ") << ", "
383  << pNode2->GetLabel() << ", offset, reference, node, ";
384  return q.Write(out, ", ") << ';' << std::endl;
385 }
std::ostream & Write(std::ostream &out, const char *sFill=" ") const
Definition: matvec3.cc:738
const StructNode * pNode2
Definition: inplanej.h:159
virtual std::ostream & Restart(std::ostream &out) const
Definition: joint.h:195
const StructNode * pNode1
Definition: inplanej.h:158
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

void InPlaneWithOffsetJoint::SetInitialValue ( VectorHandler X)
virtual

Initialize state vector used in initial assembly. May set internal states of the element. Do not rely on being always called, because initial assembly could be implicitly or explicitly skipped

Reimplemented from Joint.

Definition at line 726 of file inplanej.cc.

References NO_OP.

727 {
728  NO_OP;
729 }
#define NO_OP
Definition: myassert.h:74
virtual void InPlaneWithOffsetJoint::WorkSpaceDim ( integer piNumRows,
integer piNumCols 
) const
inlinevirtual

Implements Elem.

Definition at line 198 of file inplanej.h.

199  { *piNumRows = 13; *piNumCols = 13; };

Member Data Documentation

doublereal InPlaneWithOffsetJoint::dF
private

Definition at line 165 of file inplanej.h.

Referenced by AssJac(), AssRes(), InitialAssJac(), InitialAssRes(), and Output().

const Vec3 InPlaneWithOffsetJoint::p
private

Definition at line 162 of file inplanej.h.

Referenced by AssRes(), InitialAssRes(), and Restart().

const StructNode* InPlaneWithOffsetJoint::pNode1
private
const StructNode* InPlaneWithOffsetJoint::pNode2
private

Definition at line 159 of file inplanej.h.

Referenced by AssJac(), AssRes(), GetConnectedNodes(), InitialAssJac(), InitialAssRes(), and Restart().

const Vec3 InPlaneWithOffsetJoint::q
private

Definition at line 163 of file inplanej.h.

Referenced by AssJac(), AssRes(), InitialAssJac(), InitialAssRes(), and Restart().

const Vec3 InPlaneWithOffsetJoint::v
private

Definition at line 161 of file inplanej.h.

Referenced by AssJac(), AssRes(), InitialAssJac(), InitialAssRes(), Output(), and Restart().


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