59 n(n),
dD(0.),
dF(0.) {
64 ASSERT(n.
Dot() > std::numeric_limits<doublereal>::epsilon());
81 virtual ostream&
Restart(ostream& out)
const {
82 return out <<
"ContactJoint: not implemented yet" << endl;
116 || (dD == 0. &&
dF >= 0.)
117 || (dD == 0. &&
dF == 0. && dV > 0.)) {
120 WM.
PutItem(1, iIndex, iIndex, 1.);
130 Vec3 Tmp(N.Cross(D));
131 for (
integer i = 1; i <= 3; i++) {
132 WM.
PutItem(i, iIndex, iNode1ColIndex+3+i, Tmp.dGet(i));
134 WM.
PutItem(9+i, iNode1RowIndex+i, iIndex, -d);
135 WM.
PutItem(12+i, iNode2RowIndex+i, iIndex, d);
136 WM.
PutItem(3+i, iIndex, iNode1ColIndex+i, -d);
137 WM.
PutItem(6+i, iIndex, iNode2ColIndex+i, d);
141 WM.
PutCross(16, iNode1RowIndex+4, iNode1ColIndex+4, Tmp);
142 WM.
PutCross(22, iNode2RowIndex+4, iNode1ColIndex+4, -Tmp);
162 || (dD == 0. &&
dF >= 0.)
163 || (dD == 0. &&
dF == 0. && dV > 0.)) {
175 for (
integer i = 1; i <= 3; i++) {
177 WorkVec.
PutItem(i, iNode1RowIndex+i, d);
178 WorkVec.
PutItem(3+i, iNode2RowIndex+i, -d);
180 WorkVec.
PutItem(7, iIndex, -dD/dCoef);
190 <<
" " <<
dD << endl;
234 connectedNodes.resize(2);
235 connectedNodes[0] =
pNode1;
236 connectedNodes[1] =
pNode2;
const Vec3 Zero3(0., 0., 0.)
virtual const Mat3x3 & GetRCurr(void) const
virtual Node::Type GetNodeType(void) const
doublereal Dot(const Vec3 &v) const
void PutCross(integer iSubIt, integer iFirstRow, integer iFirstCol, const Vec3 &v)
std::vector< Hint * > Hints
virtual void PutItem(integer iSubRow, integer iRow, const doublereal &dCoef)
void Resize(integer iNewRow, integer iNewCol)
void PutItem(integer iSubIt, integer iRow, integer iCol, const doublereal &dCoef)
const doublereal & dGet(unsigned short int iRow) const
virtual integer iGetFirstMomentumIndex(void) const =0
virtual integer iGetFirstPositionIndex(void) const
std::ostream & Joints(void) const
#define ASSERT(expression)
virtual void PutCoef(integer iRow, const doublereal &dCoef)=0
virtual const Vec3 & GetXCurr(void) const
virtual const Vec3 & GetVCurr(void) const
SparseSubMatrixHandler & SetSparse(void)
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
unsigned int GetLabel(void) const
virtual void Resize(integer iNewSize)=0