Chi-Tech
chi_mesh::Matrix3x3 Struct Reference

#include <chi_meshmatrix3x3.h>

Public Member Functions

 Matrix3x3 ()
 
Matrix3x3operator= (const Matrix3x3 &inM)
 
Matrix3x3 operator+ (const Matrix3x3 &inM)
 
Matrix3x3 operator- (const Matrix3x3 &inM)
 
Matrix3x3 operator* (const double value)
 
Vector3 operator* (const Vector3 &vec) const
 
void SetIJ (int i, int j, double value)
 
void AddIJ (int i, int j, double value)
 
double GetIJ (int i, int j) const
 
void SetRowIVec (int i, Vector3 vec)
 
void SetColJVec (int j, Vector3 vec)
 
void SetDiagonalVec (double a00, double a11, double a22)
 
double Det (int row=0)
 
double MinorIJ (int ir, int jr)
 
Matrix3x3 Transpose ()
 
Matrix3x3 Inverse ()
 
std::string PrintS ()
 

Static Public Member Functions

static Matrix3x3 MakeRotationMatrixFromVector (const Vector3 &vec)
 

Data Fields

double vals [9]
 

Friends

std::ostream & operator<< (std::ostream &out, Matrix3x3 &inM)
 

Detailed Description

Definition at line 8 of file chi_meshmatrix3x3.h.

Constructor & Destructor Documentation

◆ Matrix3x3()

chi_mesh::Matrix3x3::Matrix3x3 ( )
inline

Creates a zeros matrix of size 3x3.

Definition at line 13 of file chi_meshmatrix3x3.h.

Member Function Documentation

◆ AddIJ()

void chi_mesh::Matrix3x3::AddIJ ( int  i,
int  j,
double  value 
)
inline

Add value to value at row i and column j.

Definition at line 120 of file chi_meshmatrix3x3.h.

◆ Det()

double chi_mesh::Matrix3x3::Det ( int  row = 0)
inline

Get the determinant using specified row [default:0].

Definition at line 158 of file chi_meshmatrix3x3.h.

◆ GetIJ()

double chi_mesh::Matrix3x3::GetIJ ( int  i,
int  j 
) const
inline

Obtain a copy of the value at row i and column j.

Definition at line 127 of file chi_meshmatrix3x3.h.

◆ Inverse()

Matrix3x3 chi_mesh::Matrix3x3::Inverse ( )
inline

Compute the matrix transpose.

Definition at line 215 of file chi_meshmatrix3x3.h.

◆ MakeRotationMatrixFromVector()

static Matrix3x3 chi_mesh::Matrix3x3::MakeRotationMatrixFromVector ( const Vector3 vec)
inlinestatic

Produces a rotation matrix with a reference vector rotated from the cartesian basis vectors $\hat{i}$, $\hat{j}$ and $\hat{k}$.

By default a rotation matrix that creates no rotation is the identity matrix. Such a matrix can be defined from basis vectors following the notion that the "up-vector" is $\hat{k}$, this is also called the normal vector $\hat{n}$. The tangent vector is $\hat{i}$, denoted with $\hat{t}$. And the bi-norm vector is $\hat{j}$, denoted with $\hat{b}$.

By specifying only the normal vector we can compute a simple pitch based rotation matrix. The supplied vector is therefore the new normal-vector, the tangent vector is computed as $ \hat{t} = \hat{n} \times \hat{k} $, and the bi-norm vector is computed as $ \hat{b} = \hat{n} \times \hat{t} $

Definition at line 35 of file chi_meshmatrix3x3.h.

◆ MinorIJ()

double chi_mesh::Matrix3x3::MinorIJ ( int  ir,
int  jr 
)
inline

Get the minor value associated with row ir and column jr.

Definition at line 175 of file chi_meshmatrix3x3.h.

◆ operator*() [1/2]

Matrix3x3 chi_mesh::Matrix3x3::operator* ( const double  value)
inline

Matrix multiply with scalar.

Definition at line 85 of file chi_meshmatrix3x3.h.

◆ operator*() [2/2]

Vector3 chi_mesh::Matrix3x3::operator* ( const Vector3 vec) const
inline

Matrix multiply with vector.

Definition at line 96 of file chi_meshmatrix3x3.h.

◆ operator+()

Matrix3x3 chi_mesh::Matrix3x3::operator+ ( const Matrix3x3 inM)
inline

Matrix addition operator.

Definition at line 67 of file chi_meshmatrix3x3.h.

◆ operator-()

Matrix3x3 chi_mesh::Matrix3x3::operator- ( const Matrix3x3 inM)
inline

Matrix subtraction operator.

Definition at line 76 of file chi_meshmatrix3x3.h.

◆ operator=()

Matrix3x3 & chi_mesh::Matrix3x3::operator= ( const Matrix3x3 inM)
inline

Copy constructor

Definition at line 59 of file chi_meshmatrix3x3.h.

◆ PrintS()

std::string chi_mesh::Matrix3x3::PrintS ( )
inline

Definition at line 268 of file chi_meshmatrix3x3.h.

◆ SetColJVec()

void chi_mesh::Matrix3x3::SetColJVec ( int  j,
Vector3  vec 
)
inline

Set column j using a vector.

Definition at line 142 of file chi_meshmatrix3x3.h.

◆ SetDiagonalVec()

void chi_mesh::Matrix3x3::SetDiagonalVec ( double  a00,
double  a11,
double  a22 
)
inline

Sets the diagonal of the matrix.

Definition at line 150 of file chi_meshmatrix3x3.h.

◆ SetIJ()

void chi_mesh::Matrix3x3::SetIJ ( int  i,
int  j,
double  value 
)
inline

Set value at row i and column j.

Definition at line 113 of file chi_meshmatrix3x3.h.

◆ SetRowIVec()

void chi_mesh::Matrix3x3::SetRowIVec ( int  i,
Vector3  vec 
)
inline

Set row i using a vector.

Definition at line 134 of file chi_meshmatrix3x3.h.

◆ Transpose()

Matrix3x3 chi_mesh::Matrix3x3::Transpose ( )
inline

Compute the matrix transpose.

Definition at line 198 of file chi_meshmatrix3x3.h.

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  out,
Matrix3x3 inM 
)
friend

Outputs the matrix to a stream.

Definition at line 250 of file chi_meshmatrix3x3.h.

Field Documentation

◆ vals

double chi_mesh::Matrix3x3::vals[9]

Definition at line 10 of file chi_meshmatrix3x3.h.


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