166 pdVec[
V2] = vh(++iFirstIndex);
167 pdVec[
V3] = vh(++iFirstIndex);
277 ASSERT(iRow >= 1 && iRow <= 3);
278 pdVec[--iRow] = dCoef;
286 ASSERT(iRow >= 1 && iRow <= 3);
287 return pdVec[--iRow];
291 ASSERT(iRow >= 1 && iRow <= 3);
292 return pdVec[--iRow];
296 ASSERT(iRow >= 1 && iRow <= 3);
297 return pdVec[--iRow];
485 for (
int i = 0; i < 3; i++) {
490 return sqrt(d2) <= dTol;
501 std::ostream&
Write(std::ostream& out,
const char* sFill =
" ")
const;
758 inline void Put(
unsigned short int iRow,
759 unsigned short int iCol,
761 ASSERT(iRow >= 1 && iRow <= 3);
762 ASSERT(iCol >= 1 && iCol <= 3);
763 pdMat[--iRow+3*--iCol] = dCoef;
771 unsigned short int iCol)
const {
772 ASSERT(iRow >= 1 && iRow <= 3);
773 ASSERT(iCol >= 1 && iCol <= 3);
774 return pdMat[--iRow+3*--iCol];
778 unsigned short int iCol) {
779 ASSERT(iRow >= 1 && iRow <= 3);
780 ASSERT(iCol >= 1 && iCol <= 3);
781 return pdMat[--iRow+3*--iCol];
785 unsigned short int iCol)
const {
786 ASSERT(iRow >= 1 && iRow <= 3);
787 ASSERT(iCol >= 1 && iCol <= 3);
788 return pdMat[--iRow+3*--iCol];
858 2.*pdMat[
M11], m12, m13,
859 m12, 2.*pdMat[
M22], m23,
860 m13, m23, 2.*pdMat[
M33]
1252 for (
int i = 0; i < 9; i++) {
1257 return sqrt(d2) <= dTol;
1374 std::ostream&
Write(std::ostream& out,
1375 const char* sFill =
" ",
1376 const char* sFill2 = NULL)
const;
1416 extern std::ostream&
Write(std::ostream& out,
const doublereal& d,
const char*);
1425 extern std::ostream&
Write(std::ostream& out,
const Vec3& v,
const char* s =
" ");
1435 extern std::ostream&
Write(std::ostream& out,
1437 const char* s =
" ",
1438 const char* s2 = NULL);
1506 pdm[
M12] = -pdv[
V3];
1510 pdm[
M23] = -pdv[
V1];
1511 pdm[
M31] = -pdv[
V2];
1526 double d11 = pdv1[
V1]*pdv2[
V1];
1527 double d22 = pdv1[
V2]*pdv2[
V2];
1528 double d33 = pdv1[
V3]*pdv2[
V3];
1530 pdm[
M11] = -d22 - d33;
1534 pdm[
M22] = -d33 - d11;
1538 pdm[
M33] = -d11 - d22;
1586 return Mat3x3(Mat3x3DEye, d);
1633 unsigned short int ib,
1671 if (
fabs(d) < std::numeric_limits<doublereal>::epsilon()) {
1672 silent_cerr(
"Param_Manip(): divide by zero, "
1673 "probably due to singularity in rotation parameters" << std::endl);
1702 m +=
Mat3x3(MatCrossCross, g, g*(d/2.));
1748 extern const Param_Manip
Param;
1753 extern const MatR_Manip
MatR;
1758 extern const MatG_Manip
MatG;
1763 extern const MatGm1_Manip
MatGm1;
1779 return t1.IsExactlySame(t2);
1786 return t1.IsSame(t2, dTol);
const MatGm1_Manip MatGm1
Vec3 & operator/=(const doublereal &d)
Mat3x3 MultRMRt(const Mat3x3 &m, const Mat3x3 &R)
virtual void Manipulate(Vec3 &v, const Mat3x3 &m) const =0
Vec3 MatR2EulerAngles(const Mat3x3 &R)
Vec3 Cross(const Vec3 &v) const
Vec3(const doublereal *pd)
std::ostream & Write(std::ostream &out, const char *sFill=" ") const
const doublereal & dGet(unsigned short int iRow, unsigned short int iCol) const
virtual ~Mat3x3_Manip(void)
bool IsSame(const T &t1, const T &t2, const doublereal &dTol)
const MatCross_Manip MatCross
bool IsSame(const Vec3 &v, const doublereal &dTol) const
#define MBDYN_EXCEPT_ARGS
void SubVec(unsigned short int i, const Vec3 &v)
std::ostream & Write(std::ostream &out, const doublereal &d, const char *)
Mat3x3 MulTMT(const Mat3x3 &m) const
doublereal Norm(void) const
Vec3(const VectorHandler &vh, integer iFirstIndex)
doublereal Tr(void) const
doublereal Dot(const Vec3 &v) const
virtual void Manipulate(Mat3x3 &m, const Vec3 &v1, const Vec3 &v2) const
bool IsDiag(const doublereal &dTol) const
const Mat3x3Zero_Manip Mat3x3Zero
Vec3 MatR2LinParam(const Mat3x3 &R)
Mat3x3 operator-(const Mat3x3 &m) const
const Mat3x3 & Skew(const Mat3x3 &m)
const Vec3 & mb_zero< Vec3 >(void)
doublereal Dot(void) const
Mat3x3 & operator*=(const doublereal &d)
Vec3 GetCol(unsigned short int i) const
Vec3 & operator-=(const Vec3 &v)
Mat3x3 operator+(const Mat3x3 &m) const
void Manipulate(Mat3x3 &m, const Vec3 &g) const
bool IsExactlySame(const T &t1, const T &t2)
void Manipulate(Mat3x3 &m, const Vec3 &v) const
const Mat3x3 & mb_zero< Mat3x3 >(void)
const Mat3x3 & Tens(const Vec3 &a, const Vec3 &b)
Mat3x3 mb_deye< Mat3x3 >(const doublereal d)
Vec3 EBEMult(const Vec3 &v) const
Mat3x3 & operator-=(const Mat3x3 &m)
void AddVec(unsigned short int i, const Vec3 &v)
Mat3x3(const Mat3x3_Manip &Manip)
virtual integer iGetSize(void) const =0
void Manipulate(Mat3x3 &m, const Vec3 &v) const
GradientExpression< UnaryExpr< FuncFabs, Expr > > fabs(const GradientExpression< Expr > &u)
bool IsExactlySame(const Vec3 &v) const
Vec3 GetVec(unsigned short int i) const
void Manipulate(Mat3x3 &m) const
Mat3x3 & operator=(const Mat3x3 &m)
Vec3 MulTV(const Vec3 &v) const
doublereal * pGetMat(void)
Vec3 & operator*=(const doublereal &d)
Vec3(const Vec3_Manip &Manip, const Mat3x3 &m)
Mat3x3(const Mat3x3_Manip &Manip, const Vec3 &v)
Vec3 MultRV(const Vec3 &v, const Mat3x3 &R)
std::ostream & operator<<(std::ostream &out, const Vec3 &v)
Mat3x3 & operator/=(const doublereal &d)
Mat3x3 EulerAngles313_2MatR(const Vec3 &v)
void PutVec(unsigned short int i, const Vec3 &v)
doublereal Trace(void) const
void MatR2EulerParams(const Mat3x3 &R, doublereal &e0, Vec3 &e)
doublereal dDet(void) const
Vec3 operator*(const doublereal &d) const
Vec3 operator-(const Vec3 &v)
Mat3x3 MulTVCross(const Vec3 &v) const
void Manipulate(Mat3x3 &m, const Vec3 &g) const
Mat3x3(const Vec3 &v1, const Vec3 &v2, const Vec3 &v3)
Mat3x3 EulerAngles2MatR(const Vec3 &v)
virtual ~Vec3_Manip(void)
bool IsExactlySame(const Mat3x3 &m) const
virtual void Manipulate(Mat3x3 &m) const
friend Vec3 operator-(const Vec3 &v)
const MatCrossCross_Manip MatCrossCross
void PutTo(doublereal *pd) const
Vec3 GetRow(unsigned short int i) const
const doublereal & dGet(unsigned short int iRow) const
Mat3x3 & operator+=(const Mat3x3 &m)
Vec3 MatR2EulerAngles123(const Mat3x3 &R)
Vec3 Solve(const Vec3 &v) const
Mat3x3(const doublereal &m11, const doublereal &m21, const doublereal &m31, const doublereal &m12, const doublereal &m22, const doublereal &m32, const doublereal &m13, const doublereal &m23, const doublereal &m33)
const Mat3x3DEye_Manip Mat3x3DEye
void PutTo(doublereal *pd, integer iNRows) const
bool EigSym(Vec3 &EigenValues) const
Mat3x3 MultRM(const Mat3x3 &m, const Mat3x3 &R)
Mat3x3 EulerAngles123_2MatR(const Vec3 &v)
#define ASSERT(expression)
Mat3x3 Tens(const Vec3 &v) const
Vec3 MatR2gparam(const Mat3x3 &R)
Vec3(const doublereal &v1, const doublereal &v2, const doublereal &v3)
GradientExpression< UnaryExpr< FuncSqrt, Expr > > sqrt(const GradientExpression< Expr > &u)
Mat3x3 MulTM(const Mat3x3 &m) const
doublereal & operator()(unsigned short int iRow, unsigned short int iCol)
void SubFrom(doublereal *pd) const
bool IsSymmetric(const doublereal &dTol) const
virtual void Manipulate(Mat3x3 &m, const Vec3 &v) const
Vec3 & operator+=(const Vec3 &v)
void AddTo(doublereal *pd) const
Vec3 LDLSolve(const Vec3 &v) const
bool IsSymmetric(void) const
void GetFrom(const doublereal *pd, integer iSize)
Mat3x3 MulVCross(const Vec3 &v) const
Mat3x3 Transpose(void) const
void AddTo(doublereal *pd, integer iNRows) const
const doublereal * pGetMat(void) const
Mat3x3 operator/(const doublereal &d) const
Vec3 operator/(const doublereal &d) const
void Manipulate(Mat3x3 &m, const doublereal d) const
Mat3x3 EulerAngles321_2MatR(const Vec3 &v)
Vec3 Unwrap(const Vec3 &vPrev, const Vec3 &v)
const doublereal * pGetVec(void) const
void Manipulate(Mat3x3 &m, const Vec3 &g) const
static const doublereal a
const Mat3x3 & Symm(const Mat3x3 &m)
Vec3 MatR2EulerAngles321(const Mat3x3 &R)
Mat3x3 MatR2vec(unsigned short int ia, const Vec3 &va, unsigned short int ib, const Vec3 &vb)
Mat3x3 MulMT(const Mat3x3 &m) const
void Put(unsigned short int iRow, unsigned short int iCol, const doublereal &dCoef)
Mat3x3 operator*(const doublereal &d) const
Mat3x3 MultMRt(const Mat3x3 &m, const Mat3x3 &R)
const doublereal & mb_zero< doublereal >(void)
doublereal * pGetVec(void)
Mat3x3(const Mat3x3_Manip &Manip, const Vec3 &v1, const Vec3 &v2)
virtual void Manipulate(Mat3x3 &m, const doublereal d) const
std::ostream & Write(std::ostream &out, const char *sFill=" ", const char *sFill2=NULL) const
doublereal & operator[](unsigned short int iRow)
doublereal mb_deye< doublereal >(const doublereal d)
void Manipulate(Mat3x3 &m, const Vec3 &v1, const Vec3 &v2) const
const Mat3x3Diag_Manip Mat3x3Diag
void GetFrom(const doublereal *pd)
Mat3x3(const doublereal *pd, integer iSize)
Mat3x3(const doublereal &d, const Vec3 &v)
Vec3 MatR2EulerAngles313(const Mat3x3 &R)
void Put(unsigned short int iRow, const doublereal &dCoef)
Vec3 operator+(const Vec3 &v) const
Vec3 & operator=(const Vec3 &v)
void Manipulate(Vec3 &v, const Mat3x3 &m) const
Mat3x3(const Mat3x3_Manip &Manip, const doublereal d)
bool IsSame(const Mat3x3 &m, const doublereal &dTol) const
doublereal & operator()(unsigned short int iRow)