PanPhaseField SDK
MatrixMesh< T > Class Template Reference

A matrix-like data structure template which handles mesh grid of phase-field model, such as composition mesh, order parameter mesh and chemical potential mesh. There is a rich variety of built-in operations for vectorizing loop-based source code. More...

#include <tensors.h>

Public Member Functions

bool empty ()
 
vector< type_intsize ()
 
 MatrixMesh ()
 
 MatrixMesh (const MatrixMesh &obj)
 
 MatrixMesh (type_int dimx, type_int dimy, type_int dimz, type_int dimc1, type_int dimc2)
 
 MatrixMesh (T *list, vector< type_int >dims)
 
 ~MatrixMesh ()
 
void clear ()
 
T & operator() (unsigned int x, unsigned int y, unsigned int z, unsigned int c1, unsigned int c2)
 
MatrixMeshoperator= (const MatrixMesh &rhs)
 

Detailed Description

template<typename T>
class MatrixMesh< T >

A matrix-like data structure template which handles mesh grid of phase-field model, such as composition mesh, order parameter mesh and chemical potential mesh. There is a rich variety of built-in operations for vectorizing loop-based source code.

Constructor & Destructor Documentation

◆ MatrixMesh() [1/4]

template<typename T >
MatrixMesh< T >::MatrixMesh ( )
inline

Default constructor

◆ MatrixMesh() [2/4]

template<typename T >
MatrixMesh< T >::MatrixMesh ( const MatrixMesh< T > &  obj)
inline

Copy constructor

◆ MatrixMesh() [3/4]

template<typename T >
MatrixMesh< T >::MatrixMesh ( type_int  dimx,
type_int  dimy,
type_int  dimz,
type_int  dimc1,
type_int  dimc2 
)
inline

A Constructor using dimensions of mesh

Parameters
[in]dimxthe dimension along x-axis
[in]dimythe dimension along y-axis
[in]dimzthe dimension along z-axis
[in]dimc1the 1st dimension of matrix at a mesh point
[in]dimc2the 2nd dimension of matrix at a mesh point

◆ MatrixMesh() [4/4]

template<typename T >
MatrixMesh< T >::MatrixMesh ( T *  list,
vector< type_int dims 
)
inline

A copy constructor using an array of dimensions

Parameters
[in]listthe serialized list to be extracted and copied
[in]dimsthe dimension of the 3D mesh [x,y,z, and matrix dimensions]

◆ ~MatrixMesh()

template<typename T >
MatrixMesh< T >::~MatrixMesh ( )
inline

Deconstructor

Member Function Documentation

◆ empty()

template<typename T >
bool MatrixMesh< T >::empty ( )
inline

Is the mesh empty

Returns
True if the mesh is empty

◆ size()

template<typename T >
vector< type_int > MatrixMesh< T >::size ( )
inline

Get the size of the mesh

Returns
the size of mesh

◆ clear()

template<typename T >
void MatrixMesh< T >::clear ( )
inline

Release the memory of mesh

Returns
void

◆ operator()()

template<typename T >
T & MatrixMesh< T >::operator() ( unsigned int  x,
unsigned int  y,
unsigned int  z,
unsigned int  c1,
unsigned int  c2 
)
inline

Get value by index

Parameters
[in]xthe 1st index of 3D mesh
[in]ythe 2nd index of 3D mesh
[in]zthe 3rd index of 3D mesh
[in]c1the 1st dimension index of matrix
[in]c2the 2nd dimension index of matrix
Returns
the value by index

◆ operator=()

template<typename T >
MatrixMesh & MatrixMesh< T >::operator= ( const MatrixMesh< T > &  rhs)
inline

Assignment operator. Assign values in mesh by another mesh


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