46 const Vec3& dTmp1,
const Vec3& dTmp2,
60 pNode1(pN1), pNode2(pN2),
61 d1(dTmp1), R1h(R1hTmp), d2(dTmp2), R2h(R2hTmp), M(
Zero3), dTheta(0.),
62 Sh_c(sh), fc(f), preF(pref), r(rr), brakeForce(pdc)
103 Vec3 e3a(R1hTmp.GetVec(3));
120 <<
", hinge, reference, node, 1, ", (
R1h.
GetVec(1)).
Write(out,
", ")
124 <<
", hinge, reference, node, 1, ", (
R2h.
GetVec(1)).
Write(out,
", ")
138 DEBUGCOUT(
"Entering Brake::AssJac()" << std::endl);
158 for (
unsigned int iCnt = 1; iCnt <= 6; iCnt++) {
165 for (
unsigned int iCnt = 1; iCnt <=
iGetNumDof(); iCnt++) {
222 MTmp = e2b*MTmp.
dGet(1)-e1b*MTmp.dGet(2);
229 Vec3 Tmp1(e2b.Cross(e3a));
230 Vec3 Tmp2(e3a.Cross(e1b));
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);
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);
289 iFirstReactionIndex +
NumSelfDof, dCoef, modF, v,
290 XCurr, XPrimeCurr, dF, dv);
298 dM3.
Set(shc*
r, 1); dM3.
Link(1, &dF);
299 dM3.
Set(modF*r, 2); dM3.
Link(2, &dShc);
303 dM3.
Add(WM, 3 + 1, e3a(1));
304 dM3.
Add(WM, 3 + 2, e3a(2));
305 dM3.
Add(WM, 3 + 3, e3a(3));
308 dM3.
Sub(WM, 9 + 1, e3a(1));
309 dM3.
Sub(WM, 9 + 2, e3a(2));
310 dM3.
Sub(WM, 9 + 3, e3a(3));
322 DEBUGCOUT(
"Entering Brake::AssRes()" << std::endl);
336 for (
int iCnt = 1; iCnt <= 6; iCnt++) {
337 WorkVec.
PutRowIndex(iCnt, iNode1FirstMomIndex+iCnt);
338 WorkVec.
PutRowIndex(6+iCnt, iNode2FirstMomIndex+iCnt);
342 for (
unsigned int iCnt = 1; iCnt <=
iGetNumDof(); iCnt++) {
343 WorkVec.
PutRowIndex(12+iCnt, iFirstReactionIndex+iCnt);
380 bool ChangeJac(
false);
388 modF, v, XCurr, XPrimeCurr);
396 WorkVec.
Sub(4, e3a*
M(3));
397 WorkVec.
Add(10, e3a*
M(3));
430 "INDEX ERROR in Brake::GetEqType");
444 Mat3x3 R2TmpT(R2Tmp.Transpose());
476 DEBUGCOUT(
"Entering Brake::InitialAssRes()" << std::endl);
497 if (strcmp(s,
"rz") == 0) {
501 if (strcmp(s,
"wz") == 0) {
526 silent_cerr(
"Brake(" <<
GetLabel() <<
"): "
527 "illegal private data " << i << std::endl);
virtual DofOrder::Order GetEqType(unsigned int i) const
void PutColIndex(integer iSubCol, integer iCol)
const Vec3 Zero3(0., 0., 0.)
#define ASSERTMSGBREAK(expr, msg)
void Set(doublereal xx, integer i, integer iidx)
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
std::ostream & Write(std::ostream &out, const char *sFill=" ") const
static void sh(int signum)
virtual const Mat3x3 & GetRRef(void) const
virtual bool bToBeOutput(void) const
MatrixExpression< TransposedMatrix< MatrixDirectExpr< Matrix< T, N_rows, N_cols > > >, N_cols, N_rows > Transpose(const Matrix< T, N_rows, N_cols > &A)
#define MBDYN_EXCEPT_ARGS
virtual void ResizeReset(integer)
FullSubMatrixHandler & SetFull(void)
virtual const Mat3x3 & GetRCurr(void) const
std::ostream & Write(std::ostream &out, const FullMatrixHandler &m, const char *s, const char *s2)
VariableSubMatrixHandler & InitialAssJac(VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
void Add(doublereal xx, integer i)
void SetValue(DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)
virtual void Sub(integer iRow, const Vec3 &v)
const StructNode * pNode2
static const unsigned int NumDof
VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
virtual doublereal Sh_c(void) const =0
virtual const Vec3 & GetWRef(void) const
std::vector< Hint * > Hints
DofOrder::Order GetDofType(unsigned int i) const
DofOrder::Order GetEqType(unsigned int i) const
virtual std::ostream & Restart(std::ostream &out) const
Vec3 GetVec(unsigned short int i) const
virtual doublereal fc(void) const =0
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
void ReDim(const integer n)
virtual void AfterConvergence(const doublereal F, const doublereal v, const VectorHandler &X, const VectorHandler &XP, const unsigned int solution_startdof)
void Output(OutputHandler &OH) const
virtual doublereal dGetPrivData(unsigned int i) const
virtual const Mat3x3 & GetRPrev(void) const
virtual unsigned int iGetNumDof(void) const
virtual void SetValue(DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)
const doublereal & dGet(unsigned short int iRow) const
virtual unsigned int iGetPrivDataIdx(const char *s) const
virtual integer iGetFirstMomentumIndex(void) const =0
virtual integer iGetFirstPositionIndex(void) const
virtual const Vec3 & GetWCurr(void) const
virtual std::ostream & Restart(std::ostream &out) const
virtual DofOrder::Order GetDofType(unsigned int i) const =0
std::ostream & Joints(void) const
DotTraits< VectorExprLhs, VectorExprRhs, N_rows, N_rows >::ExpressionType Dot(const VectorExpression< VectorExprLhs, N_rows > &u, const VectorExpression< VectorExprRhs, N_rows > &v)
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
#define ASSERT(expression)
Vec3 MatR2EulerAngles(const Mat3x3 &R)
virtual const Vec3 & GetXCurr(void) const
virtual void Add(integer iRow, const Vec3 &v)
void Link(const integer i, const ExpandableRowVector *const xp, const integer rhs_block=1)
virtual void ResizeReset(integer, integer)
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
SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
virtual unsigned int iGetNumDof(void) const =0
Mat3x3 Transpose(void) const
virtual void AfterConvergence(const VectorHandler &X, const VectorHandler &XP)
virtual unsigned int iGetNumPrivData(void) const
const MatCrossCross_Manip MatCrossCross
void PutRowIndex(integer iSubRow, integer iRow)
void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
BasicShapeCoefficient *const Sh_c
doublereal dGet(const doublereal &dVar) const
void Sub(doublereal xx, integer i)
const StructNode * pNode1
virtual integer iGetFirstIndex(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
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)
unsigned int GetLabel(void) const
static const unsigned int NumSelfDof
SubVectorHandler & InitialAssRes(SubVectorHandler &WorkVec, const VectorHandler &XCurr)