Gradient Augmented Levelset Implementation in CPU & GPU
Mat3< T > Class Template Reference

#include <mat3.h>

Public Types

using value_type = T
 

Public Member Functions

 Mat3 (T a00, T a01, T a02, T a10, T a11, T a12, T a20, T a21, T a22)
 
 Mat3 ()
 
 ~Mat3 ()
 
const int size () const
 
const Vec3< T > dot (const Vec3< T > vec) const
 
const T operator[] (const int idx) const
 
T & operator[] (const int idx)
 
const T operator() (const int i_row, const int i_col) const
 
T & operator() (const int i_row, const int i_col)
 
void operator= (const Mat3< T > &mat)
 
const Mat3< T > operator- (const Mat3< T > &mat) const
 
const Mat3< T > operator* (const T var) const
 
bool operator== (const Mat3< T > &mat) const
 

Static Public Attributes

static constexpr int SIZE = 9
 

Friends

std::ostream & operator<< (std::ostream &out, const Mat3< T > &mat)
 

Detailed Description

template<typename T>
class GALS::CPU::Mat3< T >

Class to create 9 component variable at a computational cell. For e.x. gradient of velocity.

Definition at line 47 of file mat3.h.

Member Typedef Documentation

using value_type = T

Definition at line 50 of file mat3.h.

Constructor & Destructor Documentation

Mat3 ( a00,
a01,
a02,
a10,
a11,
a12,
a20,
a21,
a22 
)

Constructor.

Parameters
a00row 0, col 0
a01row 0, col 1
a02row 0, col 2
a10row 1, col 0
a11row 1, col 1
a12row 1, col 2
a20row 2, col 0
a21row 2, col 1
a22row 2, col 2

Definition at line 37 of file mat3.cc.

Mat3 ( )

Default constructor.

Definition at line 51 of file mat3.cc.

~Mat3 ( )

Destructor

Definition at line 58 of file mat3.cc.

Member Function Documentation

const GALS::CPU::Vec3< T > dot ( const Vec3< T >  vec) const

Compute dot product with Vec3.

Parameters
vecVec3 input.
Returns
Vec3.

Definition at line 69 of file mat3.cc.

const T operator() ( const int  i_row,
const int  i_col 
) const

Row column based element access.

Parameters
i_rowrow index (zero-based).
i_colcolumn index (zero-based).
Returns
element at index (i_row, i_col).

Definition at line 92 of file mat3.cc.

T & operator() ( const int  i_row,
const int  i_col 
)

Row column based element access.

Parameters
i_rowrow index (zero-based).
i_colcolumn index (zero-based).
Returns
element at index (i_row, i_col).

Definition at line 98 of file mat3.cc.

const GALS::CPU::Mat3< T > operator* ( const T  var) const

Overload multiplication operator.

Parameters
varscalar variable.
Returns
scaled mat.

Definition at line 119 of file mat3.cc.

const GALS::CPU::Mat3< T > operator- ( const Mat3< T > &  mat) const

Overload subtraction operator.

Parameters
matvariable whose values will be subtracted from this.
Returns
(this - mat).

Definition at line 110 of file mat3.cc.

void operator= ( const Mat3< T > &  mat)

Overload assignment operator.

Parameters
matvariable whose values will be assigned.

Definition at line 104 of file mat3.cc.

bool operator== ( const Mat3< T > &  mat) const

Equality operator.

Parameters
matvariable to compare against.
Returns
true if equal, false otherwise.

Definition at line 128 of file mat3.cc.

const T operator[] ( const int  idx) const

Overloaded subscript operator that returns a reference.

Parameters
idxzero based index of element.
Returns
element at index (idx).

Definition at line 80 of file mat3.cc.

T & operator[] ( const int  idx)

Overloaded subscript operator that returns a reference.

Parameters
idxzero based index of element.
Returns
element at index (idx).

Definition at line 86 of file mat3.cc.

const int size ( ) const

Returns number of elements.

Returns
number of elements.

Definition at line 63 of file mat3.cc.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const Mat3< T > &  mat 
)
friend

Output operator overload.

Parameters
outoutput stream.
matMat3 object to output stream.
Returns
reference to output stream.

Definition at line 161 of file mat3.h.

Field Documentation

constexpr int SIZE = 9
static

Definition at line 52 of file mat3.h.


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