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

#include <point_contact.h>

Inheritance diagram for PointSurfaceContact:
Collaboration diagram for PointSurfaceContact:

Public Member Functions

 PointSurfaceContact (unsigned int uL, const DofOwner *pDO, const StructNode *pN1, const StructNode *pNs, const Vec3 &SDir, const doublereal Ek, flag fOut)
 
virtual ~PointSurfaceContact (void)
 
virtual Joint::Type GetJointType (void) const
 
virtual std::ostream & Restart (std::ostream &out) const
 
virtual void Output (OutputHandler &OH) const
 
virtual unsigned int iGetNumDof (void) const
 
virtual void WorkSpaceDim (integer *piNumRows, integer *piNumCols) const
 
virtual VariableSubMatrixHandlerAssJac (VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual SubVectorHandlerAssRes (SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual unsigned int iGetInitialNumDof (void) const
 
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
 
virtual DofOrder::Order GetDofType (unsigned int) 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
 
virtual void GetConnectedNodes (std::vector< const Node * > &connectedNodes) 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 SetInitialValue (VectorHandler &)
 
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)
 

Protected Member Functions

void AssMat (FullSubMatrixHandler &WM, doublereal dCoef)
 
void AssVec (SubVectorHandler &WorkVec, 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
 

Protected Attributes

const StructNodepNode1
 
const StructNodepSup
 
Vec3 SupDirection
 
doublereal dDeltaL
 
doublereal ElasticStiffness
 
Vec3 FNode1
 
Vec3 Farm
 
Vec3 FSup
 
Vec3 MSup
 
Vec3 n
 
- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 
- Protected Attributes inherited from ToBeOutput
flag fOutput
 
- Protected Attributes inherited from GravityOwner
GravitypGravity
 

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
}
 

Detailed Description

Definition at line 42 of file point_contact.h.

Constructor & Destructor Documentation

PointSurfaceContact::PointSurfaceContact ( unsigned int  uL,
const DofOwner pDO,
const StructNode pN1,
const StructNode pNs,
const Vec3 SDir,
const doublereal  Ek,
flag  fOut 
)

Definition at line 50 of file point_contact.cc.

References ASSERT, ElasticStiffness, StructDispNode::GetNodeType(), pNode1, pSup, and Node::STRUCTURAL.

56 : Elem(uL,fOut),
57 Joint(uL, pDO, fOut), pNode1(pN1), pSup(pNs), SupDirection(SDir) // assegnamento campi
58 {
59  ASSERT(pNode1 != NULL); // esecuzione solo se i nodi sono assegnati e se sono strutturali
60  ASSERT(pSup != NULL);
61 
64 
65  ElasticStiffness = Ek;
66 }
virtual Node::Type GetNodeType(void) const
Definition: strnode.cc:145
Joint(unsigned int uL, const DofOwner *pD, flag fOut)
Definition: joint.cc:83
const StructNode * pSup
Definition: point_contact.h:50
const StructNode * pNode1
Definition: point_contact.h:47
#define ASSERT(expression)
Definition: colamd.c:977
doublereal ElasticStiffness
Definition: point_contact.h:59
Elem(unsigned int uL, flag fOut)
Definition: elem.cc:41

Here is the call graph for this function:

PointSurfaceContact::~PointSurfaceContact ( void  )
virtual

Definition at line 69 of file point_contact.cc.

References NO_OP.

70 {
71  NO_OP;
72 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

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

Implements Elem.

Definition at line 162 of file point_contact.cc.

References AssMat(), dDeltaL, DEBUGCOUT, StructDispNode::iGetFirstMomentumIndex(), StructDispNode::iGetFirstPositionIndex(), pNode1, pSup, FullSubMatrixHandler::PutColIndex(), FullSubMatrixHandler::PutRowIndex(), FullSubMatrixHandler::ResizeReset(), VariableSubMatrixHandler::SetFull(), VariableSubMatrixHandler::SetNullMatrix(), and WorkSpaceDim().

166 {
167  DEBUGCOUT("Entering PointSurfaceContact::AssJac()" << std::endl);
168 
169  if (dDeltaL < 0)
170  {
171  FullSubMatrixHandler& WM = WorkMat.SetFull();
172 
173  /* Dimensiona e resetta la matrice di lavoro */
174  integer iNumRows = 0;
175  integer iNumCols = 0;
176  WorkSpaceDim(&iNumRows, &iNumCols);
177  WM.ResizeReset(iNumRows, iNumCols);
178 
179  /* Recupera gli indici */
180  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex();
181  integer iNode1FirstMomIndex = pNode1->iGetFirstMomentumIndex();
182  integer iSupFirstPosIndex = pSup->iGetFirstPositionIndex();
183  integer iSupFirstMomIndex = pSup->iGetFirstMomentumIndex();
184 
185  /* Setta gli indici della matrice */
186  for (int iCnt = 1; iCnt <= 3; iCnt++) {
187  WM.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
188  WM.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
189  WM.PutRowIndex(3 + iCnt, iSupFirstMomIndex + iCnt);
190  WM.PutColIndex(3 + iCnt, iSupFirstPosIndex + iCnt);
191  WM.PutRowIndex(6 + iCnt, iSupFirstMomIndex + iCnt + 3);
192  WM.PutColIndex(6 + iCnt, iSupFirstPosIndex + iCnt + 3);
193  }
194 
195  AssMat(WM, dCoef);
196  }
197  else
198  WorkMat.SetNullMatrix();
199 
200  return WorkMat;
201 
202 }
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
const StructNode * pSup
Definition: point_contact.h:50
const StructNode * pNode1
Definition: point_contact.h:47
void SetNullMatrix(void)
Definition: submat.h:1159
#define DEBUGCOUT(msg)
Definition: myassert.h:232
virtual integer iGetFirstMomentumIndex(void) const =0
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
virtual void ResizeReset(integer, integer)
Definition: submat.cc:182
void PutRowIndex(integer iSubRow, integer iRow)
Definition: submat.h:311
void AssMat(FullSubMatrixHandler &WM, doublereal dCoef)
long int integer
Definition: colamd.c:51
virtual void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const

Here is the call graph for this function:

void PointSurfaceContact::AssMat ( FullSubMatrixHandler WM,
doublereal  dCoef 
)
protected

Definition at line 206 of file point_contact.cc.

References FullSubMatrixHandler::Add(), Vec3::Cross(), ElasticStiffness, Farm, FSup, n, FullSubMatrixHandler::Sub(), and Vec3::Tens().

Referenced by AssJac(), and InitialAssJac().

207 {
208  Mat3x3 MTmp = n.Tens(n*(-dCoef*ElasticStiffness));
209 
210  WM.Add(1, 1, MTmp);
211  WM.Sub(1, 3 + 1, MTmp);
212  WM.Sub(3 + 1, 1, MTmp);
213  WM.Add(3 + 1, 3 + 1, MTmp);
214 
215  Vec3 dFnode1_1 = -n*ElasticStiffness*n[0];
216  Vec3 dFnode1_2 = -n*ElasticStiffness*n[1];
217  Vec3 dFnode1_3 = -n*ElasticStiffness*n[2];
218 
219  // forza sul nodo pNode1
220  WM.Add(1,1,dFnode1_1);
221  WM.Add(1,2,dFnode1_2);
222  WM.Add(1,3,dFnode1_3);
223 
224  WM.Sub(1,4,dFnode1_1);
225  WM.Sub(1,5,dFnode1_2);
226  WM.Sub(1,6,dFnode1_3);
227 
228  // forza sulla superficie
229  WM.Sub(3+1,1,dFnode1_1);
230  WM.Sub(3+1,2,dFnode1_2);
231  WM.Sub(3+1,3,dFnode1_3);
232 
233  WM.Add(3+1,4,dFnode1_1);
234  WM.Add(3+1,5,dFnode1_2);
235  WM.Add(3+1,6,dFnode1_3);
236 
237  // momento sulla superficie
238  Vec3 dFarm_1 = n;//(1.,0.,0.,);//-n*n[1];
239  Vec3 dFarm_2 = n;//(0.,1.,0.,);//-n*n[2];
240  Vec3 dFarm_3 = n;//(0.,0.,1.,);//-n*n[3];
241 
242  WM.Add(6+1,1,dFarm_1.Cross(FSup)+Farm.Cross(-dFnode1_1));
243  WM.Add(6+1,2,dFarm_2.Cross(FSup)+Farm.Cross(-dFnode1_2));
244  WM.Add(6+1,3,dFarm_3.Cross(FSup)+Farm.Cross(-dFnode1_3));
245 
246  WM.Sub(6+1,4,dFarm_1.Cross(FSup)+Farm.Cross(-dFnode1_1));
247  WM.Sub(6+1,5,dFarm_2.Cross(FSup)+Farm.Cross(-dFnode1_2));
248  WM.Sub(6+1,6,dFarm_3.Cross(FSup)+Farm.Cross(-dFnode1_3));
249 
250 
251  }
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
Definition: matvec3.h:98
void Add(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:209
Mat3x3 Tens(const Vec3 &v) const
Definition: matvec3.cc:53
doublereal ElasticStiffness
Definition: point_contact.h:59
void Sub(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:215

Here is the call graph for this function:

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

Implements Elem.

Definition at line 93 of file point_contact.cc.

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

97 {
98 
99  /* Dimensiona e resetta la matrice di lavoro */
100  integer iNumRows = 0;
101  integer iNumCols = 0;
102  WorkSpaceDim(&iNumRows, &iNumCols);
103  WorkVec.ResizeReset(iNumRows);
104 
105  /* Recupera gli indici globali */
106  integer iNodePFirstMomIndex = pNode1->iGetFirstMomentumIndex();
107  integer iNodeSupFirstMomIndex = pSup->iGetFirstMomentumIndex();
108 
109  /* Setta gli indici della matrice */
110  for (int iCnt = 1; iCnt <=3; iCnt++) {
111  WorkVec.PutRowIndex(iCnt, iNodePFirstMomIndex + iCnt);
112  WorkVec.PutRowIndex(iCnt+3, iNodeSupFirstMomIndex + iCnt);
113  WorkVec.PutRowIndex(iCnt+6, iNodeSupFirstMomIndex + iCnt+3);
114  }
115 
116  /* Costruisco WorkVec in AssVec */
117  AssVec(WorkVec, dCoef);
118 
119  return WorkVec;
120 }
virtual void ResizeReset(integer)
Definition: vh.cc:55
void AssVec(SubVectorHandler &WorkVec, doublereal dCoef)
const StructNode * pSup
Definition: point_contact.h:50
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
const StructNode * pNode1
Definition: point_contact.h:47
virtual integer iGetFirstMomentumIndex(void) const =0
long int integer
Definition: colamd.c:51
virtual void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const

Here is the call graph for this function:

void PointSurfaceContact::AssVec ( SubVectorHandler WorkVec,
doublereal  dCoef 
)
protected

Definition at line 122 of file point_contact.cc.

References VectorHandler::Add(), Vec3::Cross(), dDeltaL, Vec3::Dot(), ElasticStiffness, Farm, FNode1, FSup, StructNode::GetRCurr(), StructDispNode::GetXCurr(), MSup, n, pNode1, pSup, and SupDirection.

Referenced by AssRes(), and InitialAssRes().

123 {
124  /* Orientazione del terreno nel sistema assoluto */
125  //Vec3
127 
128  /* Distanza punto-superficie (piano infinito) */
129  Vec3 x = - pSup->GetXCurr() + pNode1->GetXCurr(); // attenzione: VERIFICARE SE TIENE
130  // CONTO DI EVENTUALI DIFFERENZE
131  // DI SISTEMI DI RIFERIMENTO
132 
133  /* Distanza normale */
134  dDeltaL = x.Dot(n);
135 
136  //Vec3
137  Farm = x - n*dDeltaL; // braccio momento di trasporto
138 
139  /* se dDeltaL>0 c'รจ contatto */
140  if (dDeltaL < 0)
141  {
142  /* Forze e momenti scambiati */
144  FSup = -FNode1;
145  MSup = Farm.Cross(FSup);
146  }
147  else {
148  FNode1 = n*0;
149  FSup = n*0;
150  MSup = n*0;
151  };
152 
153  /* Costruzione vettore assemblato */
154  WorkVec.Add(1, FNode1);
155  WorkVec.Add(3+1, FSup);
156  WorkVec.Add(6+1, MSup);
157 
158  }
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
Definition: matvec3.h:98
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
doublereal Dot(const Vec3 &v) const
Definition: matvec3.h:243
const StructNode * pSup
Definition: point_contact.h:50
const StructNode * pNode1
Definition: point_contact.h:47
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
virtual void Add(integer iRow, const Vec3 &v)
Definition: vh.cc:63
doublereal ElasticStiffness
Definition: point_contact.h:59

Here is the call graph for this function:

virtual Joint::Type PointSurfaceContact::GetJointType ( void  ) const
inlinevirtual

Implements Joint.

Definition at line 87 of file point_contact.h.

References Joint::POINT_SURFACE_CONTACT.

87  {
88  return POINT_SURFACE_CONTACT;
89  };
virtual unsigned int PointSurfaceContact::iGetInitialNumDof ( void  ) const
inlinevirtual

Implements SubjectToInitialAssembly.

Definition at line 134 of file point_contact.h.

134  {
135  return 0;
136  };
virtual unsigned int PointSurfaceContact::iGetNumDof ( void  ) const
inlinevirtual

Reimplemented from Elem.

Definition at line 96 of file point_contact.h.

96  {
97  return 0;
98  };
VariableSubMatrixHandler & PointSurfaceContact::InitialAssJac ( VariableSubMatrixHandler WorkMat,
const VectorHandler XCurr 
)
virtual

Implements SubjectToInitialAssembly.

Definition at line 286 of file point_contact.cc.

References AssMat(), dDeltaL, DEBUGCOUT, StructDispNode::iGetFirstMomentumIndex(), StructDispNode::iGetFirstPositionIndex(), pNode1, pSup, FullSubMatrixHandler::PutColIndex(), FullSubMatrixHandler::PutRowIndex(), FullSubMatrixHandler::ResizeReset(), VariableSubMatrixHandler::SetFull(), VariableSubMatrixHandler::SetNullMatrix(), and WorkSpaceDim().

288 {
289  DEBUGCOUT("Entering PointSurfaceContact::Initial AssJac()" << std::endl);
290 
291  if (dDeltaL < 0)
292  {
293  FullSubMatrixHandler& WM = WorkMat.SetFull();
294 
295  /* Dimensiona e resetta la matrice di lavoro */
296  integer iNumRows = 0;
297  integer iNumCols = 0;
298  WorkSpaceDim(&iNumRows, &iNumCols);
299  WM.ResizeReset(iNumRows, iNumCols);
300 
301  /* Recupera gli indici */
302  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex();
303  integer iNode1FirstMomIndex = pNode1->iGetFirstMomentumIndex();
304  integer iSupFirstPosIndex = pSup->iGetFirstPositionIndex();
305  integer iSupFirstMomIndex = pSup->iGetFirstMomentumIndex();
306 
307  /* Setta gli indici della matrice */
308  for (int iCnt = 1; iCnt <= 3; iCnt++) {
309  WM.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
310  WM.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
311  WM.PutRowIndex(3 + iCnt, iSupFirstMomIndex + iCnt);
312  WM.PutColIndex(3 + iCnt, iSupFirstPosIndex + iCnt);
313  WM.PutRowIndex(6 + iCnt, iSupFirstMomIndex + iCnt + 3);
314  WM.PutColIndex(6 + iCnt, iSupFirstPosIndex + iCnt + 3);
315  }
316 
317  AssMat(WM, 1);
318 
319  }
320  else
321  WorkMat.SetNullMatrix();
322 
323  return WorkMat;
324 
325 }
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
const StructNode * pSup
Definition: point_contact.h:50
const StructNode * pNode1
Definition: point_contact.h:47
void SetNullMatrix(void)
Definition: submat.h:1159
#define DEBUGCOUT(msg)
Definition: myassert.h:232
virtual integer iGetFirstMomentumIndex(void) const =0
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
virtual void ResizeReset(integer, integer)
Definition: submat.cc:182
void PutRowIndex(integer iSubRow, integer iRow)
Definition: submat.h:311
void AssMat(FullSubMatrixHandler &WM, doublereal dCoef)
long int integer
Definition: colamd.c:51
virtual void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const

Here is the call graph for this function:

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

Implements SubjectToInitialAssembly.

Definition at line 256 of file point_contact.cc.

References AssVec(), DEBUGCOUT, StructDispNode::iGetFirstMomentumIndex(), pNode1, pSup, SubVectorHandler::PutRowIndex(), VectorHandler::ResizeReset(), and WorkSpaceDim().

258 {
259  DEBUGCOUT("Entering PointSurfaceContact::InitialAssRes()" << std::endl);
260 
261  /* Dimensiona e resetta la matrice di lavoro */
262  integer iNumRows = 0;
263  integer iNumCols = 0;
264  WorkSpaceDim(&iNumRows, &iNumCols);
265  WorkVec.ResizeReset(iNumRows);
266 
267  /* Recupera gli indici globali */
268  integer iNodePFirstMomIndex = pNode1->iGetFirstMomentumIndex();
269  integer iNodeSupFirstMomIndex = pSup->iGetFirstMomentumIndex();
270 
271  /* Setta gli indici della matrice */
272  for (int iCnt = 1; iCnt <=3; iCnt++) {
273  WorkVec.PutRowIndex(iCnt, iNodePFirstMomIndex + iCnt);
274  WorkVec.PutRowIndex(iCnt+3, iNodeSupFirstMomIndex + iCnt);
275  WorkVec.PutRowIndex(iCnt+6, iNodeSupFirstMomIndex + iCnt+3);
276  }
277 
278  /* Costruisco WorkVec in AssVec */
279  AssVec(WorkVec, 1);
280 
281  return WorkVec;
282 }
virtual void ResizeReset(integer)
Definition: vh.cc:55
void AssVec(SubVectorHandler &WorkVec, doublereal dCoef)
const StructNode * pSup
Definition: point_contact.h:50
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
const StructNode * pNode1
Definition: point_contact.h:47
#define DEBUGCOUT(msg)
Definition: myassert.h:232
virtual integer iGetFirstMomentumIndex(void) const =0
long int integer
Definition: colamd.c:51
virtual void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const

Here is the call graph for this function:

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

Implements SubjectToInitialAssembly.

Definition at line 138 of file point_contact.h.

139  {
140  *piNumRows = 9;
141  *piNumCols = 9;
142  };
void PointSurfaceContact::Output ( OutputHandler OH) const
virtual

Reimplemented from ToBeOutput.

Definition at line 85 of file point_contact.cc.

86 {
87 
88 }
std::ostream & PointSurfaceContact::Restart ( std::ostream &  out) const
virtual

Implements Elem.

Definition at line 76 of file point_contact.cc.

77 {
78  //Joint::Restart(out) << pNode1->GetLabel() << ", "
79  // << pSup->GetLabel() << std::endl;
80  return out << " not implemented yet: " << std::endl;
81 
82  //return out;
83 }
virtual void PointSurfaceContact::WorkSpaceDim ( integer piNumRows,
integer piNumCols 
) const
inlinevirtual

Implements Elem.

Definition at line 114 of file point_contact.h.

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

115  {
116  *piNumRows = 9;
117  *piNumCols = 9;
118  };

Member Data Documentation

doublereal PointSurfaceContact::dDeltaL
protected

Definition at line 56 of file point_contact.h.

Referenced by AssJac(), AssVec(), and InitialAssJac().

doublereal PointSurfaceContact::ElasticStiffness
protected

Definition at line 59 of file point_contact.h.

Referenced by AssMat(), AssVec(), and PointSurfaceContact().

Vec3 PointSurfaceContact::Farm
protected

Definition at line 64 of file point_contact.h.

Referenced by AssMat(), and AssVec().

Vec3 PointSurfaceContact::FNode1
protected

Definition at line 62 of file point_contact.h.

Referenced by AssVec().

Vec3 PointSurfaceContact::FSup
protected

Definition at line 66 of file point_contact.h.

Referenced by AssMat(), and AssVec().

Vec3 PointSurfaceContact::MSup
protected

Definition at line 67 of file point_contact.h.

Referenced by AssVec().

Vec3 PointSurfaceContact::n
protected

Definition at line 69 of file point_contact.h.

Referenced by AssMat(), and AssVec().

const StructNode* PointSurfaceContact::pNode1
protected
const StructNode* PointSurfaceContact::pSup
protected
Vec3 PointSurfaceContact::SupDirection
protected

Definition at line 53 of file point_contact.h.

Referenced by AssVec().


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