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

#include <brake.h>

Inheritance diagram for Brake:
Collaboration diagram for Brake:

Public Member Functions

 Brake (unsigned int uL, const DofOwner *pDO, const StructNode *pN1, const StructNode *pN2, const Vec3 &dTmp1, const Vec3 &dTmp2, const Mat3x3 &R1hTmp, const Mat3x3 &R2hTmp, flag fOut, const doublereal rr, const doublereal pref, BasicShapeCoefficient *const sh, BasicFriction *const f, DriveCaller *pdc)
 
 ~Brake (void)
 
virtual std::ostream & Restart (std::ostream &out) const
 
virtual Joint::Type GetJointType (void) const
 
virtual unsigned int iGetNumDof (void) const
 
DofOrder::Order GetDofType (unsigned int i) const
 
virtual void SetValue (DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP)
 
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)
 
DofOrder::Order GetEqType (unsigned int i) const
 
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 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 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 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, const VectorHandler &XPP)
 
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 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
 
Vec3 d1
 
Mat3x3 R1h
 
Vec3 d2
 
Mat3x3 R2h
 
Vec3 M
 
doublereal dTheta
 
BasicShapeCoefficient *const Sh_c
 
BasicFriction *const fc
 
const doublereal preF
 
const doublereal r
 
DriveOwner brakeForce
 

Static Private Attributes

static const unsigned int NumSelfDof
 
static const unsigned int NumDof
 

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 42 of file brake.h.

Constructor & Destructor Documentation

Brake::Brake ( unsigned int  uL,
const DofOwner pDO,
const StructNode pN1,
const StructNode pN2,
const Vec3 dTmp1,
const Vec3 dTmp2,
const Mat3x3 R1hTmp,
const Mat3x3 R2hTmp,
flag  fOut,
const doublereal  rr,
const doublereal  pref,
BasicShapeCoefficient *const  sh,
BasicFriction *const  f,
DriveCaller pdc 
)

Definition at line 44 of file brake.cc.

References NO_OP.

58 : Elem(uL, fOut),
59 Joint(uL, pDO, fOut),
60 pNode1(pN1), pNode2(pN2),
61 d1(dTmp1), R1h(R1hTmp), d2(dTmp2), R2h(R2hTmp), /* F(Zero3), */ M(Zero3), dTheta(0.),
62 Sh_c(sh), fc(f), preF(pref), r(rr), brakeForce(pdc) /* ,
63 isForce(isforce), Dir(dir) */
64 {
65  NO_OP;
66 }
Mat3x3 R2h
Definition: brake.h:63
const Vec3 Zero3(0., 0., 0.)
doublereal dTheta
Definition: brake.h:74
Joint(unsigned int uL, const DofOwner *pD, flag fOut)
Definition: joint.cc:83
const StructNode * pNode2
Definition: brake.h:59
const doublereal preF
Definition: brake.h:79
#define NO_OP
Definition: myassert.h:74
Vec3 d1
Definition: brake.h:60
BasicFriction *const fc
Definition: brake.h:78
DriveOwner brakeForce
Definition: brake.h:81
BasicShapeCoefficient *const Sh_c
Definition: brake.h:77
const StructNode * pNode1
Definition: brake.h:58
Elem(unsigned int uL, flag fOut)
Definition: elem.cc:41
Vec3 d2
Definition: brake.h:62
const doublereal r
Definition: brake.h:80
Vec3 M
Definition: brake.h:65
Mat3x3 R1h
Definition: brake.h:61
Brake::~Brake ( void  )

Definition at line 70 of file brake.cc.

References NO_OP.

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

Member Function Documentation

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

Reimplemented from SimulationEntity.

Definition at line 89 of file brake.cc.

References BasicFriction::AfterConvergence(), brakeForce, DriveOwner::dGet(), Vec3::dGet(), grad::Dot(), dTheta, fc, StructNode::GetRCurr(), StructNode::GetRPrev(), StructNode::GetWCurr(), DofOwnerOwner::iGetFirstIndex(), MatR2EulerAngles(), NumSelfDof, pNode1, pNode2, preF, r, R1h, R2h, Mat3x3::Transpose(), and grad::Transpose().

91 {
92 
93  Mat3x3 RTmp(((pNode1->GetRCurr()*R1h).Transpose()
95  *((pNode2->GetRCurr()*R2h).Transpose()
96  *pNode2->GetRPrev()*R2h));
97  Vec3 V(MatR2EulerAngles(RTmp.Transpose()));
98 
99  dTheta += V.dGet(3);
100 
101  Mat3x3 R1(pNode1->GetRCurr());
102  Mat3x3 R1hTmp(R1*R1h);
103  Vec3 e3a(R1hTmp.GetVec(3));
104  Vec3 Omega1(pNode1->GetWCurr());
105  Vec3 Omega2(pNode2->GetWCurr());
106  //relative velocity
107  doublereal v = (Omega1-Omega2).Dot(e3a)*r;
108  //reaction norm
109  doublereal modF = std::max(brakeForce.dGet(), preF);
110  fc->AfterConvergence(modF, v, X, XP, iGetFirstIndex() + NumSelfDof);
111 }
Mat3x3 R2h
Definition: brake.h:63
MatrixExpression< TransposedMatrix< MatrixDirectExpr< Matrix< T, N_rows, N_cols > > >, N_cols, N_rows > Transpose(const Matrix< T, N_rows, N_cols > &A)
Definition: matvec.h:2206
Definition: matvec3.h:98
doublereal dTheta
Definition: brake.h:74
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
const StructNode * pNode2
Definition: brake.h:59
const doublereal preF
Definition: brake.h:79
virtual void AfterConvergence(const doublereal F, const doublereal v, const VectorHandler &X, const VectorHandler &XP, const unsigned int solution_startdof)
Definition: friction.h:96
virtual const Mat3x3 & GetRPrev(void) const
Definition: strnode.h:1000
BasicFriction *const fc
Definition: brake.h:78
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
DotTraits< VectorExprLhs, VectorExprRhs, N_rows, N_rows >::ExpressionType Dot(const VectorExpression< VectorExprLhs, N_rows > &u, const VectorExpression< VectorExprRhs, N_rows > &v)
Definition: matvec.h:3133
Vec3 MatR2EulerAngles(const Mat3x3 &R)
Definition: matvec3.cc:887
DriveOwner brakeForce
Definition: brake.h:81
doublereal dGet(const doublereal &dVar) const
Definition: drive.cc:664
const StructNode * pNode1
Definition: brake.h:58
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
double doublereal
Definition: colamd.c:52
static const unsigned int NumSelfDof
Definition: brake.h:82
const doublereal r
Definition: brake.h:80
Mat3x3 R1h
Definition: brake.h:61

Here is the call graph for this function:

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

Implements Elem.

Definition at line 133 of file brake.cc.

References ExpandableRowVector::Add(), BasicFriction::AssJac(), brakeForce, d1, d2, DEBUGCOUT, DriveOwner::dGet(), Vec3::dGet(), grad::Dot(), BasicShapeCoefficient::dSh_c(), BasicFriction::fc(), fc, StructNode::GetRRef(), Mat3x3::GetVec(), StructNode::GetWCurr(), StructNode::GetWRef(), DofOwnerOwner::iGetFirstIndex(), StructDispNode::iGetFirstMomentumIndex(), StructDispNode::iGetFirstPositionIndex(), iGetNumDof(), ExpandableRowVector::Link(), M, MatCrossCross, NumSelfDof, pNode1, pNode2, preF, FullSubMatrixHandler::PutColIndex(), FullSubMatrixHandler::PutRowIndex(), r, R1h, R2h, ExpandableRowVector::ReDim(), FullSubMatrixHandler::ResizeReset(), ExpandableRowVector::Set(), VariableSubMatrixHandler::SetFull(), Sh_c, BasicShapeCoefficient::Sh_c(), ExpandableRowVector::Sub(), and WorkSpaceDim().

137 {
138  DEBUGCOUT("Entering Brake::AssJac()" << std::endl);
139 
140  /* Setta la sottomatrice come piena (e' un po' dispersivo, ma lo jacobiano
141  * e' complicato */
142  FullSubMatrixHandler& WM = WorkMat.SetFull();
143 
144  /* Ridimensiona la sottomatrice in base alle esigenze */
145  integer iNumRows = 0;
146  integer iNumCols = 0;
147  WorkSpaceDim(&iNumRows, &iNumCols);
148  WM.ResizeReset(iNumRows, iNumCols);
149 
150  /* Recupera gli indici delle varie incognite */
151  integer iNode1FirstPosIndex = pNode1->iGetFirstPositionIndex();
152  integer iNode1FirstMomIndex = pNode1->iGetFirstMomentumIndex();
153  integer iNode2FirstPosIndex = pNode2->iGetFirstPositionIndex();
154  integer iNode2FirstMomIndex = pNode2->iGetFirstMomentumIndex();
155  integer iFirstReactionIndex = iGetFirstIndex();
156 
157  /* Setta gli indici delle equazioni */
158  for (unsigned int iCnt = 1; iCnt <= 6; iCnt++) {
159  WM.PutRowIndex(iCnt, iNode1FirstMomIndex+iCnt);
160  WM.PutColIndex(iCnt, iNode1FirstPosIndex+iCnt);
161  WM.PutRowIndex(6+iCnt, iNode2FirstMomIndex+iCnt);
162  WM.PutColIndex(6+iCnt, iNode2FirstPosIndex+iCnt);
163  }
164 
165  for (unsigned int iCnt = 1; iCnt <= iGetNumDof(); iCnt++) {
166  WM.PutRowIndex(12+iCnt, iFirstReactionIndex+iCnt);
167  WM.PutColIndex(12+iCnt, iFirstReactionIndex+iCnt);
168  }
169 
170  /* Recupera i dati che servono */
171  Mat3x3 R1(pNode1->GetRRef());
172  Mat3x3 R2(pNode2->GetRRef());
173  Vec3 d1Tmp(R1*d1);
174  Vec3 d2Tmp(R2*d2);
175  Mat3x3 R1hTmp(R1*R1h);
176  Mat3x3 R2hTmp(R2*R2h);
177 
178  /* Suppongo che le reazioni F, M siano gia' state aggiornate da AssRes;
179  * ricordo che la forza F e' nel sistema globale, mentre la coppia M
180  * e' nel sistema locale ed il terzo termine, M(3), e' nullo in quanto
181  * diretto come l'asse attorno al quale la rotazione e' consentita */
182 
183 
184  /*
185  * La cerniera piana ha le prime 3 equazioni uguali alla cerniera sferica;
186  * inoltre ha due equazioni che affermano la coincidenza dell'asse 3 del
187  * riferimento solidale con la cerniera visto dai due nodi.
188  *
189  * (R1 * R1h * e1)^T * (R2 * R2h * e3) = 0
190  * (R1 * R1h * e2)^T * (R2 * R2h * e3) = 0
191  *
192  * A queste equazioni corrisponde una reazione di coppia agente attorno
193  * agli assi 1 e 2 del riferimento della cerniera. La coppia attorno
194  * all'asse 3 e' nulla per definizione. Quindi la coppia nel sistema
195  * globale e':
196  * -R1 * R1h * M per il nodo 1,
197  * R2 * R2h * M per il nodo 2
198  *
199  *
200  * xa ga xb gb F M
201  * Qa | 0 0 0 0 I 0 | | xa | | -F |
202  * Ga | 0 c*(F/\da/\-(Sa*M)/\) 0 0 da/\ Sa | | ga | | -da/\F-Sa*M |
203  * Qb | 0 0 0 0 -I 0 | | xb | = | F |
204  * Gb | 0 0 0 -c*(F/\db/\-(Sb*M)/\) -db/\ -Sb | | gb | | db/\F+Sb*M |
205  * F | -c*I c*da/\ c*I -c*db/\ 0 0 | | F | | xa+da-xb-db |
206  * M1 | 0 c*Tb1^T*Ta3/\ 0 c*Ta3^T*Tb1/\ 0 0 | | M | | Sb^T*Ta3 |
207  * M2 | 0 c*Tb2^T*Ta3/\ 0 c*Ta3^T*Tb2/\ 0 0 |
208  *
209  * con da = R1*d01, db = R2*d02, c = dCoef,
210  * Sa = R1*R1h*[e1,e2], Sb = R2*R2h*[e1, e2],
211  * Ta3 = R1*R1h*e3, Tb1 = R2*R2h*e1, Tb2 = R2*R2h*e2
212  */
213 
214 
215  /* Moltiplica la forza ed il momento per il coefficiente
216  * del metodo */
217  Vec3 MTmp = M*dCoef;
218 
219  Vec3 e3a(R1hTmp.GetVec(3));
220  Vec3 e1b(R2hTmp.GetVec(1));
221  Vec3 e2b(R2hTmp.GetVec(2));
222  MTmp = e2b*MTmp.dGet(1)-e1b*MTmp.dGet(2);
223 
224  Mat3x3 MWedgee3aWedge(MatCrossCross, MTmp, e3a);
225  Mat3x3 e3aWedgeMWedge(MatCrossCross, e3a, MTmp);
226 
227 
228  /* Contributo del momento alle equazioni di equilibrio dei nodi */
229  Vec3 Tmp1(e2b.Cross(e3a));
230  Vec3 Tmp2(e3a.Cross(e1b));
231 
232 
233  /* Modifica: divido le equazioni di vincolo per dCoef */
234 
235  /* Equazioni di vincolo degli spostamenti */
236 
237  /* Equazione di vincolo del momento
238  *
239  * Attenzione: bisogna scrivere il vettore trasposto
240  * (Sb[1]^T*(Sa[3]/\))*dCoef
241  * Questo pero' e' uguale a:
242  * (-Sa[3]/\*Sb[1])^T*dCoef,
243  * che puo' essere ulteriormente semplificato:
244  * (Sa[3].Cross(Sb[1])*(-dCoef))^T;
245  */
246 
247 
248  //retrive
249  //friction coef
250  doublereal f = fc->fc();
251  //shape function
252  doublereal shc = Sh_c->Sh_c();
253  //omega and omega rif
254  Vec3 Omega1(pNode1->GetWCurr());
255  Vec3 Omega2(pNode2->GetWCurr());
256  Vec3 Omega1r(pNode1->GetWRef());
257  Vec3 Omega2r(pNode2->GetWRef());
258  //compute
259  //relative velocity
260  doublereal v = (Omega1-Omega2).Dot(e3a)*r;
261  //reaction norm
262  doublereal modF = std::max(brakeForce.dGet(), preF);
263  //reaction moment
264  //doublereal M3 = shc*modF*r;
265 
269  //variation of reaction force
270  dF.ReDim(0);
271  //variation of relative velocity
272  dv.ReDim(6);
273 
274 /* new (approximate: assume constant triads orientations)
275  * relative velocity linearization */
276 
277  /* FIXME: why *1. ??? */
278  dv.Set((e3a(1)*1.)*r, 0 + 1, 3 + 1);
279  dv.Set((e3a(2)*1.)*r, 0 + 2, 3 + 2);
280  dv.Set((e3a(3)*1.)*r, 0 + 3, 3 + 3);
281 
282  dv.Set(-(e3a(1)*1.)*r, 3 + 1, 9 + 1);
283  dv.Set(-(e3a(2)*1.)*r, 3 + 2, 9 + 2);
284  dv.Set(-(e3a(3)*1.)*r, 3 + 3, 9 + 3);
285 
286 
287  //assemble friction states
288  fc->AssJac(WM,dfc, 12 + NumSelfDof,
289  iFirstReactionIndex + NumSelfDof, dCoef, modF, v,
290  XCurr, XPrimeCurr, dF, dv);
292  ExpandableRowVector dShc;
293  //compute
294  //variation of shape function
295  Sh_c->dSh_c(dShc,f,modF,v,dfc,dF,dv);
296  //variation of moment component
297  dM3.ReDim(2);
298  dM3.Set(shc*r, 1); dM3.Link(1, &dF);
299  dM3.Set(modF*r, 2); dM3.Link(2, &dShc);
300 
301  //assemble first node
302  //variation of moment component
303  dM3.Add(WM, 3 + 1, e3a(1));
304  dM3.Add(WM, 3 + 2, e3a(2));
305  dM3.Add(WM, 3 + 3, e3a(3));
306  //assemble second node
307  //variation of moment component
308  dM3.Sub(WM, 9 + 1, e3a(1));
309  dM3.Sub(WM, 9 + 2, e3a(2));
310  dM3.Sub(WM, 9 + 3, e3a(3));
311 
312  return WorkMat;
313 }
Mat3x3 R2h
Definition: brake.h:63
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
void Set(doublereal xx, integer i, integer iidx)
Definition: JacSubMatrix.cc:95
virtual const Mat3x3 & GetRRef(void) const
Definition: strnode.h:1006
Definition: matvec3.h:98
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
void Add(doublereal xx, integer i)
const StructNode * pNode2
Definition: brake.h:59
virtual doublereal Sh_c(void) const =0
const doublereal preF
Definition: brake.h:79
virtual const Vec3 & GetWRef(void) const
Definition: strnode.h:1024
Vec3 d1
Definition: brake.h:60
virtual doublereal fc(void) const =0
void ReDim(const integer n)
Definition: JacSubMatrix.cc:50
virtual unsigned int iGetNumDof(void) const
Definition: brake.cc:407
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
BasicFriction *const fc
Definition: brake.h:78
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
DotTraits< VectorExprLhs, VectorExprRhs, N_rows, N_rows >::ExpressionType Dot(const VectorExpression< VectorExprLhs, N_rows > &u, const VectorExpression< VectorExprRhs, N_rows > &v)
Definition: matvec.h:3133
virtual void dSh_c(ExpandableRowVector &dShc, const doublereal f, const doublereal F, const doublereal v, const ExpandableRowVector &dfc, const ExpandableRowVector &dF, const ExpandableRowVector &dv) const =0
void Link(const integer i, const ExpandableRowVector *const xp, const integer rhs_block=1)
Definition: JacSubMatrix.cc:68
DriveOwner brakeForce
Definition: brake.h:81
virtual void ResizeReset(integer, integer)
Definition: submat.cc:182
virtual void AssJac(FullSubMatrixHandler &WorkMat, ExpandableRowVector &dfc, const unsigned int startdof, const unsigned int solution_startdof, const doublereal dCoef, const doublereal F, const doublereal v, const VectorHandler &X, const VectorHandler &XP, const ExpandableRowVector &dF, const ExpandableRowVector &dv) const =0
const MatCrossCross_Manip MatCrossCross
Definition: matvec3.cc:640
void PutRowIndex(integer iSubRow, integer iRow)
Definition: submat.h:311
void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: brake.h:124
BasicShapeCoefficient *const Sh_c
Definition: brake.h:77
doublereal dGet(const doublereal &dVar) const
Definition: drive.cc:664
void Sub(doublereal xx, integer i)
const StructNode * pNode1
Definition: brake.h:58
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51
static const unsigned int NumSelfDof
Definition: brake.h:82
Vec3 d2
Definition: brake.h:62
const doublereal r
Definition: brake.h:80
Vec3 M
Definition: brake.h:65
Mat3x3 R1h
Definition: brake.h:61

Here is the call graph for this function:

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

!!!!!!!!!!!!!

Implements Elem.

Definition at line 317 of file brake.cc.

References VectorHandler::Add(), BasicFriction::AssRes(), brakeForce, d1, d2, DEBUGCOUT, DriveOwner::dGet(), Vec3::dGet(), grad::Dot(), BasicFriction::fc(), fc, StructNode::GetRCurr(), Mat3x3::GetVec(), StructNode::GetWCurr(), StructDispNode::GetXCurr(), DofOwnerOwner::iGetFirstIndex(), StructDispNode::iGetFirstMomentumIndex(), iGetNumDof(), M, MBDYN_EXCEPT_ARGS, NumSelfDof, pNode1, pNode2, preF, SubVectorHandler::PutRowIndex(), r, R1h, R2h, VectorHandler::ResizeReset(), Sh_c, BasicShapeCoefficient::Sh_c(), VectorHandler::Sub(), WorkSpaceDim(), and Zero3.

321 {
322  DEBUGCOUT("Entering Brake::AssRes()" << std::endl);
323 
324  /* Dimensiona e resetta la matrice di lavoro */
325  integer iNumRows = 0;
326  integer iNumCols = 0;
327  WorkSpaceDim(&iNumRows, &iNumCols);
328  WorkVec.ResizeReset(iNumRows);
329 
330  /* Indici */
331  integer iNode1FirstMomIndex = pNode1->iGetFirstMomentumIndex();
332  integer iNode2FirstMomIndex = pNode2->iGetFirstMomentumIndex();
333  integer iFirstReactionIndex = iGetFirstIndex();
334 
335  /* Indici dei nodi */
336  for (int iCnt = 1; iCnt <= 6; iCnt++) {
337  WorkVec.PutRowIndex(iCnt, iNode1FirstMomIndex+iCnt);
338  WorkVec.PutRowIndex(6+iCnt, iNode2FirstMomIndex+iCnt);
339  }
340 
341  /* Indici del vincolo */
342  for (unsigned int iCnt = 1; iCnt <= iGetNumDof(); iCnt++) {
343  WorkVec.PutRowIndex(12+iCnt, iFirstReactionIndex+iCnt);
344  }
345 
346  /* Aggiorna i dati propri */
347  //FIXME
348  //F = Vec3(Zero3);
349  M = Vec3(Zero3);
350 
351  /*
352  * FIXME: provare a mettere "modificatori" di forza/momento sui gdl
353  * residui: attrito, rigidezze e smorzamenti, ecc.
354  */
355 
356  /* Recupera i dati */
357  Vec3 x1(pNode1->GetXCurr());
358  Vec3 x2(pNode2->GetXCurr());
359  Mat3x3 R1(pNode1->GetRCurr());
360  Mat3x3 R2(pNode2->GetRCurr());
361 
362  /* Costruisce i dati propri nella configurazione corrente */
363  Vec3 dTmp1(R1*d1);
364  Vec3 dTmp2(R2*d2);
365  Mat3x3 R1hTmp(R1*R1h);
366  Mat3x3 R2hTmp(R2*R2h);
367 
368  Vec3 e3a(R1hTmp.GetVec(3));
369  Vec3 e1b(R2hTmp.GetVec(1));
370  Vec3 e2b(R2hTmp.GetVec(2));
371 
372  Vec3 MTmp(e2b.Cross(e3a)*M.dGet(1)+e3a.Cross(e1b)*M.dGet(2));
373 
374  /* Equazioni di equilibrio, nodo 1 */
375 
376  /* Equazioni di equilibrio, nodo 2 */
377 
378  /* Modifica: divido le equazioni di vincolo per dCoef */
379 
380  bool ChangeJac(false);
381  Vec3 Omega1(pNode1->GetWCurr());
382  Vec3 Omega2(pNode2->GetWCurr());
383  doublereal v = (Omega1-Omega2).Dot(e3a)*r;
384  doublereal modF = std::max(brakeForce.dGet(), preF);
385  try {
386  fc->AssRes(WorkVec, 12 + NumSelfDof,
387  iFirstReactionIndex + NumSelfDof,
388  modF, v, XCurr, XPrimeCurr);
389  }
391  ChangeJac = true;
392  }
393  doublereal f = fc->fc();
394  doublereal shc = Sh_c->Sh_c(f, modF, v);
395  M(3) = r*shc*modF;
396  WorkVec.Sub(4, e3a*M(3));
397  WorkVec.Add(10, e3a*M(3));
399 // M += e3a*M3;
400  if (ChangeJac) {
402  }
403 
404  return WorkVec;
405 }
Mat3x3 R2h
Definition: brake.h:63
const Vec3 Zero3(0., 0., 0.)
virtual void AssRes(SubVectorHandler &WorkVec, const unsigned int startdof, const unsigned int solution_startdof, const doublereal F, const doublereal v, const VectorHandler &X, const VectorHandler &XP)=0
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
Definition: matvec3.h:98
virtual void ResizeReset(integer)
Definition: vh.cc:55
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
virtual void Sub(integer iRow, const Vec3 &v)
Definition: vh.cc:78
const StructNode * pNode2
Definition: brake.h:59
virtual doublereal Sh_c(void) const =0
const doublereal preF
Definition: brake.h:79
Vec3 d1
Definition: brake.h:60
virtual doublereal fc(void) const =0
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
virtual unsigned int iGetNumDof(void) const
Definition: brake.cc:407
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
BasicFriction *const fc
Definition: brake.h:78
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
DotTraits< VectorExprLhs, VectorExprRhs, N_rows, N_rows >::ExpressionType Dot(const VectorExpression< VectorExprLhs, N_rows > &u, const VectorExpression< VectorExprRhs, N_rows > &v)
Definition: matvec.h:3133
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
virtual void Add(integer iRow, const Vec3 &v)
Definition: vh.cc:63
DriveOwner brakeForce
Definition: brake.h:81
void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: brake.h:124
BasicShapeCoefficient *const Sh_c
Definition: brake.h:77
doublereal dGet(const doublereal &dVar) const
Definition: drive.cc:664
const StructNode * pNode1
Definition: brake.h:58
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51
static const unsigned int NumSelfDof
Definition: brake.h:82
Vec3 d2
Definition: brake.h:62
const doublereal r
Definition: brake.h:80
Vec3 M
Definition: brake.h:65
Mat3x3 R1h
Definition: brake.h:61

Here is the call graph for this function:

doublereal Brake::dGetPrivData ( unsigned int  i) const
virtual

Reimplemented from SimulationEntity.

Definition at line 509 of file brake.cc.

References ASSERT, dTheta, WithLabel::GetLabel(), StructNode::GetRCurr(), StructNode::GetWCurr(), iGetNumPrivData(), MBDYN_EXCEPT_ARGS, pNode1, pNode2, R2h, and grad::Transpose().

510 {
511  ASSERT(i >= 1 && i <= iGetNumPrivData());
512 
513  switch (i) {
514  case 1: {
515  return dTheta;
516  }
517 
518  case 2: {
519  Mat3x3 R2TmpT((pNode2->GetRCurr()*R2h).Transpose());
520  Vec3 v(R2TmpT*(pNode2->GetWCurr()-pNode1->GetWCurr()));
521 
522  return v.dGet(3);
523  }
524 
525  default:
526  silent_cerr("Brake(" << GetLabel() << "): "
527  "illegal private data " << i << std::endl);
529  }
530 }
Mat3x3 R2h
Definition: brake.h:63
MatrixExpression< TransposedMatrix< MatrixDirectExpr< Matrix< T, N_rows, N_cols > > >, N_cols, N_rows > Transpose(const Matrix< T, N_rows, N_cols > &A)
Definition: matvec.h:2206
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
Definition: matvec3.h:98
doublereal dTheta
Definition: brake.h:74
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
const StructNode * pNode2
Definition: brake.h:59
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
#define ASSERT(expression)
Definition: colamd.c:977
virtual unsigned int iGetNumPrivData(void) const
Definition: brake.cc:486
const StructNode * pNode1
Definition: brake.h:58
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

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

Reimplemented from Elem.

Definition at line 175 of file brake.h.

References pNode1, and pNode2.

175  {
176  connectedNodes.resize(2);
177  connectedNodes[0] = pNode1;
178  connectedNodes[1] = pNode2;
179  };
const StructNode * pNode2
Definition: brake.h:59
const StructNode * pNode1
Definition: brake.h:58
DofOrder::Order Brake::GetDofType ( unsigned int  i) const
virtual

Reimplemented from Elem.

Definition at line 417 of file brake.cc.

References DofOrder::ALGEBRAIC, ASSERT, fc, SimulationEntity::GetDofType(), iGetNumDof(), and NumSelfDof.

417  {
418  ASSERT(i >= 0 && i < iGetNumDof());
419  if (i<NumSelfDof) {
420  return DofOrder::ALGEBRAIC;
421  } else {
422  return fc->GetDofType(i-NumSelfDof);
423  }
424 };
virtual unsigned int iGetNumDof(void) const
Definition: brake.cc:407
BasicFriction *const fc
Definition: brake.h:78
virtual DofOrder::Order GetDofType(unsigned int i) const =0
#define ASSERT(expression)
Definition: colamd.c:977
static const unsigned int NumSelfDof
Definition: brake.h:82

Here is the call graph for this function:

DofOrder::Order Brake::GetEqType ( unsigned int  i) const
virtual

Reimplemented from SimulationEntity.

Definition at line 427 of file brake.cc.

References DofOrder::ALGEBRAIC, ASSERTMSGBREAK, fc, SimulationEntity::GetEqType(), iGetNumDof(), and NumSelfDof.

428 {
429  ASSERTMSGBREAK(i < iGetNumDof(),
430  "INDEX ERROR in Brake::GetEqType");
431  if (i<NumSelfDof) {
432  return DofOrder::ALGEBRAIC;
433  } else {
434  return fc->GetEqType(i-NumSelfDof);
435  }
436 }
virtual DofOrder::Order GetEqType(unsigned int i) const
Definition: simentity.h:138
#define ASSERTMSGBREAK(expr, msg)
Definition: myassert.h:222
virtual unsigned int iGetNumDof(void) const
Definition: brake.cc:407
BasicFriction *const fc
Definition: brake.h:78
static const unsigned int NumSelfDof
Definition: brake.h:82

Here is the call graph for this function:

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

Implements Joint.

Definition at line 109 of file brake.h.

References Joint::BRAKE.

109  {
110  return Joint::BRAKE;
111  };
virtual unsigned int Brake::iGetInitialNumDof ( void  ) const
inlinevirtual

Implements SubjectToInitialAssembly.

Definition at line 150 of file brake.h.

150  {
151  return 10;
152  };
unsigned int Brake::iGetNumDof ( void  ) const
virtual

Reimplemented from Elem.

Definition at line 407 of file brake.cc.

References fc, SimulationEntity::iGetNumDof(), and NumSelfDof.

Referenced by AssJac(), AssRes(), GetDofType(), and GetEqType().

407  {
408  unsigned int i = NumSelfDof;
409  if (fc) {
410  i+=fc->iGetNumDof();
411  }
412  return i;
413 };
BasicFriction *const fc
Definition: brake.h:78
virtual unsigned int iGetNumDof(void) const =0
static const unsigned int NumSelfDof
Definition: brake.h:82

Here is the call graph for this function:

unsigned int Brake::iGetNumPrivData ( void  ) const
virtual

Reimplemented from SimulationEntity.

Definition at line 486 of file brake.cc.

Referenced by dGetPrivData().

487 {
488  /* FIXME: add access to friction priv data... */
489  return 2;
490 }
unsigned int Brake::iGetPrivDataIdx ( const char *  s) const
virtual

Reimplemented from SimulationEntity.

Definition at line 493 of file brake.cc.

References ASSERT.

494 {
495  ASSERT(s != NULL);
496 
497  if (strcmp(s, "rz") == 0) {
498  return 1;
499  }
500 
501  if (strcmp(s, "wz") == 0) {
502  return 2;
503  }
504 
505 
506  return 0;
507 }
#define ASSERT(expression)
Definition: colamd.c:977
VariableSubMatrixHandler & Brake::InitialAssJac ( VariableSubMatrixHandler WorkMat,
const VectorHandler XCurr 
)
virtual

Implements SubjectToInitialAssembly.

Definition at line 460 of file brake.cc.

References VariableSubMatrixHandler::SetNullMatrix().

462 {
463  /* Per ora usa la matrice piena; eventualmente si puo'
464  * passare a quella sparsa quando si ottimizza */
465  WorkMat.SetNullMatrix();
466 
467  return WorkMat;
468 }
void SetNullMatrix(void)
Definition: submat.h:1159

Here is the call graph for this function:

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

Implements SubjectToInitialAssembly.

Definition at line 473 of file brake.cc.

References DEBUGCOUT, and VectorHandler::ResizeReset().

475 {
476  DEBUGCOUT("Entering Brake::InitialAssRes()" << std::endl);
477 
478  /* Dimensiona e resetta la matrice di lavoro */
479  WorkVec.ResizeReset(0);
480 
481  return WorkVec;
482 }
virtual void ResizeReset(integer)
Definition: vh.cc:55
#define DEBUGCOUT(msg)
Definition: myassert.h:232

Here is the call graph for this function:

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

Implements SubjectToInitialAssembly.

Definition at line 153 of file brake.h.

154  {
155  *piNumRows = 34;
156  *piNumCols = 34;
157  };
void Brake::Output ( OutputHandler OH) const
virtual

Reimplemented from ToBeOutput.

Definition at line 439 of file brake.cc.

References brakeForce, ToBeOutput::bToBeOutput(), DriveOwner::dGet(), dRaDegr, BasicFriction::fc(), fc, WithLabel::GetLabel(), StructNode::GetRCurr(), StructNode::GetWCurr(), OutputHandler::Joints(), M, MatR2EulerAngles(), Joint::Output(), pNode1, pNode2, R1h, R2h, grad::Transpose(), and Zero3.

440 {
441  if (bToBeOutput()) {
442  Mat3x3 R2Tmp(pNode2->GetRCurr()*R2h);
443  Mat3x3 RTmp((pNode1->GetRCurr()*R1h).Transpose()*R2Tmp);
444  Mat3x3 R2TmpT(R2Tmp.Transpose());
445 
446  std::ostream &of = Joint::Output(OH.Joints(), "PlaneHinge", GetLabel(),
447  /* R2TmpT*F*/ Zero3, M, /* F */ Zero3, R2Tmp*M)
448  << " " << MatR2EulerAngles(RTmp)*dRaDegr
449  << " " << R2TmpT*(pNode2->GetWCurr()-pNode1->GetWCurr());
450  if (fc) {
451  of << " " << fc->fc() << " " << brakeForce.dGet();
452  }
453  of << std::endl;
454  }
455 }
Mat3x3 R2h
Definition: brake.h:63
const Vec3 Zero3(0., 0., 0.)
virtual bool bToBeOutput(void) const
Definition: output.cc:890
MatrixExpression< TransposedMatrix< MatrixDirectExpr< Matrix< T, N_rows, N_cols > > >, N_cols, N_rows > Transpose(const Matrix< T, N_rows, N_cols > &A)
Definition: matvec.h:2206
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
const StructNode * pNode2
Definition: brake.h:59
virtual doublereal fc(void) const =0
BasicFriction *const fc
Definition: brake.h:78
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
const doublereal dRaDegr
Definition: matvec3.cc:884
std::ostream & Joints(void) const
Definition: output.h:443
Vec3 MatR2EulerAngles(const Mat3x3 &R)
Definition: matvec3.cc:887
DriveOwner brakeForce
Definition: brake.h:81
doublereal dGet(const doublereal &dVar) const
Definition: drive.cc:664
const StructNode * pNode1
Definition: brake.h:58
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
Vec3 M
Definition: brake.h:65
Mat3x3 R1h
Definition: brake.h:61

Here is the call graph for this function:

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

Implements Elem.

Definition at line 115 of file brake.cc.

References d1, d2, WithLabel::GetLabel(), Mat3x3::GetVec(), pNode1, pNode2, R1h, R2h, Joint::Restart(), Write(), and Vec3::Write().

116 {
117  Joint::Restart(out) << ", plane hinge, "
118  << pNode1->GetLabel() << ", reference, node, ",
119  d1.Write(out, ", ")
120  << ", hinge, reference, node, 1, ", (R1h.GetVec(1)).Write(out, ", ")
121  << ", 2, ", (R1h.GetVec(2)).Write(out, ", ") << ", "
122  << pNode2->GetLabel() << ", reference, node, ",
123  d2.Write(out, ", ")
124  << ", hinge, reference, node, 1, ", (R2h.GetVec(1)).Write(out, ", ")
125  << ", 2, ", (R2h.GetVec(2)).Write(out, ", ") << ';' << std::endl;
126 
127  return out;
128 }
Mat3x3 R2h
Definition: brake.h:63
std::ostream & Write(std::ostream &out, const char *sFill=" ") const
Definition: matvec3.cc:738
std::ostream & Write(std::ostream &out, const FullMatrixHandler &m, const char *s, const char *s2)
Definition: fullmh.cc:376
const StructNode * pNode2
Definition: brake.h:59
Vec3 d1
Definition: brake.h:60
Vec3 GetVec(unsigned short int i) const
Definition: matvec3.h:893
virtual std::ostream & Restart(std::ostream &out) const
Definition: joint.h:195
const StructNode * pNode1
Definition: brake.h:58
unsigned int GetLabel(void) const
Definition: withlab.cc:62
Vec3 d2
Definition: brake.h:62
Mat3x3 R1h
Definition: brake.h:61

Here is the call graph for this function:

void Brake::SetValue ( DataManager pDM,
VectorHandler X,
VectorHandler XP,
SimulationEntity::Hints ph = 0 
)
virtual

Reimplemented from Joint.

Definition at line 76 of file brake.cc.

References Vec3::dGet(), dTheta, fc, StructNode::GetRCurr(), DofOwnerOwner::iGetFirstIndex(), MatR2EulerAngles(), NumSelfDof, pNode1, pNode2, R1h, R2h, BasicFriction::SetValue(), and grad::Transpose().

79 {
81  Vec3 v(MatR2EulerAngles(RTmp));
82 
83  dTheta = v.dGet(3);
84 
85  fc->SetValue(pDM, X, XP, ph, iGetFirstIndex() + NumSelfDof);
86 }
Mat3x3 R2h
Definition: brake.h:63
MatrixExpression< TransposedMatrix< MatrixDirectExpr< Matrix< T, N_rows, N_cols > > >, N_cols, N_rows > Transpose(const Matrix< T, N_rows, N_cols > &A)
Definition: matvec.h:2206
Definition: matvec3.h:98
doublereal dTheta
Definition: brake.h:74
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
void SetValue(DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)
Definition: friction.h:45
const StructNode * pNode2
Definition: brake.h:59
BasicFriction *const fc
Definition: brake.h:78
Vec3 MatR2EulerAngles(const Mat3x3 &R)
Definition: matvec3.cc:887
const StructNode * pNode1
Definition: brake.h:58
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
static const unsigned int NumSelfDof
Definition: brake.h:82
Mat3x3 R1h
Definition: brake.h:61

Here is the call graph for this function:

void Brake::WorkSpaceDim ( integer piNumRows,
integer piNumCols 
) const
inlinevirtual

Implements Elem.

Definition at line 124 of file brake.h.

References fc, SimulationEntity::iGetNumDof(), and NumDof.

Referenced by AssJac(), and AssRes().

124  {
125  *piNumRows = NumDof;
126  *piNumCols = NumDof;
127  if (fc) {
128  *piNumRows += fc->iGetNumDof();
129  *piNumCols += fc->iGetNumDof();
130  }
131  };
static const unsigned int NumDof
Definition: brake.h:83
BasicFriction *const fc
Definition: brake.h:78
virtual unsigned int iGetNumDof(void) const =0

Here is the call graph for this function:

Member Data Documentation

DriveOwner Brake::brakeForce
private

Definition at line 81 of file brake.h.

Referenced by AfterConvergence(), AssJac(), AssRes(), and Output().

Vec3 Brake::d1
private

Definition at line 60 of file brake.h.

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

Vec3 Brake::d2
private

Definition at line 62 of file brake.h.

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

doublereal Brake::dTheta
mutableprivate

Definition at line 74 of file brake.h.

Referenced by AfterConvergence(), dGetPrivData(), and SetValue().

BasicFriction* const Brake::fc
private
Vec3 Brake::M
private

Definition at line 65 of file brake.h.

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

const unsigned int Brake::NumDof
staticprivate

Definition at line 83 of file brake.h.

Referenced by WorkSpaceDim().

const unsigned int Brake::NumSelfDof
staticprivate

Definition at line 82 of file brake.h.

Referenced by AfterConvergence(), AssJac(), AssRes(), GetDofType(), GetEqType(), iGetNumDof(), and SetValue().

const StructNode* Brake::pNode1
private
const StructNode* Brake::pNode2
private
const doublereal Brake::preF
private

Definition at line 79 of file brake.h.

Referenced by AfterConvergence(), AssJac(), and AssRes().

const doublereal Brake::r
private

Definition at line 80 of file brake.h.

Referenced by AfterConvergence(), AssJac(), and AssRes().

Mat3x3 Brake::R1h
private

Definition at line 61 of file brake.h.

Referenced by AfterConvergence(), AssJac(), AssRes(), Output(), Restart(), and SetValue().

Mat3x3 Brake::R2h
private

Definition at line 63 of file brake.h.

Referenced by AfterConvergence(), AssJac(), AssRes(), dGetPrivData(), Output(), Restart(), and SetValue().

BasicShapeCoefficient* const Brake::Sh_c
private

Definition at line 77 of file brake.h.

Referenced by AssJac(), and AssRes().


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