MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
matvec6.h
Go to the documentation of this file.
1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/libraries/libmbmath/matvec6.h,v 1.33 2017/01/12 14:43:54 masarati Exp $ */
2 /*
3  * MBDyn (C) is a multibody analysis code.
4  * http://www.mbdyn.org
5  *
6  * Copyright (C) 1996-2017
7  *
8  * Pierangelo Masarati <masarati@aero.polimi.it>
9  * Paolo Mantegazza <mantegazza@aero.polimi.it>
10  *
11  * Dipartimento di Ingegneria Aerospaziale - Politecnico di Milano
12  * via La Masa, 34 - 20156 Milano, Italy
13  * http://www.aero.polimi.it
14  *
15  * Changing this copyright notice is forbidden.
16  *
17  * This program is free software; you can redistribute it and/or modify
18  * it under the terms of the GNU General Public License as published by
19  * the Free Software Foundation (version 2 of the License).
20  *
21  *
22  * This program is distributed in the hope that it will be useful,
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25  * GNU General Public License for more details.
26  *
27  * You should have received a copy of the GNU General Public License
28  * along with this program; if not, write to the Free Software
29  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30  */
31 
32 #ifndef MATVEC6_H
33 #define MATVEC6_H
34 
35 #include "matvec3.h"
36 
37 class Vec6 {
38  protected:
39  Vec3 v[2];
40 
41  public:
42  Vec6(void) {
43  NO_OP;
44  };
45 
46  ~Vec6(void) {
47  NO_OP;
48  };
49 
50  Vec6(const Vec6& vin) {
51  v[0] = vin.v[0];
52  v[1] = vin.v[1];
53  };
54 
55  Vec6(const doublereal& d1, const doublereal& d2, const doublereal& d3,
56  const doublereal& d4, const doublereal& d5, const doublereal& d6)
57  {
58  v[0] = Vec3(d1, d2, d3);
59  v[1] = Vec3(d4, d5, d6);
60  };
61 
62  Vec6(const Vec3& v1, const Vec3& v2) {
63  v[0] = v1;
64  v[1] = v2;
65  };
66 
67  Vec6(const doublereal *pd) {
68  v[0] = Vec3(pd);
69  v[1] = Vec3(&pd[3]);
70  };
71 
72  inline const Vec3& GetVec1(void) const {
73  return v[0];
74  };
75 
76  inline const Vec3& GetVec2(void) const {
77  return v[1];
78  };
79 
80  inline const Vec3& GetVec(unsigned short int i) const {
81  ASSERT(i == 0 || i == 1);
82  return v[i];
83  };
84 
85  Vec3 GetVec1(void) {
86  return v[0];
87  };
88 
89  Vec3 GetVec2(void) {
90  return v[1];
91  };
92 
93  Vec3 GetVec(unsigned short int i) {
94  ASSERT(i == 0 || i == 1);
95  return v[i];
96  };
97 
98  inline const doublereal* pGetVec(unsigned short int i) const {
99  ASSERT(i == 0 || i == 1);
100  return v[i].pGetVec();
101  };
102 
103  inline Vec6& operator = (const Vec6& x) {
104  v[0] = x.GetVec1();
105  v[1] = x.GetVec2();
106  return *this;
107  };
108 
109  inline Vec6& operator += (const Vec6& x) {
110  v[0] += x.GetVec1();
111  v[1] += x.GetVec2();
112  return *this;
113  };
114 
115  inline Vec6& operator -= (const Vec6& x) {
116  v[0] -= x.GetVec1();
117  v[1] -= x.GetVec2();
118  return *this;
119  };
120 
122  if (d == 1.) {
123  return *this; /* No operations */
124  }
125  if (d == 0.) {
126  v[0].Reset(); /* Reset vector */
127  v[1].Reset();
128  return *this;
129  }
130  /* else */
131  v[0] *= d; /* Multiply */
132  v[1] *= d;
133  return *this;
134  };
135 
137  if (d == 1.) {
138  return *this; /* No operations */
139  }
140  if (d == 0.) {
141  throw ErrDivideByZero(MBDYN_EXCEPT_ARGS); /* error */
142  }
143  /* else */
144  v[0] /= d; /* divide */
145  v[1] /= d;
146  return *this;
147  };
148 
149  inline Vec6 operator + (const Vec6& x) const {
150  return Vec6(v[0] + x.GetVec1(), v[1] + x.GetVec2());
151  };
152 
153  inline Vec6 operator - (const Vec6& x) const {
154  return Vec6(v[0] - x.GetVec1(), v[1] - x.GetVec2());
155  };
156 
157  inline Vec6 operator * (const doublereal& d) const {
158  return Vec6(v[0]*d, v[1]*d);
159  };
160 
161  inline Vec6 operator / (const doublereal& d) const {
162  ASSERT(d != 0.);
163  return Vec6(v[0]/d, v[1]/d);
164  };
165 
166  inline doublereal operator * (const Vec6& x) const {
167  return v[0]*(x.v[0]) + v[1]*(x.v[1]);
168  };
169 
170  inline doublereal Dot(const Vec6& x) const {
171  return v[0].Dot(x.GetVec1()) + v[1].Dot(x.GetVec2());
172  };
173 
174  inline doublereal Dot(void) const {
175  return v[0].Dot() + v[1].Dot();
176  };
177 
178  inline doublereal Norm(void) const {
179  return sqrt(v[0].Dot() + v[1].Dot());
180  };
181 
182  inline const doublereal& dGet(unsigned short int i) const {
183  ASSERT(i > 0 && i < 7);
184  if (i < 1 || i > 6) {
186  }
187  unsigned short int j = (i - 1)/3;
188  return v[j].dGet(i - 3*j);
189  };
190 
191  inline const doublereal& operator ()(unsigned short int i) const {
192  ASSERT(i > 0 && i < 7);
193  unsigned short int j = (i - 1)/3;
194  return v[j](i - 3*j);
195  };
196 
197  inline doublereal& operator ()(unsigned short int i) {
198  ASSERT(i > 0 && i < 7);
199  unsigned short int j = (i - 1)/3;
200  return v[j](i - 3*j);
201  };
202 
203  inline void Put(unsigned short int i, const doublereal& d) {
204  ASSERT(i > 0 && i < 7);
205  if (i < 1 || i > 6) {
207  }
208  unsigned short int j = (i-1)/3;
209  v[j].Put(i-3*j, d);
210  };
211 
212  /*
213  Scrive se stesso sull'array pd.
214  Si assume che l'array pd sia lungo almeno 6
215  */
216  void PutTo(doublereal* pd) const {
217  ASSERT(pd != NULL);
218  v[0].PutTo(pd);
219  v[1].PutTo(&pd[3]);
220  };
221 
222  void Reset(void);
223 
224  std::ostream& Write(std::ostream& out, const char* sFill = " ") const;
225 };
226 
227 
228 extern Vec6 operator + (const Vec6& v);
229 extern Vec6 operator - (const Vec6& v);
230 extern std::ostream& operator << (std::ostream& out, const Vec6& m);
231 extern std::ostream& Write(std::ostream& out, const Vec6& v, const char* sFill = " ");
232 
233 
234 class Mat6x6 {
235  protected:
236  Mat3x3 m[2][2];
237 
238  public:
239  Mat6x6(void) {
240  NO_OP;
241  };
242 
243  ~Mat6x6(void) {
244  NO_OP;
245  };
246 
247  Mat6x6(const Mat6x6& min) {
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];
252  };
253 
254  Mat6x6(const doublereal& d11,
255  const doublereal& d21,
256  const doublereal& d31,
257  const doublereal& d41,
258  const doublereal& d51,
259  const doublereal& d61,
260  const doublereal& d12,
261  const doublereal& d22,
262  const doublereal& d32,
263  const doublereal& d42,
264  const doublereal& d52,
265  const doublereal& d62,
266  const doublereal& d13,
267  const doublereal& d23,
268  const doublereal& d33,
269  const doublereal& d43,
270  const doublereal& d53,
271  const doublereal& d63,
272  const doublereal& d14,
273  const doublereal& d24,
274  const doublereal& d34,
275  const doublereal& d44,
276  const doublereal& d54,
277  const doublereal& d64,
278  const doublereal& d15,
279  const doublereal& d25,
280  const doublereal& d35,
281  const doublereal& d45,
282  const doublereal& d55,
283  const doublereal& d65,
284  const doublereal& d16,
285  const doublereal& d26,
286  const doublereal& d36,
287  const doublereal& d46,
288  const doublereal& d56,
289  const doublereal& d66) {
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);
294  };
295 
296  Mat6x6(const doublereal* pd, unsigned int i = 6) {
297  ASSERT(i >= 6);
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));
310  };
311 
312  Mat6x6(const Mat3x3& m11, const Mat3x3& m21,
313  const Mat3x3& m12, const Mat3x3& m22) {
314  m[0][0] = m11;
315  m[1][0] = m21;
316  m[0][1] = m12;
317  m[1][1] = m22;
318  };
319 
320  Mat3x3 GetMat11(void) {
321  return m[0][0];
322  };
323 
324  Mat3x3 GetMat21(void) {
325  return m[1][0];
326  };
327 
328  Mat3x3 GetMat12(void) {
329  return m[0][1];
330  };
331 
332  Mat3x3 GetMat22(void) {
333  return m[1][1];
334  };
335 
336  Mat3x3 GetMat(unsigned short int i, unsigned short int j) {
337  ASSERT((i == 0 || i == 1) && (j == 0 || j == 1));
338  return m[i][j];
339  };
340 
341  inline const Mat3x3& GetMat11(void) const {
342  return m[0][0];
343  };
344 
345  inline const Mat3x3& GetMat21(void) const {
346  return m[1][0];
347  };
348 
349  inline const Mat3x3& GetMat12(void) const {
350  return m[0][1];
351  };
352 
353  inline const Mat3x3& GetMat22(void) const {
354  return m[1][1];
355  };
356 
357  inline const Mat3x3& GetMat(unsigned short int i,
358  unsigned short int j) const {
359  ASSERT((i == 0 || i == 1) && (j == 0 || j == 1));
360  return m[i][j];
361  };
362 
363 
364  void PutMat11(const Mat3x3& x) {
365  m[0][0] = x;
366  };
367 
368  void PutMat21(const Mat3x3& x) {
369  m[1][0] = x;
370  };
371 
372  void PutMat12(const Mat3x3& x) {
373  m[0][1] = x;
374  };
375 
376  void PutMat22(const Mat3x3& x) {
377  m[1][1] = x;
378  };
379 
380  void PutMat(unsigned short int i, unsigned short int j, const Mat3x3& x) {
381  ASSERT((i == 0 || i == 1) && (j == 0 || j == 1));
382  m[i][j] = x;
383  };
384 
385 
386  void AddMat11(const Mat3x3& x) {
387  m[0][0] += x;
388  };
389 
390  void AddMat21(const Mat3x3& x) {
391  m[1][0] += x;
392  };
393 
394  void AddMat12(const Mat3x3& x) {
395  m[0][1] += x;
396  };
397 
398  void AddMat22(const Mat3x3& x) {
399  m[1][1] += x;
400  };
401 
402  void AddMat(unsigned short int i, unsigned short int j, const Mat3x3& x) {
403  ASSERT((i == 0 || i == 1) && (j == 0 || j == 1));
404  m[i][j] += x;
405  };
406 
407 
408  void SubMat11(const Mat3x3& x) {
409  m[0][0] -= x;
410  };
411 
412  void SubMat21(const Mat3x3& x) {
413  m[1][0] -= x;
414  };
415 
416  void SubMat12(const Mat3x3& x) {
417  m[0][1] -= x;
418  };
419 
420  void SubMat22(const Mat3x3& x) {
421  m[1][1] -= x;
422  };
423 
424  void SubMat(unsigned short int i, unsigned short int j, const Mat3x3& x) {
425  ASSERT((i == 0 || i == 1) && (j == 0 || j == 1));
426  m[i][j] -= x;
427  };
428 
429 
430 
431 
432  inline const doublereal* pGetMat(unsigned short int i,
433  unsigned short int j) const {
434  ASSERT((i == 0 || i == 1) && (j == 0 || j == 1));
435  return m[i][j].pGetMat();
436  };
437 
438  inline Mat6x6& operator = (const Mat6x6& x) {
439  m[0][0] = x.GetMat11();
440  m[1][0] = x.GetMat21();
441  m[0][1] = x.GetMat12();
442  m[1][1] = x.GetMat22();
443  return *this;
444  };
445 
446  inline Mat6x6& operator += (const Mat6x6& x) {
447  m[0][0] += x.GetMat11();
448  m[1][0] += x.GetMat21();
449  m[0][1] += x.GetMat12();
450  m[1][1] += x.GetMat22();
451  return *this;
452  };
453 
454  inline Mat6x6& operator -= (const Mat6x6& x) {
455  m[0][0] -= x.GetMat11();
456  m[1][0] -= x.GetMat21();
457  m[0][1] -= x.GetMat12();
458  m[1][1] -= x.GetMat22();
459  return *this;
460  };
461 
462  Mat6x6 operator + (const Mat6x6& x) const {
463  return Mat6x6(m[0][0]+x.GetMat11(), m[1][0]+x.GetMat21(),
464  m[0][1]+x.GetMat12(), m[1][1]+x.GetMat22());
465  };
466 
467  Mat6x6 operator - (const Mat6x6& x) const {
468  return Mat6x6(m[0][0]-x.GetMat11(), m[1][0]-x.GetMat21(),
469  m[0][1]-x.GetMat12(), m[1][1]-x.GetMat22());
470  };
471 
472  Mat6x6 operator * (const doublereal& d) const {
473  return Mat6x6(m[0][0]*d, m[1][0]*d, m[0][1]*d, m[1][1]*d);
474  };
475 
476  Mat6x6 operator / (const doublereal& d) const {
477  ASSERT(d != 0.);
478  return Mat6x6(m[0][0]/d, m[1][0]/d, m[0][1]/d, m[1][1]/d);
479  };
480 
482  m[0][0] *= d;
483  m[1][0] *= d;
484  m[0][1] *= d;
485  m[1][1] *= d;
486  return *this;
487  };
488 
490  ASSERT(d != 0.);
491  m[0][0] /= d;
492  m[1][0] /= d;
493  m[0][1] /= d;
494  m[1][1] /= d;
495  return *this;
496  };
497 
498  Vec6 operator * (const Vec6& v) const {
499  return Vec6(m[0][0]*v.GetVec1()+m[0][1]*v.GetVec2(),
500  m[1][0]*v.GetVec1()+m[1][1]*v.GetVec2());
501  };
502 
503  Mat6x6 operator * (const Mat6x6& x) const {
504  return Mat6x6(m[0][0]*x.GetMat11()+m[0][1]*x.GetMat21(),
505  m[1][0]*x.GetMat11()+m[1][1]*x.GetMat21(),
506  m[0][0]*x.GetMat12()+m[0][1]*x.GetMat22(),
507  m[1][0]*x.GetMat12()+m[1][1]*x.GetMat22());
508  };
509 
510  bool IsNull(void) const {
511  return (m[0][0].IsNull()
512  && m[0][1].IsNull()
513  && m[1][0].IsNull()
514  && m[1][1].IsNull());
515  };
516 
517  bool IsExactlySame(const Mat6x6& x) const {
518  return (m[0][0].IsExactlySame(x.GetMat11())
519  && m[0][1].IsExactlySame(x.GetMat12())
520  && m[1][0].IsExactlySame(x.GetMat21())
521  && m[1][1].IsExactlySame(x.GetMat22()));
522  };
523 
524  bool IsSame(const Mat6x6& x, const doublereal& dTol) const {
525  return (m[0][0].IsSame(x.GetMat11(), dTol)
526  && m[0][1].IsSame(x.GetMat12(), dTol)
527  && m[1][0].IsSame(x.GetMat21(), dTol)
528  && m[1][1].IsSame(x.GetMat22(), dTol));
529  };
530 
532  return Mat6x6(m[0][0].Transpose(),
533  m[0][1].Transpose(),
534  m[1][0].Transpose(),
535  m[1][1].Transpose());
536  };
537 
538  const doublereal& dGet(unsigned short int ir, unsigned short int ic) const {
539  ASSERT((ir > 0 && ir < 7) && (ic > 0 && ic < 7));
540  if (ir < 1 || ir > 6) {
541  throw ErrRowIndexOutOfRange(ir, 1, 6, MBDYN_EXCEPT_ARGS);
542  }
543  if (ic < 1 || ic > 6) {
544  throw ErrColIndexOutOfRange(ic, 1, 6, MBDYN_EXCEPT_ARGS);
545  }
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);
549  };
550 
551  const doublereal& operator ()(unsigned short int ir, unsigned short int ic) const {
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);
556  };
557 
558  doublereal& operator ()(unsigned short int ir, unsigned short int ic) {
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);
563  };
564 
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) {
568  throw ErrRowIndexOutOfRange(ir, 1, 6, MBDYN_EXCEPT_ARGS);
569  }
570  if (ic < 1 || ic > 6) {
571  throw ErrColIndexOutOfRange(ic, 1, 6, MBDYN_EXCEPT_ARGS);
572  }
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);
576  };
577 
578  void Reset(void);
579 
580  /* Scrittura su ostream della matrice */
581  std::ostream& Write(std::ostream& out,
582  const char* sFill = " ",
583  const char* sFill2 = NULL) const;
584 };
585 
586 extern std::ostream& operator << (std::ostream& out, const Mat6x6& m);
587 extern std::ostream& Write(std::ostream& out,
588  const Mat6x6& m,
589  const char* sFill = " ",
590  const char* sFill2 = NULL);
591 
592 
593 extern Vec6 MultRV(const Vec6& v, const Mat3x3& R);
594 
595 extern Mat6x6 MultRM(const Mat6x6& m, const Mat3x3& R);
596 extern Mat6x6 MultMRt(const Mat6x6& m, const Mat3x3& R);
597 extern Mat6x6 MultRMRt(const Mat6x6& m, const Mat3x3& R);
598 extern Mat6x6 MultRMRt(const Mat6x6& m, const Mat3x3& R, const doublereal& c);
599 
600 
601 /* esegue l'operazione:
602  * [I 0] [ ]
603  * [ ] [ m ]
604  * [vx I] [ ] */
605 extern Mat6x6 MultVCrossMat(const Mat6x6& m, const Vec3& v);
606 
607 /* esegue l'operazione:
608  * [I vxT] [ ]
609  * [ ] [ m ]
610  * [0 I] [ ] */
611 extern Mat6x6 MultVCrossTMat(const Mat6x6& m, const Vec3& v);
612 
613 /* esegue l'operazione:
614  * [ ] [I vx]
615  * [ m ] [ ]
616  * [ ] [0 I] */
617 extern Mat6x6 MultMatVCross(const Mat6x6& m, const Vec3& v);
618 
619 /* esegue l'operazione:
620  * [ ] [I 0]
621  * [ m ] [ ]
622  * [ ] [vx I] */
623 extern Mat6x6 MultMatVCrossT(const Mat6x6& m, const Vec3& v);
624 
625 
626 extern const Vec6 Zero6;
627 extern const Mat6x6 Zero6x6;
628 extern const Mat6x6 Eye6;
629 
630 template <>
631 inline const Vec6& mb_zero<Vec6>(void)
632 {
633  return Zero6;
634 }
635 
636 template <>
637 inline const Mat6x6& mb_zero<Mat6x6>(void)
638 {
639  return Zero6x6;
640 }
641 
642 template <>
644 {
645  // TODO: optimize
647 }
648 
649 template <>
650 inline Mat6x6& mb_deye<Mat6x6>(Mat6x6& out, const doublereal d)
651 {
652  out.PutMat11(mb_deye<Mat3x3>(d));
653  out.PutMat12(Zero3x3);
654  out.PutMat21(Zero3x3);
655  out.PutMat22(mb_deye<Mat3x3>(d));
656 
657  return out;
658 }
659 
660 #endif // MATVEC6_H
void Put(unsigned short int ir, unsigned short int ic, const doublereal &d)
Definition: matvec6.h:565
Mat6x6 Transpose(void)
Definition: matvec6.h:531
void PutTo(doublereal *pd) const
Definition: matvec6.h:216
const Mat3x3 & GetMat21(void) const
Definition: matvec6.h:345
const doublereal * pGetVec(unsigned short int i) const
Definition: matvec6.h:98
const doublereal & operator()(unsigned short int i) const
Definition: matvec6.h:191
const Vec6 & mb_zero< Vec6 >(void)
Definition: matvec6.h:631
Mat6x6 & operator+=(const Mat6x6 &x)
Definition: matvec6.h:446
Mat6x6 operator/(const doublereal &d) const
Definition: matvec6.h:476
const doublereal & dGet(unsigned short int iRow, unsigned short int iCol) const
Definition: matvec3.h:770
Mat6x6 & operator=(const Mat6x6 &x)
Definition: matvec6.h:438
~Vec6(void)
Definition: matvec6.h:46
Mat3x3 GetMat12(void)
Definition: matvec6.h:328
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
Definition: matvec3.h:98
const Vec3 & GetVec2(void) const
Definition: matvec6.h:76
const Mat3x3 & GetMat11(void) const
Definition: matvec6.h:341
doublereal Dot(const Vec3 &v) const
Definition: matvec3.h:243
Vec6(void)
Definition: matvec6.h:42
Mat6x6(const doublereal *pd, unsigned int i=6)
Definition: matvec6.h:296
Vec6 & operator-=(const Vec6 &x)
Definition: matvec6.h:115
const doublereal * pGetMat(unsigned short int i, unsigned short int j) const
Definition: matvec6.h:432
void SubMat21(const Mat3x3 &x)
Definition: matvec6.h:412
const Mat6x6 Eye6
Mat3x3 GetMat21(void)
Definition: matvec6.h:324
Vec6(const Vec3 &v1, const Vec3 &v2)
Definition: matvec6.h:62
Vec6 operator*(const doublereal &d) const
Definition: matvec6.h:157
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)
Definition: matvec6.h:254
void Reset(void)
Definition: matvec6.cc:66
Mat3x3 mb_deye< Mat3x3 >(const doublereal d)
Definition: matvec3.h:1584
#define NO_OP
Definition: myassert.h:74
Mat3x3 GetMat22(void)
Definition: matvec6.h:332
bool IsNull(void) const
Definition: matvec6.h:510
void AddMat12(const Mat3x3 &x)
Definition: matvec6.h:394
void PutMat22(const Mat3x3 &x)
Definition: matvec6.h:376
const Vec3 & GetVec(unsigned short int i) const
Definition: matvec6.h:80
Vec3 GetVec2(void)
Definition: matvec6.h:89
Mat3x3 GetMat11(void)
Definition: matvec6.h:320
const Mat3x3 Zero3x3(0., 0., 0., 0., 0., 0., 0., 0., 0.)
void AddMat21(const Mat3x3 &x)
Definition: matvec6.h:390
Mat6x6(const Mat3x3 &m11, const Mat3x3 &m21, const Mat3x3 &m12, const Mat3x3 &m22)
Definition: matvec6.h:312
Vec6 operator+(const Vec6 &x) const
Definition: matvec6.h:149
Vec6 & operator+=(const Vec6 &x)
Definition: matvec6.h:109
Vec6(const doublereal *pd)
Definition: matvec6.h:67
Definition: matvec6.h:37
void SubMat11(const Mat3x3 &x)
Definition: matvec6.h:408
Vec6(const Vec6 &vin)
Definition: matvec6.h:50
const Vec3 & GetVec1(void) const
Definition: matvec6.h:72
void PutMat11(const Mat3x3 &x)
Definition: matvec6.h:364
Mat3x3 m[2][2]
Definition: matvec6.h:236
void SubMat12(const Mat3x3 &x)
Definition: matvec6.h:416
Vec6(const doublereal &d1, const doublereal &d2, const doublereal &d3, const doublereal &d4, const doublereal &d5, const doublereal &d6)
Definition: matvec6.h:55
void SubMat22(const Mat3x3 &x)
Definition: matvec6.h:420
Mat6x6 MultVCrossTMat(const Mat6x6 &m, const Vec3 &v)
Definition: matvec6.cc:241
void AddMat22(const Mat3x3 &x)
Definition: matvec6.h:398
void SubMat(unsigned short int i, unsigned short int j, const Mat3x3 &x)
Definition: matvec6.h:424
void Reset(void)
Definition: matvec3.cc:109
Mat6x6 MultVCrossMat(const Mat6x6 &m, const Vec3 &v)
Definition: matvec6.cc:228
void PutTo(doublereal *pd) const
Definition: matvec3.h:339
const doublereal & dGet(unsigned short int ir, unsigned short int ic) const
Definition: matvec6.h:538
const doublereal & dGet(unsigned short int iRow) const
Definition: matvec3.h:285
Vec6 & operator*=(const doublereal &d)
Definition: matvec6.h:121
Mat6x6 operator*(const doublereal &d) const
Definition: matvec6.h:472
const Mat6x6 Zero6x6
std::ostream & Write(std::ostream &out, const char *sFill=" ", const char *sFill2=NULL) const
Definition: matvec6.cc:112
Mat6x6 MultMatVCross(const Mat6x6 &m, const Vec3 &v)
Definition: matvec6.cc:254
doublereal Norm(void) const
Definition: matvec6.h:178
Mat6x6 & operator-=(const Mat6x6 &x)
Definition: matvec6.h:454
Mat6x6 & operator/=(const doublereal &d)
Definition: matvec6.h:489
void PutMat12(const Mat3x3 &x)
Definition: matvec6.h:372
Vec6 operator-(const Vec6 &v)
Definition: matvec6.cc:87
#define ASSERT(expression)
Definition: colamd.c:977
GradientExpression< UnaryExpr< FuncSqrt, Expr > > sqrt(const GradientExpression< Expr > &u)
Definition: gradient.h:2974
Mat6x6 & operator*=(const doublereal &d)
Definition: matvec6.h:481
Mat6x6 MultMRt(const Mat6x6 &m, const Mat3x3 &R)
Definition: matvec6.cc:203
Vec6 & operator/=(const doublereal &d)
Definition: matvec6.h:136
const Mat3x3 & GetMat22(void) const
Definition: matvec6.h:353
Mat3x3 GetMat(unsigned short int i, unsigned short int j)
Definition: matvec6.h:336
Vec6 & operator=(const Vec6 &x)
Definition: matvec6.h:103
const Mat6x6 & mb_zero< Mat6x6 >(void)
Definition: matvec6.h:637
std::ostream & operator<<(std::ostream &out, const Vec6 &m)
Definition: matvec6.cc:94
const Vec6 Zero6
static std::stack< cleanup * > c
Definition: cleanup.cc:59
void Reset(void)
Definition: matvec6.cc:73
const doublereal * pGetMat(void) const
Definition: matvec3.h:743
const doublereal & operator()(unsigned short int ir, unsigned short int ic) const
Definition: matvec6.h:551
Vec3 v[2]
Definition: matvec6.h:39
bool IsExactlySame(const Mat6x6 &x) const
Definition: matvec6.h:517
doublereal Dot(void) const
Definition: matvec6.h:174
Mat6x6(void)
Definition: matvec6.h:239
Mat6x6 MultRMRt(const Mat6x6 &m, const Mat3x3 &R)
Definition: matvec6.cc:210
Vec6 operator-(const Vec6 &x) const
Definition: matvec6.h:153
const doublereal * pGetVec(void) const
Definition: matvec3.h:192
void PutMat(unsigned short int i, unsigned short int j, const Mat3x3 &x)
Definition: matvec6.h:380
const Mat3x3 & GetMat12(void) const
Definition: matvec6.h:349
Mat6x6 operator-(const Mat6x6 &x) const
Definition: matvec6.h:467
void AddMat(unsigned short int i, unsigned short int j, const Mat3x3 &x)
Definition: matvec6.h:402
~Mat6x6(void)
Definition: matvec6.h:243
std::ostream & Write(std::ostream &out, const char *sFill=" ") const
Definition: matvec6.cc:54
static const doublereal d13
Definition: aeroelem.cc:1556
doublereal Dot(const Vec6 &x) const
Definition: matvec6.h:170
Vec3 GetVec(unsigned short int i)
Definition: matvec6.h:93
void AddMat11(const Mat3x3 &x)
Definition: matvec6.h:386
bool IsSame(const Mat6x6 &x, const doublereal &dTol) const
Definition: matvec6.h:524
std::ostream & Write(std::ostream &out, const Vec6 &v, const char *sFill=" ")
Definition: matvec6.cc:105
void Put(unsigned short int iRow, unsigned short int iCol, const doublereal &dCoef)
Definition: matvec3.h:758
Vec3 GetVec1(void)
Definition: matvec6.h:85
double doublereal
Definition: colamd.c:52
Vec6 operator+(const Vec6 &v)
Definition: matvec6.cc:81
Mat6x6(const Mat6x6 &min)
Definition: matvec6.h:247
Vec6 MultRV(const Vec6 &v, const Mat3x3 &R)
Definition: matvec6.cc:190
Mat6x6 mb_deye< Mat6x6 >(const doublereal d)
Definition: matvec6.h:643
const doublereal & dGet(unsigned short int i) const
Definition: matvec6.h:182
Mat6x6 MultRM(const Mat6x6 &m, const Mat3x3 &R)
Definition: matvec6.cc:196
void Put(unsigned short int iRow, const doublereal &dCoef)
Definition: matvec3.h:276
Mat3x3 R
Mat6x6 MultMatVCrossT(const Mat6x6 &m, const Vec3 &v)
Definition: matvec6.cc:269
Vec6 operator/(const doublereal &d) const
Definition: matvec6.h:161
Mat6x6 operator+(const Mat6x6 &x) const
Definition: matvec6.h:462
void PutMat21(const Mat3x3 &x)
Definition: matvec6.h:368
const Mat3x3 & GetMat(unsigned short int i, unsigned short int j) const
Definition: matvec6.h:357
void Put(unsigned short int i, const doublereal &d)
Definition: matvec6.h:203