58 v[0] =
Vec3(d1, d2, d3);
59 v[1] =
Vec3(d4, d5, d6);
158 return Vec6(
v[0]*d,
v[1]*d);
163 return Vec6(
v[0]/d,
v[1]/d);
167 return v[0]*(x.
v[0]) +
v[1]*(x.
v[1]);
184 if (i < 1 || i > 6) {
187 unsigned short int j = (i - 1)/3;
188 return v[j].
dGet(i - 3*j);
193 unsigned short int j = (i - 1)/3;
194 return v[j](i - 3*j);
199 unsigned short int j = (i - 1)/3;
200 return v[j](i - 3*j);
205 if (i < 1 || i > 6) {
208 unsigned short int j = (i-1)/3;
224 std::ostream&
Write(std::ostream& out,
const char* sFill =
" ")
const;
231 extern std::ostream&
Write(std::ostream& out,
const Vec6& v,
const char* sFill =
" ");
248 m[0][0] = min.
m[0][0];
249 m[1][0] = min.
m[1][0];
250 m[0][1] = min.
m[0][1];
251 m[1][1] = min.
m[1][1];
290 m[0][0] =
Mat3x3(d11, d21, d31, d12, d22, d32, d13, d23, d33);
291 m[0][1] =
Mat3x3(d14, d24, d34, d15, d25, d35, d16, d26, d36);
292 m[1][0] =
Mat3x3(d41, d51, d61, d42, d52, d62, d43, d53, d63);
293 m[1][1] =
Mat3x3(d44, d54, d64, d45, d55, d65, d46, d56, d66);
298 m[0][0] =
Mat3x3(*(pd+0),*(pd+1),*(pd+2),
299 *(pd+i+0),*(pd+i+1),*(pd+i+2),
300 *(pd+2*i+0),*(pd+2*i+1),*(pd+2*i+2));
301 m[0][1] =
Mat3x3(*(pd+3*i+0),*(pd+3*i+1),*(pd+3*i+2),
302 *(pd+4*i+0),*(pd+4*i+1),*(pd+4*i+2),
303 *(pd+5*i+0),*(pd+5*i+1),*(pd+5*i+2));
304 m[1][0] =
Mat3x3(*(pd+3),*(pd+4),*(pd+5),
305 *(pd+i+3),*(pd+i+4),*(pd+i+5),
306 *(pd+2*i+3),*(pd+2*i+4),*(pd+2*i+5));
307 m[1][1] =
Mat3x3(*(pd+3*i+3),*(pd+3*i+4),*(pd+3*i+5),
308 *(pd+4*i+3),*(pd+4*i+4),*(pd+4*i+5),
309 *(pd+5*i+3),*(pd+5*i+4),*(pd+5*i+5));
337 ASSERT((i == 0 || i == 1) && (j == 0 || j == 1));
358 unsigned short int j)
const {
359 ASSERT((i == 0 || i == 1) && (j == 0 || j == 1));
380 void PutMat(
unsigned short int i,
unsigned short int j,
const Mat3x3& x) {
381 ASSERT((i == 0 || i == 1) && (j == 0 || j == 1));
402 void AddMat(
unsigned short int i,
unsigned short int j,
const Mat3x3& x) {
403 ASSERT((i == 0 || i == 1) && (j == 0 || j == 1));
424 void SubMat(
unsigned short int i,
unsigned short int j,
const Mat3x3& x) {
425 ASSERT((i == 0 || i == 1) && (j == 0 || j == 1));
433 unsigned short int j)
const {
434 ASSERT((i == 0 || i == 1) && (j == 0 || j == 1));
473 return Mat6x6(
m[0][0]*d,
m[1][0]*d,
m[0][1]*d,
m[1][1]*d);
478 return Mat6x6(
m[0][0]/d,
m[1][0]/d,
m[0][1]/d,
m[1][1]/d);
539 ASSERT((ir > 0 && ir < 7) && (ic > 0 && ic < 7));
540 if (ir < 1 || ir > 6) {
543 if (ic < 1 || ic > 6) {
546 unsigned short int jr = (ir-1)/3;
547 unsigned short int jc = (ic-1)/3;
548 return m[jr][jc].
dGet(ir-3*jr, ic-3*jc);
552 ASSERT((ir > 0 && ir < 7) && (ic > 0 && ic < 7));
553 unsigned short int jr = (ir - 1)/3;
554 unsigned short int jc = (ic - 1)/3;
555 return m[jr][jc](ir - 3*jr, ic - 3*jc);
559 ASSERT((ir > 0 && ir < 7) && (ic > 0 && ic < 7));
560 unsigned short int jr = (ir - 1)/3;
561 unsigned short int jc = (ic - 1)/3;
562 return m[jr][jc](ir - 3*jr, ic - 3*jc);
565 void Put(
unsigned short int ir,
unsigned short int ic,
const doublereal& d) {
566 ASSERT((ir > 0 && ir < 7) && (ic > 0 && ic < 7));
567 if (ir < 1 || ir > 6) {
570 if (ic < 1 || ic > 6) {
573 unsigned short int jr = (ir-1)/3;
574 unsigned short int jc = (ic-1)/3;
575 m[jr][jc].
Put(ir-3*jr, ic-3*jc, d);
581 std::ostream&
Write(std::ostream& out,
582 const char* sFill =
" ",
583 const char* sFill2 = NULL)
const;
587 extern std::ostream&
Write(std::ostream& out,
589 const char* sFill =
" ",
590 const char* sFill2 = NULL);
void Put(unsigned short int ir, unsigned short int ic, const doublereal &d)
void PutTo(doublereal *pd) const
const Mat3x3 & GetMat21(void) const
const doublereal * pGetVec(unsigned short int i) const
const doublereal & operator()(unsigned short int i) const
const Vec6 & mb_zero< Vec6 >(void)
Mat6x6 & operator+=(const Mat6x6 &x)
Mat6x6 operator/(const doublereal &d) const
const doublereal & dGet(unsigned short int iRow, unsigned short int iCol) const
Mat6x6 & operator=(const Mat6x6 &x)
#define MBDYN_EXCEPT_ARGS
const Vec3 & GetVec2(void) const
const Mat3x3 & GetMat11(void) const
doublereal Dot(const Vec3 &v) const
Mat6x6(const doublereal *pd, unsigned int i=6)
Vec6 & operator-=(const Vec6 &x)
const doublereal * pGetMat(unsigned short int i, unsigned short int j) const
void SubMat21(const Mat3x3 &x)
Vec6(const Vec3 &v1, const Vec3 &v2)
Vec6 operator*(const doublereal &d) const
Mat6x6(const doublereal &d11, const doublereal &d21, const doublereal &d31, const doublereal &d41, const doublereal &d51, const doublereal &d61, const doublereal &d12, const doublereal &d22, const doublereal &d32, const doublereal &d42, const doublereal &d52, const doublereal &d62, const doublereal &d13, const doublereal &d23, const doublereal &d33, const doublereal &d43, const doublereal &d53, const doublereal &d63, const doublereal &d14, const doublereal &d24, const doublereal &d34, const doublereal &d44, const doublereal &d54, const doublereal &d64, const doublereal &d15, const doublereal &d25, const doublereal &d35, const doublereal &d45, const doublereal &d55, const doublereal &d65, const doublereal &d16, const doublereal &d26, const doublereal &d36, const doublereal &d46, const doublereal &d56, const doublereal &d66)
Mat3x3 mb_deye< Mat3x3 >(const doublereal d)
void AddMat12(const Mat3x3 &x)
void PutMat22(const Mat3x3 &x)
const Vec3 & GetVec(unsigned short int i) const
const Mat3x3 Zero3x3(0., 0., 0., 0., 0., 0., 0., 0., 0.)
void AddMat21(const Mat3x3 &x)
Mat6x6(const Mat3x3 &m11, const Mat3x3 &m21, const Mat3x3 &m12, const Mat3x3 &m22)
Vec6 operator+(const Vec6 &x) const
Vec6 & operator+=(const Vec6 &x)
Vec6(const doublereal *pd)
void SubMat11(const Mat3x3 &x)
const Vec3 & GetVec1(void) const
void PutMat11(const Mat3x3 &x)
void SubMat12(const Mat3x3 &x)
Vec6(const doublereal &d1, const doublereal &d2, const doublereal &d3, const doublereal &d4, const doublereal &d5, const doublereal &d6)
void SubMat22(const Mat3x3 &x)
Mat6x6 MultVCrossTMat(const Mat6x6 &m, const Vec3 &v)
void AddMat22(const Mat3x3 &x)
void SubMat(unsigned short int i, unsigned short int j, const Mat3x3 &x)
Mat6x6 MultVCrossMat(const Mat6x6 &m, const Vec3 &v)
void PutTo(doublereal *pd) const
const doublereal & dGet(unsigned short int ir, unsigned short int ic) const
const doublereal & dGet(unsigned short int iRow) const
Vec6 & operator*=(const doublereal &d)
Mat6x6 operator*(const doublereal &d) const
std::ostream & Write(std::ostream &out, const char *sFill=" ", const char *sFill2=NULL) const
Mat6x6 MultMatVCross(const Mat6x6 &m, const Vec3 &v)
doublereal Norm(void) const
Mat6x6 & operator-=(const Mat6x6 &x)
Mat6x6 & operator/=(const doublereal &d)
void PutMat12(const Mat3x3 &x)
Vec6 operator-(const Vec6 &v)
#define ASSERT(expression)
GradientExpression< UnaryExpr< FuncSqrt, Expr > > sqrt(const GradientExpression< Expr > &u)
Mat6x6 & operator*=(const doublereal &d)
Mat6x6 MultMRt(const Mat6x6 &m, const Mat3x3 &R)
Vec6 & operator/=(const doublereal &d)
const Mat3x3 & GetMat22(void) const
Mat3x3 GetMat(unsigned short int i, unsigned short int j)
Vec6 & operator=(const Vec6 &x)
const Mat6x6 & mb_zero< Mat6x6 >(void)
std::ostream & operator<<(std::ostream &out, const Vec6 &m)
static std::stack< cleanup * > c
const doublereal * pGetMat(void) const
const doublereal & operator()(unsigned short int ir, unsigned short int ic) const
bool IsExactlySame(const Mat6x6 &x) const
doublereal Dot(void) const
Mat6x6 MultRMRt(const Mat6x6 &m, const Mat3x3 &R)
Vec6 operator-(const Vec6 &x) const
const doublereal * pGetVec(void) const
void PutMat(unsigned short int i, unsigned short int j, const Mat3x3 &x)
const Mat3x3 & GetMat12(void) const
Mat6x6 operator-(const Mat6x6 &x) const
void AddMat(unsigned short int i, unsigned short int j, const Mat3x3 &x)
std::ostream & Write(std::ostream &out, const char *sFill=" ") const
static const doublereal d13
doublereal Dot(const Vec6 &x) const
Vec3 GetVec(unsigned short int i)
void AddMat11(const Mat3x3 &x)
bool IsSame(const Mat6x6 &x, const doublereal &dTol) const
std::ostream & Write(std::ostream &out, const Vec6 &v, const char *sFill=" ")
void Put(unsigned short int iRow, unsigned short int iCol, const doublereal &dCoef)
Vec6 operator+(const Vec6 &v)
Mat6x6(const Mat6x6 &min)
Vec6 MultRV(const Vec6 &v, const Mat3x3 &R)
Mat6x6 mb_deye< Mat6x6 >(const doublereal d)
const doublereal & dGet(unsigned short int i) const
Mat6x6 MultRM(const Mat6x6 &m, const Mat3x3 &R)
void Put(unsigned short int iRow, const doublereal &dCoef)
Mat6x6 MultMatVCrossT(const Mat6x6 &m, const Vec3 &v)
Vec6 operator/(const doublereal &d) const
Mat6x6 operator+(const Mat6x6 &x) const
void PutMat21(const Mat3x3 &x)
const Mat3x3 & GetMat(unsigned short int i, unsigned short int j) const
void Put(unsigned short int i, const doublereal &d)