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 162 of file Matrix3.hpp.

163  {
164  Vector res;
165  res[0] = v[0] * m( 0, 0 ) + v[1] * m( 0, 1 ) + v[2] * m( 0, 2 );
166  res[1] = v[0] * m( 1, 0 ) + v[1] * m( 1, 1 ) + v[2] * m( 1, 2 );
167  res[2] = v[0] * m( 2, 0 ) + v[1] * m( 2, 1 ) + v[2] * m( 2, 2 );
168  return res;
169  }

Referenced by moab::operator*().

◆ mmult3()

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

Definition at line 133 of file Matrix3.hpp.

134  {
135  return Matrix( a( 0, 0 ) * b( 0, 0 ) + a( 0, 1 ) * b( 1, 0 ) + a( 0, 2 ) * b( 2, 0 ),
136  a( 0, 0 ) * b( 0, 1 ) + a( 0, 1 ) * b( 1, 1 ) + a( 0, 2 ) * b( 2, 1 ),
137  a( 0, 0 ) * b( 0, 2 ) + a( 0, 1 ) * b( 1, 2 ) + a( 0, 2 ) * b( 2, 2 ),
138  a( 1, 0 ) * b( 0, 0 ) + a( 1, 1 ) * b( 1, 0 ) + a( 1, 2 ) * b( 2, 0 ),
139  a( 1, 0 ) * b( 0, 1 ) + a( 1, 1 ) * b( 1, 1 ) + a( 1, 2 ) * b( 2, 1 ),
140  a( 1, 0 ) * b( 0, 2 ) + a( 1, 1 ) * b( 1, 2 ) + a( 1, 2 ) * b( 2, 2 ),
141  a( 2, 0 ) * b( 0, 0 ) + a( 2, 1 ) * b( 1, 0 ) + a( 2, 2 ) * b( 2, 0 ),
142  a( 2, 0 ) * b( 0, 1 ) + a( 2, 1 ) * b( 1, 1 ) + a( 2, 2 ) * b( 2, 1 ),
143  a( 2, 0 ) * b( 0, 2 ) + a( 2, 1 ) * b( 1, 2 ) + a( 2, 2 ) * b( 2, 2 ) );
144  }

◆ vector_matrix()

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

Definition at line 154 of file Matrix3.hpp.

155  {
156  return Vector( v[0] * m( 0, 0 ) + v[1] * m( 1, 0 ) + v[2] * m( 2, 0 ),
157  v[0] * m( 0, 1 ) + v[1] * m( 1, 1 ) + v[2] * m( 2, 1 ),
158  v[0] * m( 0, 2 ) + v[1] * m( 1, 2 ) + v[2] * m( 2, 2 ) );
159  }

Referenced by moab::operator*().