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

#include <inplanej.h>

Inheritance diagram for InPlaneJoint:
Collaboration diagram for InPlaneJoint:

Public Member Functions

 InPlaneJoint (unsigned int uL, const DofOwner *pDO, const StructNode *pN1, const StructNode *pN2, const Vec3 &vTmp, const Vec3 &pTmp, flag fOut)
 
 ~InPlaneJoint (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
 
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 52 of file inplanej.h.

Constructor & Destructor Documentation

InPlaneJoint::InPlaneJoint ( unsigned int  uL,
const DofOwner pDO,
const StructNode pN1,
const StructNode pN2,
const Vec3 vTmp,
const Vec3 pTmp,
flag  fOut 
)

Definition at line 41 of file inplanej.cc.

References NO_OP.

44 : Elem(uL, fOut), Joint(uL, pDO, fOut),
45 pNode1(pN1), pNode2(pN2), v(vTmp), p(pTmp), dF(0.)
46 {
47  NO_OP;
48 };
const StructNode * pNode2
Definition: inplanej.h:55
const Vec3 p
Definition: inplanej.h:58
Joint(unsigned int uL, const DofOwner *pD, flag fOut)
Definition: joint.cc:83
#define NO_OP
Definition: myassert.h:74
doublereal dF
Definition: inplanej.h:60
const Vec3 v
Definition: inplanej.h:57
const StructNode * pNode1
Definition: inplanej.h:54
Elem(unsigned int uL, flag fOut)
Definition: elem.cc:41
InPlaneJoint::~InPlaneJoint ( void  )

Definition at line 51 of file inplanej.cc.

References NO_OP.

52 {
53  NO_OP;
54 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

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

Implements Elem.

Definition at line 71 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(), SparseSubMatrixHandler::ResizeReset(), VariableSubMatrixHandler::SetSparse(), and v.

75 {
76  DEBUGCOUT("Entering InPlaneJoint::AssJac()" << std::endl);
77  SparseSubMatrixHandler& WM = WorkMat.SetSparse();
78  WM.ResizeReset(51, 0);
79 
80  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex();
81  integer iNode1FirstMomIndex = pNode1->iGetFirstMomentumIndex();
82  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex();
83  integer iNode2FirstMomIndex = pNode2->iGetFirstMomentumIndex();
84  integer iFirstReactionIndex = iGetFirstIndex();
85 
86  Vec3 x2mx1(pNode2->GetXCurr()-pNode1->GetXCurr());
87  Vec3 vTmp(pNode1->GetRRef()*v);
88  Vec3 F(vTmp*(dF*dCoef));
89 
90 
91  Vec3 Tmp(vTmp.Cross(x2mx1));
92  for(int iCnt = 1; iCnt <= 3; iCnt++) {
93  doublereal d = vTmp.dGet(iCnt);
94  WM.PutItem(iCnt, iNode1FirstMomIndex+iCnt,
95  iFirstReactionIndex+1, -d);
96  WM.PutItem(3+iCnt, iNode2FirstMomIndex+iCnt,
97  iFirstReactionIndex+1, d);
98 
99  WM.PutItem(6+iCnt, iFirstReactionIndex+1,
100  iNode1FirstPosIndex+iCnt, -d);
101  WM.PutItem(9+iCnt, iFirstReactionIndex+1,
102  iNode2FirstPosIndex+iCnt, d);
103 
104  d = Tmp.dGet(iCnt);
105  WM.PutItem(12+iCnt, iNode1FirstMomIndex+3+iCnt,
106  iFirstReactionIndex+1, d);
107 
108  WM.PutItem(15+iCnt, iFirstReactionIndex+1,
109  iNode1FirstPosIndex+3+iCnt, d);
110  }
111 
112  WM.PutCross(19, iNode1FirstMomIndex,
113  iNode1FirstPosIndex+3, F);
114  WM.PutCross(25, iNode1FirstMomIndex+3,
115  iNode1FirstPosIndex, -F);
116  WM.PutMat3x3(31, iNode1FirstMomIndex+3,
117  iNode1FirstPosIndex+3, Mat3x3(MatCrossCross, x2mx1, F));
118  WM.PutCross(40, iNode1FirstMomIndex+3,
119  iNode2FirstPosIndex, F);
120  WM.PutCross(46, iNode2FirstMomIndex,
121  iNode2FirstPosIndex+3, -F);
122 
123  return WorkMat;
124 }
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:55
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
doublereal dF
Definition: inplanej.h:60
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
const MatCrossCross_Manip MatCrossCross
Definition: matvec3.cc:640
const Vec3 v
Definition: inplanej.h:57
const StructNode * pNode1
Definition: inplanej.h:54
SparseSubMatrixHandler & SetSparse(void)
Definition: submat.h:1178
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

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

Implements Elem.

Definition at line 127 of file inplanej.cc.

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

131 {
132  DEBUGCOUT("Entering InPlaneJoint::AssRes()" << std::endl);
133  WorkVec.ResizeReset(13);
134 
135  integer iNode1FirstMomIndex = pNode1->iGetFirstMomentumIndex();
136  integer iNode2FirstMomIndex = pNode2->iGetFirstMomentumIndex();
137  integer iFirstReactionIndex = iGetFirstIndex();
138 
139  /* Indici equazioni */
140  for (int iCnt = 1; iCnt <= 6; iCnt++) {
141  WorkVec.PutRowIndex(iCnt, iNode1FirstMomIndex+iCnt);
142  WorkVec.PutRowIndex(6+iCnt, iNode2FirstMomIndex+iCnt);
143  }
144 
145  /* Indice equazione vincolo */
146  WorkVec.PutRowIndex(13, iFirstReactionIndex+1);
147 
148  Vec3 x2mx1(pNode2->GetXCurr()-pNode1->GetXCurr());
149  Mat3x3 R(pNode1->GetRCurr());
150  Vec3 vTmp = R*v;
151  // Vec3 pTmp = R*p;
152 
153  /* Aggiorna i dati propri */
154  dF = XCurr(iFirstReactionIndex+1);
155  Vec3 F(vTmp*dF);
156 
157  WorkVec.Add(1, F);
158  WorkVec.Add(4, x2mx1.Cross(F)); /* ( = -p/\F) */
159  WorkVec.Add(7, -F);
160  ASSERT(dCoef != 0.);
161  WorkVec.PutCoef(13, (v.Dot(p)-vTmp.Dot(x2mx1))/dCoef);
162 
163  return WorkVec;
164 }
Definition: matvec3.h:98
virtual void ResizeReset(integer)
Definition: vh.cc:55
const StructNode * pNode2
Definition: inplanej.h:55
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
const Vec3 p
Definition: inplanej.h:58
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
#define DEBUGCOUT(msg)
Definition: myassert.h:232
virtual integer iGetFirstMomentumIndex(void) const =0
#define ASSERT(expression)
Definition: colamd.c:977
doublereal dF
Definition: inplanej.h:60
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
const Vec3 v
Definition: inplanej.h:57
const StructNode * pNode1
Definition: inplanej.h:54
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
long int integer
Definition: colamd.c:51
Mat3x3 R

Here is the call graph for this function:

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

Reimplemented from Elem.

Definition at line 134 of file inplanej.h.

References pNode1, and pNode2.

134  {
135  connectedNodes.resize(2);
136  connectedNodes[0] = pNode1;
137  connectedNodes[1] = pNode2;
138  };
const StructNode * pNode2
Definition: inplanej.h:55
const StructNode * pNode1
Definition: inplanej.h:54
virtual DofOrder::Order InPlaneJoint::GetDofType ( unsigned int  ) const
inlinevirtual

Reimplemented from Elem.

Definition at line 85 of file inplanej.h.

References DofOrder::ALGEBRAIC, and ASSERT.

87  {
88  ASSERT(i == 0);
89  return DofOrder::ALGEBRAIC;
90  };
#define ASSERT(expression)
Definition: colamd.c:977
virtual Joint::Type InPlaneJoint::GetJointType ( void  ) const
inlinevirtual

Implements Joint.

Definition at line 71 of file inplanej.h.

References Joint::INPLANE.

71  {
72  return INPLANE;
73  };
virtual unsigned int InPlaneJoint::iGetInitialNumDof ( void  ) const
inlinevirtual

Implements SubjectToInitialAssembly.

Definition at line 111 of file inplanej.h.

111 { return 2; };
virtual unsigned int InPlaneJoint::iGetNumDof ( void  ) const
inlinevirtual

Reimplemented from Elem.

Definition at line 78 of file inplanej.h.

78  {
79  return 1;
80  };
VariableSubMatrixHandler & InPlaneJoint::InitialAssJac ( VariableSubMatrixHandler WorkMat,
const VectorHandler XCurr 
)
virtual

Implements SubjectToInitialAssembly.

Definition at line 179 of file inplanej.cc.

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

181 {
182  DEBUGCOUT("Entering InPlaneJoint::InitialAssJac()" << std::endl);
183  FullSubMatrixHandler& WM = WorkMat.SetFull();
184  WM.ResizeReset(26, 26);
185 
186  /* Indici gdl */
187  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex();
188  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex();
189  integer iFirstReactionIndex = iGetFirstIndex();
190  integer iReactionPrimeIndex = iFirstReactionIndex+1;
191 
192  /* Indici equazioni nodi */
193  for(int iCnt = 1; iCnt <= 12; iCnt++) {
194  WM.PutRowIndex(iCnt, iNode1FirstPosIndex+iCnt);
195  WM.PutColIndex(iCnt, iNode1FirstPosIndex+iCnt);
196  WM.PutRowIndex(12+iCnt, iNode2FirstPosIndex+iCnt);
197  WM.PutColIndex(12+iCnt, iNode2FirstPosIndex+iCnt);
198  }
199 
200  /* Indici vincoli */
201  for(int iCnt = 1; iCnt <= 2; iCnt++) {
202  WM.PutRowIndex(24+iCnt, iFirstReactionIndex+iCnt);
203  WM.PutColIndex(24+iCnt, iFirstReactionIndex+iCnt);
204  }
205 
206  /* Dati */
207  Vec3 x2mx1(pNode2->GetXCurr()-pNode1->GetXCurr());
208  Vec3 xp2mxp1(pNode2->GetVCurr()-pNode1->GetVCurr());
209  Vec3 Omega(pNode1->GetWRef());
210 
211  /* Aggiorna i dati propri */
212  doublereal dFPrime = XCurr(iReactionPrimeIndex+1);
213  Vec3 vTmp(pNode1->GetRRef()*v);
214  Vec3 F(vTmp*dF);
215  Vec3 FPrime(vTmp*dFPrime);
216 
217  Vec3 Tmp1(vTmp.Cross(x2mx1));
218  Vec3 Tmp2(Omega.Cross(vTmp));
219  Vec3 Tmp3((Omega.Cross(x2mx1)-xp2mxp1).Cross(vTmp));
220  Vec3 Tmp4(-(xp2mxp1.Cross(vTmp)+x2mx1.Cross(Tmp2)));
221  for(int iCnt = 1; iCnt <= 3; iCnt++) {
222  doublereal d = vTmp.dGet(iCnt);
223  WM.PutCoef(iCnt, 25, -d);
224  WM.PutCoef(12+iCnt, 25, d);
225 
226  WM.PutCoef(25, iCnt, -d);
227  WM.PutCoef(25, 12+iCnt, d);
228 
229  WM.PutCoef(6+iCnt, 26, -d);
230  WM.PutCoef(18+iCnt, 26, d);
231 
232  WM.PutCoef(26, 6+iCnt, -d);
233  WM.PutCoef(26, 18+iCnt, d);
234 
235  d = Tmp1.dGet(iCnt);
236  WM.PutCoef(3+iCnt, 25, d);
237  WM.PutCoef(25, 3+iCnt, d);
238 
239  WM.PutCoef(26, 9+iCnt, d);
240  WM.PutCoef(9+iCnt, 26, d);
241 
242  d = Tmp2.dGet(iCnt);
243  WM.PutCoef(26, iCnt, -d);
244  WM.PutCoef(26, 12+iCnt, d);
245 
246  WM.PutCoef(6+iCnt, 25, -d);
247  WM.PutCoef(18+iCnt, 25, d);
248 
249  d = Tmp3.dGet(iCnt);
250  WM.PutCoef(26, 3+iCnt, d);
251 
252  d = Tmp4.dGet(iCnt);
253  WM.PutCoef(9+iCnt, 25, d);
254  }
255 
256  Mat3x3 MTmp(MatCross, F);
257  WM.Add(1, 4, MTmp);
258  WM.Add(4, 13, MTmp);
259 
260  WM.Add(7, 10, MTmp);
261  WM.Add(10, 19, MTmp);
262 
263  WM.Sub(4, 1, MTmp);
264  WM.Sub(13, 4, MTmp);
265 
266  WM.Sub(19, 10, MTmp);
267  WM.Sub(10, 7, MTmp);
268 
269  MTmp = Mat3x3(MatCrossCross, x2mx1, F);
270  WM.Add(4, 4, MTmp);
271 
272  WM.Add(10, 10, MTmp);
273 
274  MTmp = Mat3x3(MatCrossCross, Omega, F) + Mat3x3(MatCross, FPrime);
275  WM.Add(7, 4, MTmp);
276  WM.Sub(19, 4, MTmp);
277 
278  MTmp = Mat3x3(MatCross, Omega.Cross(F) + FPrime);
279  WM.Sub(10, 1, MTmp);
280  WM.Add(10, 13, MTmp);
281 
282  MTmp = Mat3x3((Mat3x3(MatCross, xp2mxp1) + Mat3x3(MatCrossCross, x2mx1, Omega))*Mat3x3(MatCross, F)
283  + Mat3x3(MatCrossCross, x2mx1, FPrime));
284  WM.Add(10, 4, MTmp);
285 
286  return WorkMat;
287 }
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 StructNode * pNode2
Definition: inplanej.h:55
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
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
doublereal dF
Definition: inplanej.h:60
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
const Vec3 v
Definition: inplanej.h:57
virtual const Vec3 & GetVCurr(void) const
Definition: strnode.h:322
void Sub(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:215
const StructNode * pNode1
Definition: inplanej.h:54
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

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

Implements SubjectToInitialAssembly.

Definition at line 291 of file inplanej.cc.

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

293 {
294  DEBUGCOUT("Entering InPlaneJoint::InitialAssRes()" << std::endl);
295  WorkVec.ResizeReset(26);
296 
297  /* Indici gdl */
298  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex();
299  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex();
300  integer iFirstReactionIndex = iGetFirstIndex();
301  integer iReactionPrimeIndex = iFirstReactionIndex+1;
302 
303  /* Indici equazioni nodi */
304  for(int iCnt = 1; iCnt <= 12; iCnt++) {
305  WorkVec.PutRowIndex(iCnt, iNode1FirstPosIndex+iCnt);
306  WorkVec.PutRowIndex(12+iCnt, iNode2FirstPosIndex+iCnt);
307  }
308 
309  /* Indici equazioni vincoli */
310  WorkVec.PutRowIndex(25, iFirstReactionIndex+1);
311  WorkVec.PutRowIndex(26, iReactionPrimeIndex+1);
312 
313  /* Dati */
314  Vec3 x2mx1(pNode2->GetXCurr()-pNode1->GetXCurr());
315  Vec3 xp2mxp1(pNode2->GetVCurr()-pNode1->GetVCurr());
316  Mat3x3 R(pNode1->GetRCurr());
317  Vec3 Omega(pNode1->GetWCurr());
318  Vec3 vTmp = R*v;
319  // Vec3 pTmp = R*p;
320 
321  /* Aggiorna i dati propri */
322  dF = XCurr(iFirstReactionIndex+1);
323  doublereal dFPrime = XCurr(iReactionPrimeIndex+1);
324  Vec3 F(vTmp*dF);
325  Vec3 FPrime(vTmp*dFPrime);
326  Vec3 Tmp(Omega.Cross(F)+FPrime);
327 
328  WorkVec.Add(1, F);
329  WorkVec.Add(4, x2mx1.Cross(F)); /* ( = -p/\F) */
330  WorkVec.Add(7, Tmp);
331  WorkVec.Add(10, xp2mxp1.Cross(F)+x2mx1.Cross(Tmp));
332  WorkVec.Add(13, -F);
333  WorkVec.Add(19, -Tmp);
334 
335  WorkVec.PutCoef(25, v.Dot(p)-vTmp.Dot(x2mx1));
336  WorkVec.PutCoef(26, x2mx1.Dot(vTmp.Cross(Omega))-vTmp.Dot(xp2mxp1));
337 
338  return WorkVec;
339 }
Definition: matvec3.h:98
virtual void ResizeReset(integer)
Definition: vh.cc:55
const StructNode * pNode2
Definition: inplanej.h:55
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
const Vec3 p
Definition: inplanej.h:58
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
doublereal dF
Definition: inplanej.h:60
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
const Vec3 v
Definition: inplanej.h:57
virtual const Vec3 & GetVCurr(void) const
Definition: strnode.h:322
const StructNode * pNode1
Definition: inplanej.h:54
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51
Mat3x3 R

Here is the call graph for this function:

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

Implements SubjectToInitialAssembly.

Definition at line 112 of file inplanej.h.

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

Reimplemented from ToBeOutput.

Definition at line 167 of file inplanej.cc.

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

168 {
169  if(bToBeOutput()) {
170  Vec3 vTmp(pNode1->GetRCurr()*v);
171  Joint::Output(OH.Joints(), "InPlane", GetLabel(),
172  Vec3(dF, 0., 0.), Zero3, vTmp*dF, Zero3) << std::endl;
173  }
174 }
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
doublereal dF
Definition: inplanej.h:60
const Vec3 v
Definition: inplanej.h:57
const StructNode * pNode1
Definition: inplanej.h:54
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
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

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

Implements Elem.

Definition at line 57 of file inplanej.cc.

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

58 {
59  Joint::Restart(out) << ", in plane, "
60  << pNode1->GetLabel()
61  << ", reference, node, ",
62  p.Write(out, ", ")
63  << ", reference, node, ";
64  v.Write(out, ", ") << ", "
65  << pNode2->GetLabel() << ';' << std::endl;
66  return out;
67 }
std::ostream & Write(std::ostream &out, const char *sFill=" ") const
Definition: matvec3.cc:738
const StructNode * pNode2
Definition: inplanej.h:55
const Vec3 p
Definition: inplanej.h:58
virtual std::ostream & Restart(std::ostream &out) const
Definition: joint.h:195
const Vec3 v
Definition: inplanej.h:57
const StructNode * pNode1
Definition: inplanej.h:54
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

void InPlaneJoint::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 343 of file inplanej.cc.

References NO_OP.

344 {
345  NO_OP;
346 }
#define NO_OP
Definition: myassert.h:74
virtual void InPlaneJoint::WorkSpaceDim ( integer piNumRows,
integer piNumCols 
) const
inlinevirtual

Implements Elem.

Definition at line 92 of file inplanej.h.

92  {
93  *piNumRows = 13;
94  *piNumCols = 13;
95  };

Member Data Documentation

doublereal InPlaneJoint::dF
private

Definition at line 60 of file inplanej.h.

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

const Vec3 InPlaneJoint::p
private

Definition at line 58 of file inplanej.h.

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

const StructNode* InPlaneJoint::pNode1
private

Definition at line 54 of file inplanej.h.

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

const StructNode* InPlaneJoint::pNode2
private

Definition at line 55 of file inplanej.h.

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

const Vec3 InPlaneJoint::v
private

Definition at line 57 of file inplanej.h.

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


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