MOAB: Mesh Oriented datABase  (version 5.4.1)
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

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

Definition at line 190 of file Matrix3.hpp.

Referenced by moab::element_utility::Spectral_hex_map< moab::Matrix3 >::solve_inverse(), and moab::element_utility::Quadratic_hex_map< moab::Matrix3 >::solve_inverse().

    {
        const double det = 1.0 / determinant3( d );
        return inverse( d, det );
    }
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.

Referenced by moab::operator*(), and test_EigenDecomp().

    {
        Vector res = v;
        res[0]     = v[0] * m( 0, 0 ) + v[1] * m( 0, 1 ) + v[2] * m( 0, 2 );
        res[1]     = v[0] * m( 1, 0 ) + v[1] * m( 1, 1 ) + v[2] * m( 1, 2 );
        res[2]     = v[0] * m( 2, 0 ) + v[1] * m( 2, 1 ) + v[2] * m( 2, 2 );
        return res;
    }
template<typename Matrix >
Matrix moab::Matrix::mmult3 ( const Matrix &  a,
const Matrix &  b 
) [inline]

Definition at line 176 of file Matrix3.hpp.

Referenced by moab::operator*().

    {
        return Matrix( a( 0, 0 ) * b( 0, 0 ) + a( 0, 1 ) * b( 1, 0 ) + a( 0, 2 ) * b( 2, 0 ),
                       a( 0, 0 ) * b( 0, 1 ) + a( 0, 1 ) * b( 1, 1 ) + a( 0, 2 ) * b( 2, 1 ),
                       a( 0, 0 ) * b( 0, 2 ) + a( 0, 1 ) * b( 1, 2 ) + a( 0, 2 ) * b( 2, 2 ),
                       a( 1, 0 ) * b( 0, 0 ) + a( 1, 1 ) * b( 1, 0 ) + a( 1, 2 ) * b( 2, 0 ),
                       a( 1, 0 ) * b( 0, 1 ) + a( 1, 1 ) * b( 1, 1 ) + a( 1, 2 ) * b( 2, 1 ),
                       a( 1, 0 ) * b( 0, 2 ) + a( 1, 1 ) * b( 1, 2 ) + a( 1, 2 ) * b( 2, 2 ),
                       a( 2, 0 ) * b( 0, 0 ) + a( 2, 1 ) * b( 1, 0 ) + a( 2, 2 ) * b( 2, 0 ),
                       a( 2, 0 ) * b( 0, 1 ) + a( 2, 1 ) * b( 1, 1 ) + a( 2, 2 ) * b( 2, 1 ),
                       a( 2, 0 ) * b( 0, 2 ) + a( 2, 1 ) * b( 1, 2 ) + a( 2, 2 ) * b( 2, 2 ) );
    }
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.

Referenced by moab::operator*().

    {
        return Vector( v[0] * m( 0, 0 ) + v[1] * m( 1, 0 ) + v[2] * m( 2, 0 ),
                       v[0] * m( 0, 1 ) + v[1] * m( 1, 1 ) + v[2] * m( 2, 1 ),
                       v[0] * m( 0, 2 ) + v[1] * m( 1, 2 ) + v[2] * m( 2, 2 ) );
    }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines