Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
moab::Matrix Namespace Reference

Functions

template<typename Matrix >
Matrix mmult3 (const Matrix &a, const Matrix &b)
 
template<typename Matrix >
const Matrix inverse (const Matrix &d)
 
template<typename Vector , typename Matrix >
Vector vector_matrix (const Vector &v, const Matrix &m)
 
template<typename Vector , typename Matrix >
Vector matrix_vector (const Matrix &m, const Vector &v)
 

Function Documentation

◆ inverse()

template<typename Matrix >
const Matrix moab::Matrix::inverse ( const Matrix &  d)
inline

◆ matrix_vector()

template<typename Vector , typename Matrix >
Vector moab::Matrix::matrix_vector ( const Matrix &  m,
const Vector &  v 
)
inline

Definition at line 205 of file Matrix3.hpp.

206  {
207  Vector res = v;
208  res[0] = v[0] * m( 0, 0 ) + v[1] * m( 0, 1 ) + v[2] * m( 0, 2 );
209  res[1] = v[0] * m( 1, 0 ) + v[1] * m( 1, 1 ) + v[2] * m( 1, 2 );
210  res[2] = v[0] * m( 2, 0 ) + v[1] * m( 2, 1 ) + v[2] * m( 2, 2 );
211  return res;
212  }

Referenced by moab::operator*().

◆ mmult3()

template<typename Matrix >
Matrix moab::Matrix::mmult3 ( const Matrix &  a,
const Matrix &  b 
)
inline

Definition at line 176 of file Matrix3.hpp.

177  {
178  return Matrix( a( 0, 0 ) * b( 0, 0 ) + a( 0, 1 ) * b( 1, 0 ) + a( 0, 2 ) * b( 2, 0 ),
179  a( 0, 0 ) * b( 0, 1 ) + a( 0, 1 ) * b( 1, 1 ) + a( 0, 2 ) * b( 2, 1 ),
180  a( 0, 0 ) * b( 0, 2 ) + a( 0, 1 ) * b( 1, 2 ) + a( 0, 2 ) * b( 2, 2 ),
181  a( 1, 0 ) * b( 0, 0 ) + a( 1, 1 ) * b( 1, 0 ) + a( 1, 2 ) * b( 2, 0 ),
182  a( 1, 0 ) * b( 0, 1 ) + a( 1, 1 ) * b( 1, 1 ) + a( 1, 2 ) * b( 2, 1 ),
183  a( 1, 0 ) * b( 0, 2 ) + a( 1, 1 ) * b( 1, 2 ) + a( 1, 2 ) * b( 2, 2 ),
184  a( 2, 0 ) * b( 0, 0 ) + a( 2, 1 ) * b( 1, 0 ) + a( 2, 2 ) * b( 2, 0 ),
185  a( 2, 0 ) * b( 0, 1 ) + a( 2, 1 ) * b( 1, 1 ) + a( 2, 2 ) * b( 2, 1 ),
186  a( 2, 0 ) * b( 0, 2 ) + a( 2, 1 ) * b( 1, 2 ) + a( 2, 2 ) * b( 2, 2 ) );
187  }

◆ vector_matrix()

template<typename Vector , typename Matrix >
Vector moab::Matrix::vector_matrix ( const Vector &  v,
const Matrix &  m 
)
inline

Definition at line 197 of file Matrix3.hpp.

198  {
199  return Vector( v[0] * m( 0, 0 ) + v[1] * m( 1, 0 ) + v[2] * m( 2, 0 ),
200  v[0] * m( 0, 1 ) + v[1] * m( 1, 1 ) + v[2] * m( 2, 1 ),
201  v[0] * m( 0, 2 ) + v[1] * m( 1, 2 ) + v[2] * m( 2, 2 ) );
202  }

Referenced by moab::operator*().