SCOREC core
Parallel unstructured mesh tools
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
apf::Matrix3x3 Class Reference

convenience wrapper over apf::Matrix<3,3> More...

Inheritance diagram for apf::Matrix3x3:
apf::Matrix< 3, 3 >

Public Member Functions

 Matrix3x3 ()
 required default constructor
 
 Matrix3x3 (double a11, double a12, double a13, double a21, double a22, double a23, double a31, double a32, double a33)
 component-wise constructor More...
 
 Matrix3x3 (Matrix< 3, 3 > const &other)
 constructor from base type
 
void toArray (double(*array)[3]) const
 write matrix to an array More...
 
- Public Member Functions inherited from apf::Matrix< 3, 3 >
 Matrix ()
 mandatory
 
 Matrix (Vector< N > const *vectors)
 construct from an array More...
 
Matrix< M, N > operator+ (Matrix< M, N > const &b) const
 add two matrices
 
Matrix< M, N > operator- (Matrix< M, N > const &b) const
 subtract two matrices
 
Matrix< M, N > operator* (double s) const
 multiply a matrix by a scalar
 
Vector< M > operator* (Vector< N > const &b) const
 multiply a matrix by a vector
 
Matrix< M, O > operator* (Matrix< N, O > const &b) const
 multiply two matrices More...
 
Matrix< M, N > operator/ (double s) const
 divide a matrix by a scalar
 

Detailed Description

convenience wrapper over apf::Matrix<3,3>

like apf::Vector3, this provides component-wise initialization

Definition at line 178 of file apfMatrix.h.

Constructor & Destructor Documentation

apf::Matrix3x3::Matrix3x3 ( double  a11,
double  a12,
double  a13,
double  a21,
double  a22,
double  a23,
double  a31,
double  a32,
double  a33 
)
inline

component-wise constructor

this is useful for hardcoded matrices

Definition at line 185 of file apfMatrix.h.

188  {
189  (*this)[0] = Vector3(a11,a12,a13);
190  (*this)[1] = Vector3(a21,a22,a23);
191  (*this)[2] = Vector3(a31,a32,a33);
192  }

Member Function Documentation

void apf::Matrix3x3::toArray ( double(*)  array[3]) const
inline

write matrix to an array

Todo:
this could be templated

Definition at line 199 of file apfMatrix.h.

200  {
201  for (std::size_t i=0; i < 3; ++i)
202  for (std::size_t j=0; j < 3; ++j)
203  array[i][j] = (*this)[i][j];
204  }

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