MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
Vec6 Class Reference

#include <matvec6.h>

Collaboration diagram for Vec6:

Public Member Functions

 Vec6 (void)
 
 ~Vec6 (void)
 
 Vec6 (const Vec6 &vin)
 
 Vec6 (const doublereal &d1, const doublereal &d2, const doublereal &d3, const doublereal &d4, const doublereal &d5, const doublereal &d6)
 
 Vec6 (const Vec3 &v1, const Vec3 &v2)
 
 Vec6 (const doublereal *pd)
 
const Vec3GetVec1 (void) const
 
const Vec3GetVec2 (void) const
 
const Vec3GetVec (unsigned short int i) const
 
Vec3 GetVec1 (void)
 
Vec3 GetVec2 (void)
 
Vec3 GetVec (unsigned short int i)
 
const doublerealpGetVec (unsigned short int i) const
 
Vec6operator= (const Vec6 &x)
 
Vec6operator+= (const Vec6 &x)
 
Vec6operator-= (const Vec6 &x)
 
Vec6operator*= (const doublereal &d)
 
Vec6operator/= (const doublereal &d)
 
Vec6 operator+ (const Vec6 &x) const
 
Vec6 operator- (const Vec6 &x) const
 
Vec6 operator* (const doublereal &d) const
 
Vec6 operator/ (const doublereal &d) const
 
doublereal operator* (const Vec6 &x) const
 
doublereal Dot (const Vec6 &x) const
 
doublereal Dot (void) const
 
doublereal Norm (void) const
 
const doublerealdGet (unsigned short int i) const
 
const doublerealoperator() (unsigned short int i) const
 
doublerealoperator() (unsigned short int i)
 
void Put (unsigned short int i, const doublereal &d)
 
void PutTo (doublereal *pd) const
 
void Reset (void)
 
std::ostream & Write (std::ostream &out, const char *sFill=" ") const
 

Protected Attributes

Vec3 v [2]
 

Detailed Description

Definition at line 37 of file matvec6.h.

Constructor & Destructor Documentation

Vec6::Vec6 ( void  )
inline

Definition at line 42 of file matvec6.h.

References NO_OP.

Referenced by operator*(), operator+(), operator-(), and operator/().

42  {
43  NO_OP;
44  };
#define NO_OP
Definition: myassert.h:74
Vec6::~Vec6 ( void  )
inline

Definition at line 46 of file matvec6.h.

References NO_OP.

46  {
47  NO_OP;
48  };
#define NO_OP
Definition: myassert.h:74
Vec6::Vec6 ( const Vec6 vin)
inline

Definition at line 50 of file matvec6.h.

References v.

50  {
51  v[0] = vin.v[0];
52  v[1] = vin.v[1];
53  };
Vec3 v[2]
Definition: matvec6.h:39
Vec6::Vec6 ( const doublereal d1,
const doublereal d2,
const doublereal d3,
const doublereal d4,
const doublereal d5,
const doublereal d6 
)
inline

Definition at line 55 of file matvec6.h.

References v.

57  {
58  v[0] = Vec3(d1, d2, d3);
59  v[1] = Vec3(d4, d5, d6);
60  };
Definition: matvec3.h:98
Vec3 v[2]
Definition: matvec6.h:39
Vec6::Vec6 ( const Vec3 v1,
const Vec3 v2 
)
inline

Definition at line 62 of file matvec6.h.

References v.

62  {
63  v[0] = v1;
64  v[1] = v2;
65  };
Vec3 v[2]
Definition: matvec6.h:39
Vec6::Vec6 ( const doublereal pd)
inline

Definition at line 67 of file matvec6.h.

References v.

67  {
68  v[0] = Vec3(pd);
69  v[1] = Vec3(&pd[3]);
70  };
Definition: matvec3.h:98
Vec3 v[2]
Definition: matvec6.h:39

Member Function Documentation

const doublereal& Vec6::dGet ( unsigned short int  i) const
inline

Definition at line 182 of file matvec6.h.

References ASSERT, Vec3::dGet(), MBDYN_EXCEPT_ARGS, and v.

Referenced by HBeam::dGetPrivData(), Beam2::dGetPrivData(), Beam::dGetPrivData(), ViscoElasticBeam2::dGetPrivData(), and ViscoElasticBeam::dGetPrivData().

182  {
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  };
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
const doublereal & dGet(unsigned short int iRow) const
Definition: matvec3.h:285
#define ASSERT(expression)
Definition: colamd.c:977
Vec3 v[2]
Definition: matvec6.h:39

Here is the call graph for this function:

doublereal Vec6::Dot ( const Vec6 x) const
inline

Definition at line 170 of file matvec6.h.

References Dot(), Vec3::Dot(), GetVec1(), GetVec2(), and v.

170  {
171  return v[0].Dot(x.GetVec1()) + v[1].Dot(x.GetVec2());
172  };
const Vec3 & GetVec2(void) const
Definition: matvec6.h:76
doublereal Dot(const Vec3 &v) const
Definition: matvec3.h:243
const Vec3 & GetVec1(void) const
Definition: matvec6.h:72
Vec3 v[2]
Definition: matvec6.h:39
doublereal Dot(void) const
Definition: matvec6.h:174

Here is the call graph for this function:

doublereal Vec6::Dot ( void  ) const
inline

Definition at line 174 of file matvec6.h.

References Vec3::Dot(), and v.

Referenced by Dot(), and Norm().

174  {
175  return v[0].Dot() + v[1].Dot();
176  };
doublereal Dot(const Vec3 &v) const
Definition: matvec3.h:243
Vec3 v[2]
Definition: matvec6.h:39

Here is the call graph for this function:

const Vec3& Vec6::GetVec ( unsigned short int  i) const
inline

Definition at line 80 of file matvec6.h.

References ASSERT, and v.

80  {
81  ASSERT(i == 0 || i == 1);
82  return v[i];
83  };
#define ASSERT(expression)
Definition: colamd.c:977
Vec3 v[2]
Definition: matvec6.h:39
Vec3 Vec6::GetVec ( unsigned short int  i)
inline

Definition at line 93 of file matvec6.h.

References ASSERT, and v.

93  {
94  ASSERT(i == 0 || i == 1);
95  return v[i];
96  };
#define ASSERT(expression)
Definition: colamd.c:977
Vec3 v[2]
Definition: matvec6.h:39
Vec3 Vec6::GetVec1 ( void  )
inline

Definition at line 85 of file matvec6.h.

References v.

85  {
86  return v[0];
87  };
Vec3 v[2]
Definition: matvec6.h:39
Vec3 Vec6::GetVec2 ( void  )
inline

Definition at line 89 of file matvec6.h.

References v.

89  {
90  return v[1];
91  };
Vec3 v[2]
Definition: matvec6.h:39
doublereal Vec6::Norm ( void  ) const
inline

Definition at line 178 of file matvec6.h.

References Dot(), grad::sqrt(), and v.

178  {
179  return sqrt(v[0].Dot() + v[1].Dot());
180  };
GradientExpression< UnaryExpr< FuncSqrt, Expr > > sqrt(const GradientExpression< Expr > &u)
Definition: gradient.h:2974
Vec3 v[2]
Definition: matvec6.h:39
doublereal Dot(void) const
Definition: matvec6.h:174

Here is the call graph for this function:

const doublereal& Vec6::operator() ( unsigned short int  i) const
inline

Definition at line 191 of file matvec6.h.

References ASSERT, and v.

191  {
192  ASSERT(i > 0 && i < 7);
193  unsigned short int j = (i - 1)/3;
194  return v[j](i - 3*j);
195  };
#define ASSERT(expression)
Definition: colamd.c:977
Vec3 v[2]
Definition: matvec6.h:39
doublereal& Vec6::operator() ( unsigned short int  i)
inline

Definition at line 197 of file matvec6.h.

References ASSERT, and v.

197  {
198  ASSERT(i > 0 && i < 7);
199  unsigned short int j = (i - 1)/3;
200  return v[j](i - 3*j);
201  };
#define ASSERT(expression)
Definition: colamd.c:977
Vec3 v[2]
Definition: matvec6.h:39
Vec6 Vec6::operator* ( const doublereal d) const
inline

Definition at line 157 of file matvec6.h.

References v, and Vec6().

157  {
158  return Vec6(v[0]*d, v[1]*d);
159  };
Vec6(void)
Definition: matvec6.h:42
Vec3 v[2]
Definition: matvec6.h:39

Here is the call graph for this function:

doublereal Vec6::operator* ( const Vec6 x) const
inline

Definition at line 166 of file matvec6.h.

References v.

166  {
167  return v[0]*(x.v[0]) + v[1]*(x.v[1]);
168  };
Vec3 v[2]
Definition: matvec6.h:39
Vec6& Vec6::operator*= ( const doublereal d)
inline

Definition at line 121 of file matvec6.h.

References Vec3::Reset(), and v.

121  {
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  };
void Reset(void)
Definition: matvec3.cc:109
Vec3 v[2]
Definition: matvec6.h:39

Here is the call graph for this function:

Vec6 Vec6::operator+ ( const Vec6 x) const
inline

Definition at line 149 of file matvec6.h.

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

149  {
150  return Vec6(v[0] + x.GetVec1(), v[1] + x.GetVec2());
151  };
const Vec3 & GetVec2(void) const
Definition: matvec6.h:76
Vec6(void)
Definition: matvec6.h:42
const Vec3 & GetVec1(void) const
Definition: matvec6.h:72
Vec3 v[2]
Definition: matvec6.h:39

Here is the call graph for this function:

Vec6& Vec6::operator+= ( const Vec6 x)
inline

Definition at line 109 of file matvec6.h.

References GetVec1(), GetVec2(), and v.

109  {
110  v[0] += x.GetVec1();
111  v[1] += x.GetVec2();
112  return *this;
113  };
const Vec3 & GetVec2(void) const
Definition: matvec6.h:76
const Vec3 & GetVec1(void) const
Definition: matvec6.h:72
Vec3 v[2]
Definition: matvec6.h:39

Here is the call graph for this function:

Vec6 Vec6::operator- ( const Vec6 x) const
inline

Definition at line 153 of file matvec6.h.

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

153  {
154  return Vec6(v[0] - x.GetVec1(), v[1] - x.GetVec2());
155  };
const Vec3 & GetVec2(void) const
Definition: matvec6.h:76
Vec6(void)
Definition: matvec6.h:42
const Vec3 & GetVec1(void) const
Definition: matvec6.h:72
Vec3 v[2]
Definition: matvec6.h:39

Here is the call graph for this function:

Vec6& Vec6::operator-= ( const Vec6 x)
inline

Definition at line 115 of file matvec6.h.

References GetVec1(), GetVec2(), and v.

115  {
116  v[0] -= x.GetVec1();
117  v[1] -= x.GetVec2();
118  return *this;
119  };
const Vec3 & GetVec2(void) const
Definition: matvec6.h:76
const Vec3 & GetVec1(void) const
Definition: matvec6.h:72
Vec3 v[2]
Definition: matvec6.h:39

Here is the call graph for this function:

Vec6 Vec6::operator/ ( const doublereal d) const
inline

Definition at line 161 of file matvec6.h.

References ASSERT, v, and Vec6().

161  {
162  ASSERT(d != 0.);
163  return Vec6(v[0]/d, v[1]/d);
164  };
Vec6(void)
Definition: matvec6.h:42
#define ASSERT(expression)
Definition: colamd.c:977
Vec3 v[2]
Definition: matvec6.h:39

Here is the call graph for this function:

Vec6& Vec6::operator/= ( const doublereal d)
inline

Definition at line 136 of file matvec6.h.

References MBDYN_EXCEPT_ARGS, and v.

136  {
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  };
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
Vec3 v[2]
Definition: matvec6.h:39
Vec6& Vec6::operator= ( const Vec6 x)
inline

Definition at line 103 of file matvec6.h.

References GetVec1(), GetVec2(), and v.

103  {
104  v[0] = x.GetVec1();
105  v[1] = x.GetVec2();
106  return *this;
107  };
const Vec3 & GetVec2(void) const
Definition: matvec6.h:76
const Vec3 & GetVec1(void) const
Definition: matvec6.h:72
Vec3 v[2]
Definition: matvec6.h:39

Here is the call graph for this function:

const doublereal* Vec6::pGetVec ( unsigned short int  i) const
inline

Definition at line 98 of file matvec6.h.

References ASSERT, Vec3::pGetVec(), and v.

98  {
99  ASSERT(i == 0 || i == 1);
100  return v[i].pGetVec();
101  };
#define ASSERT(expression)
Definition: colamd.c:977
Vec3 v[2]
Definition: matvec6.h:39
const doublereal * pGetVec(void) const
Definition: matvec3.h:192

Here is the call graph for this function:

void Vec6::Put ( unsigned short int  i,
const doublereal d 
)
inline

Definition at line 203 of file matvec6.h.

References ASSERT, MBDYN_EXCEPT_ARGS, Vec3::Put(), and v.

203  {
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  };
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
#define ASSERT(expression)
Definition: colamd.c:977
Vec3 v[2]
Definition: matvec6.h:39
void Put(unsigned short int iRow, const doublereal &dCoef)
Definition: matvec3.h:276

Here is the call graph for this function:

void Vec6::PutTo ( doublereal pd) const
inline

Definition at line 216 of file matvec6.h.

References ASSERT, Vec3::PutTo(), and v.

Referenced by DummyConstitutiveLaw< Vec6, Mat6x6 >::AfterConvergence(), and DummyConstitutiveLaw< Vec6, Mat6x6 >::Update().

216  {
217  ASSERT(pd != NULL);
218  v[0].PutTo(pd);
219  v[1].PutTo(&pd[3]);
220  };
void PutTo(doublereal *pd) const
Definition: matvec3.h:339
#define ASSERT(expression)
Definition: colamd.c:977
Vec3 v[2]
Definition: matvec6.h:39

Here is the call graph for this function:

void Vec6::Reset ( void  )

Definition at line 66 of file matvec6.cc.

References Vec3::Reset(), and v.

67 {
68  v[0].Reset();
69  v[1].Reset();
70 }
void Reset(void)
Definition: matvec3.cc:109
Vec3 v[2]
Definition: matvec6.h:39

Here is the call graph for this function:

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

Definition at line 54 of file matvec6.cc.

References Vec3::dGet(), and v.

Referenced by Write().

55 {
56  return out
57  << v[0].dGet(1) << sFill
58  << v[0].dGet(2) << sFill
59  << v[0].dGet(3) << sFill
60  << v[1].dGet(1) << sFill
61  << v[1].dGet(2) << sFill
62  << v[1].dGet(3);
63 }
const doublereal & dGet(unsigned short int iRow) const
Definition: matvec3.h:285
Vec3 v[2]
Definition: matvec6.h:39

Here is the call graph for this function:

Member Data Documentation


The documentation for this class was generated from the following files: