MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
matvec6.cc File Reference
#include "mbconfig.h"
#include <matvec6.h>
Include dependency graph for matvec6.cc:

Go to the source code of this file.

Functions

Vec6 operator+ (const Vec6 &v)
 
Vec6 operator- (const Vec6 &v)
 
std::ostream & operator<< (std::ostream &out, const Vec6 &v)
 
std::ostream & Write (std::ostream &out, const Vec6 &v, const char *sFill)
 
std::ostream & operator<< (std::ostream &out, const Mat6x6 &m)
 
std::ostream & Write (std::ostream &out, const Mat6x6 &m, const char *sFill, const char *sFill2)
 
Vec6 MultRV (const Vec6 &v, const Mat3x3 &R)
 
Mat6x6 MultRM (const Mat6x6 &m, const Mat3x3 &R)
 
Mat6x6 MultMRt (const Mat6x6 &m, const Mat3x3 &R)
 
Mat6x6 MultRMRt (const Mat6x6 &m, const Mat3x3 &R)
 
Mat6x6 MultRMRt (const Mat6x6 &m, const Mat3x3 &R, const doublereal &c)
 
Mat6x6 MultVCrossMat (const Mat6x6 &m, const Vec3 &v)
 
Mat6x6 MultVCrossTMat (const Mat6x6 &m, const Vec3 &v)
 
Mat6x6 MultMatVCross (const Mat6x6 &m, const Vec3 &v)
 
Mat6x6 MultMatVCrossT (const Mat6x6 &m, const Vec3 &v)
 

Variables

const Vec6 Zero6 (0., 0., 0., 0., 0., 0.)
 
const Mat6x6 Zero6x6 (0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.)
 
const Mat6x6 Eye6 (1., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 1.)
 

Function Documentation

Mat6x6 MultMatVCross ( const Mat6x6 m,
const Vec3 v 
)

Definition at line 254 of file matvec6.cc.

References Mat6x6::GetMat11(), Mat6x6::GetMat12(), Mat6x6::GetMat21(), Mat6x6::GetMat22(), and MatCross.

255 {
256  Mat3x3 vCross(MatCross, v);
257 
258  return Mat6x6(m.GetMat11(),
259  m.GetMat21(),
260  m.GetMat11()*vCross + m.GetMat12(),
261  m.GetMat21()*vCross + m.GetMat22());
262 }
Mat3x3 GetMat12(void)
Definition: matvec6.h:328
const MatCross_Manip MatCross
Definition: matvec3.cc:639
Mat3x3 GetMat21(void)
Definition: matvec6.h:324
Mat3x3 GetMat22(void)
Definition: matvec6.h:332
Mat3x3 GetMat11(void)
Definition: matvec6.h:320

Here is the call graph for this function:

Mat6x6 MultMatVCrossT ( const Mat6x6 m,
const Vec3 v 
)

Definition at line 269 of file matvec6.cc.

References Mat6x6::GetMat11(), Mat6x6::GetMat12(), Mat6x6::GetMat21(), Mat6x6::GetMat22(), and MatCross.

270 {
271  Mat3x3 vCross(MatCross, v);
272 
273  return Mat6x6(m.GetMat11() + m.GetMat12()*vCross,
274  m.GetMat21() + m.GetMat22()*vCross,
275  m.GetMat12(),
276  m.GetMat22());
277 }
Mat3x3 GetMat12(void)
Definition: matvec6.h:328
const MatCross_Manip MatCross
Definition: matvec3.cc:639
Mat3x3 GetMat21(void)
Definition: matvec6.h:324
Mat3x3 GetMat22(void)
Definition: matvec6.h:332
Mat3x3 GetMat11(void)
Definition: matvec6.h:320

Here is the call graph for this function:

Mat6x6 MultMRt ( const Mat6x6 m,
const Mat3x3 R 
)

Definition at line 203 of file matvec6.cc.

References Mat6x6::GetMat11(), Mat6x6::GetMat12(), Mat6x6::GetMat21(), Mat6x6::GetMat22(), and Mat3x3::MulMT().

204 {
205  return Mat6x6(m.GetMat11().MulMT(R), m.GetMat21().MulMT(R),
206  m.GetMat12().MulMT(R), m.GetMat22().MulMT(R));
207 }
Mat3x3 GetMat12(void)
Definition: matvec6.h:328
Mat3x3 GetMat21(void)
Definition: matvec6.h:324
Mat3x3 GetMat22(void)
Definition: matvec6.h:332
Mat3x3 GetMat11(void)
Definition: matvec6.h:320
Mat3x3 MulMT(const Mat3x3 &m) const
Definition: matvec3.cc:444

Here is the call graph for this function:

Mat6x6 MultRM ( const Mat6x6 m,
const Mat3x3 R 
)

Definition at line 196 of file matvec6.cc.

References Mat6x6::GetMat11(), Mat6x6::GetMat12(), Mat6x6::GetMat21(), and Mat6x6::GetMat22().

197 {
198  return Mat6x6(R*m.GetMat11(), R*m.GetMat21(),
199  R*m.GetMat12(), R*m.GetMat22());
200 }
Mat3x3 GetMat12(void)
Definition: matvec6.h:328
Mat3x3 GetMat21(void)
Definition: matvec6.h:324
Mat3x3 GetMat22(void)
Definition: matvec6.h:332
Mat3x3 GetMat11(void)
Definition: matvec6.h:320

Here is the call graph for this function:

Mat6x6 MultRMRt ( const Mat6x6 m,
const Mat3x3 R 
)

Definition at line 210 of file matvec6.cc.

References Mat6x6::GetMat11(), Mat6x6::GetMat12(), Mat6x6::GetMat21(), Mat6x6::GetMat22(), and Mat3x3::MulMT().

211 {
212  return Mat6x6(R*m.GetMat11().MulMT(R), R*m.GetMat21().MulMT(R),
213  R*m.GetMat12().MulMT(R), R*m.GetMat22().MulMT(R));
214 }
Mat3x3 GetMat12(void)
Definition: matvec6.h:328
Mat3x3 GetMat21(void)
Definition: matvec6.h:324
Mat3x3 GetMat22(void)
Definition: matvec6.h:332
Mat3x3 GetMat11(void)
Definition: matvec6.h:320
Mat3x3 MulMT(const Mat3x3 &m) const
Definition: matvec3.cc:444

Here is the call graph for this function:

Mat6x6 MultRMRt ( const Mat6x6 m,
const Mat3x3 R,
const doublereal c 
)

Definition at line 216 of file matvec6.cc.

References Mat6x6::GetMat11(), Mat6x6::GetMat12(), Mat6x6::GetMat21(), Mat6x6::GetMat22(), and Mat3x3::MulMT().

217 {
218  Mat3x3 Rc(R*c);
219  return Mat6x6(R*m.GetMat11().MulMT(Rc), R*m.GetMat21().MulMT(Rc),
220  R*m.GetMat12().MulMT(Rc), R*m.GetMat22().MulMT(Rc));
221 }
Mat3x3 GetMat12(void)
Definition: matvec6.h:328
Mat3x3 GetMat21(void)
Definition: matvec6.h:324
Mat3x3 GetMat22(void)
Definition: matvec6.h:332
Mat3x3 GetMat11(void)
Definition: matvec6.h:320
static std::stack< cleanup * > c
Definition: cleanup.cc:59
Mat3x3 MulMT(const Mat3x3 &m) const
Definition: matvec3.cc:444

Here is the call graph for this function:

Vec6 MultRV ( const Vec6 v,
const Mat3x3 R 
)

Definition at line 190 of file matvec6.cc.

References Vec6::GetVec1(), and Vec6::GetVec2().

191 {
192  return Vec6(R*v.GetVec1(), R*v.GetVec2());
193 }
const Vec3 & GetVec2(void) const
Definition: matvec6.h:76
Definition: matvec6.h:37
const Vec3 & GetVec1(void) const
Definition: matvec6.h:72

Here is the call graph for this function:

Mat6x6 MultVCrossMat ( const Mat6x6 m,
const Vec3 v 
)

Definition at line 228 of file matvec6.cc.

References Vec3::Cross(), Mat6x6::GetMat11(), Mat6x6::GetMat12(), Mat6x6::GetMat21(), and Mat6x6::GetMat22().

229 {
230  return Mat6x6(m.GetMat11(),
231  v.Cross(m.GetMat11())+m.GetMat21(),
232  m.GetMat12(),
233  v.Cross(m.GetMat12())+m.GetMat22());
234 }
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
Mat3x3 GetMat12(void)
Definition: matvec6.h:328
Mat3x3 GetMat21(void)
Definition: matvec6.h:324
Mat3x3 GetMat22(void)
Definition: matvec6.h:332
Mat3x3 GetMat11(void)
Definition: matvec6.h:320

Here is the call graph for this function:

Mat6x6 MultVCrossTMat ( const Mat6x6 m,
const Vec3 v 
)

Definition at line 241 of file matvec6.cc.

References Vec3::Cross(), Mat6x6::GetMat11(), Mat6x6::GetMat12(), Mat6x6::GetMat21(), and Mat6x6::GetMat22().

242 {
243  return Mat6x6(m.GetMat11()+v.Cross(m.GetMat21()),
244  m.GetMat21(),
245  m.GetMat12()+v.Cross(m.GetMat22()),
246  m.GetMat22());
247 }
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
Mat3x3 GetMat12(void)
Definition: matvec6.h:328
Mat3x3 GetMat21(void)
Definition: matvec6.h:324
Mat3x3 GetMat22(void)
Definition: matvec6.h:332
Mat3x3 GetMat11(void)
Definition: matvec6.h:320

Here is the call graph for this function:

Vec6 operator+ ( const Vec6 v)

Definition at line 81 of file matvec6.cc.

82 {
83  return v;
84 }
Vec6 operator- ( const Vec6 v)

Definition at line 87 of file matvec6.cc.

References Vec6::GetVec1(), and Vec6::GetVec2().

88 {
89  return Vec6(-v.GetVec1(), -v.GetVec2());
90 }
const Vec3 & GetVec2(void) const
Definition: matvec6.h:76
Definition: matvec6.h:37
const Vec3 & GetVec1(void) const
Definition: matvec6.h:72

Here is the call graph for this function:

std::ostream& operator<< ( std::ostream &  out,
const Vec6 v 
)

Definition at line 94 of file matvec6.cc.

References Vec3::dGet(), Vec6::GetVec1(), and Vec6::GetVec2().

95 {
96  const Vec3& v1 = v.GetVec1();
97  const Vec3& v2 = v.GetVec2();
98  return out
99  << v1.dGet(1) << " " << v1.dGet(2) << " " << v1.dGet(3) << " "
100  << v2.dGet(1) << " " << v2.dGet(2) << " " << v2.dGet(3);
101 }
Definition: matvec3.h:98
const Vec3 & GetVec2(void) const
Definition: matvec6.h:76
const Vec3 & GetVec1(void) const
Definition: matvec6.h:72
const doublereal & dGet(unsigned short int iRow) const
Definition: matvec3.h:285

Here is the call graph for this function:

std::ostream& operator<< ( std::ostream &  out,
const Mat6x6 m 
)

Definition at line 160 of file matvec6.cc.

References Mat3x3::dGet(), Mat6x6::GetMat11(), Mat6x6::GetMat12(), Mat6x6::GetMat21(), and Mat6x6::GetMat22().

161 {
162  const Mat3x3& m11 = m.GetMat11();
163  const Mat3x3& m12 = m.GetMat12();
164  const Mat3x3& m21 = m.GetMat21();
165  const Mat3x3& m22 = m.GetMat22();
166  return out
167  << m11.dGet(1, 1) << " " << m11.dGet(1, 2) << " " << m11.dGet(1,3) << " "
168  << m12.dGet(1, 1) << " " << m12.dGet(1, 2) << " " << m12.dGet(1,3) << std::endl
169  << m11.dGet(2, 1) << " " << m11.dGet(2, 2) << " " << m11.dGet(2,3) << " "
170  << m12.dGet(2, 1) << " " << m12.dGet(2, 2) << " " << m12.dGet(2,3) << std::endl
171  << m11.dGet(3, 1) << " " << m11.dGet(3, 2) << " " << m11.dGet(3,3) << " "
172  << m12.dGet(3, 1) << " " << m12.dGet(3, 2) << " " << m12.dGet(3,3) << std::endl
173  << m21.dGet(1, 1) << " " << m21.dGet(1, 2) << " " << m21.dGet(1,3) << " "
174  << m22.dGet(1, 1) << " " << m22.dGet(1, 2) << " " << m22.dGet(1,3) << std::endl
175  << m21.dGet(2, 1) << " " << m21.dGet(2, 2) << " " << m21.dGet(2,3) << " "
176  << m22.dGet(2, 1) << " " << m22.dGet(2, 2) << " " << m22.dGet(2,3) << std::endl
177  << m21.dGet(3, 1) << " " << m21.dGet(3, 2) << " " << m21.dGet(3,3) << " "
178  << m22.dGet(3, 1) << " " << m22.dGet(3, 2) << " " << m22.dGet(3,3);
179 }
const doublereal & dGet(unsigned short int iRow, unsigned short int iCol) const
Definition: matvec3.h:770
Mat3x3 GetMat12(void)
Definition: matvec6.h:328
Mat3x3 GetMat21(void)
Definition: matvec6.h:324
Mat3x3 GetMat22(void)
Definition: matvec6.h:332
Mat3x3 GetMat11(void)
Definition: matvec6.h:320

Here is the call graph for this function:

std::ostream& Write ( std::ostream &  out,
const Vec6 v,
const char *  sFill 
)

Definition at line 105 of file matvec6.cc.

References Vec6::Write().

106 {
107  return v.Write(out, sFill);
108 }
std::ostream & Write(std::ostream &out, const char *sFill=" ") const
Definition: matvec6.cc:54

Here is the call graph for this function:

std::ostream& Write ( std::ostream &  out,
const Mat6x6 m,
const char *  sFill,
const char *  sFill2 
)

Definition at line 183 of file matvec6.cc.

References Mat6x6::Write().

185 {
186  return m.Write(out, sFill, sFill2);
187 }
std::ostream & Write(std::ostream &out, const char *sFill=" ", const char *sFill2=NULL) const
Definition: matvec6.cc:112

Here is the call graph for this function:

Variable Documentation

const Mat6x6 Eye6(1., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 1.)

Referenced by MBDynParser::GetMat6x6().

const Mat6x6 Zero6x6(0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.)