Open Qmin  0.8.0
GPU-accelerated Q-tensor-based liquid crystal simulations
Public Member Functions | Public Attributes | Friends | List of all members
MatrixDxD Struct Reference

#include <matrix.h>

Public Member Functions

HOSTDEVICE MatrixDxD (bool makeIdentity=true)
 Default constructor is the identity matrix. More...
 
HOSTDEVICE MatrixDxD (vector< dVec > &_mat)
 Generic constructor is whatever you want it to be. More...
 
HOSTDEVICE void set (const vector< dVec > &_mat)
 Set the values to some desired set. More...
 
HOSTDEVICE void operator= (const MatrixDxD &m2)
 Transpose. More...
 
HOSTDEVICE void operator *= (const MatrixDxD &m2)
 matrix multiplication operator More...
 
HOSTDEVICE void operator *= (scalar a)
 scalar multiplication operator More...
 
HOSTDEVICE void operator+= (const MatrixDxD &m2)
 Matrix addition operator. More...
 
HOSTDEVICE void operator-= (const MatrixDxD &m2)
 Matrix subtraction operator. More...
 

Public Attributes

vector< dVec > mat
 The entries of the matrix. More...
 

Friends

HOSTDEVICE friend MatrixDxD operator * (const MatrixDxD &m1, const MatrixDxD &m2)
 matrix multiplication operator More...
 
HOSTDEVICE friend MatrixDxD operator * (const MatrixDxD &m, const scalar a)
 scalar right multiplication operator More...
 
HOSTDEVICE friend MatrixDxD operator * (const scalar a, const MatrixDxD &m)
 scalar left multiplication operator More...
 
HOSTDEVICE friend MatrixDxD operator+ (const MatrixDxD &m1, const MatrixDxD &m2)
 Matrix addition operator. More...
 
HOSTDEVICE friend MatrixDxD operator- (const MatrixDxD &m1, const MatrixDxD &m2)
 matrix subtraction operator More...
 
HOSTDEVICE friend dVec operator * (const MatrixDxD &m, const dVec &v)
 matrix-vector multiplication operator More...
 

Detailed Description

MatrixDxD provides a simple interface for operations using DxD matrices. In particular, it implement matrix-maxtrix multiplication, and has specialized matrix-vector and vector-matrix multiplication in which dVecs variables take the place of vectors. A dyadic product is implemented which takes two dVecs and returns a MatrixDxD

Constructor & Destructor Documentation

◆ MatrixDxD() [1/2]

HOSTDEVICE MatrixDxD::MatrixDxD ( bool  makeIdentity = true)
inline

Default constructor is the identity matrix.

References make_dVec(), and mat.

◆ MatrixDxD() [2/2]

HOSTDEVICE MatrixDxD::MatrixDxD ( vector< dVec > &  _mat)
inline

Generic constructor is whatever you want it to be.

References mat.

Member Function Documentation

◆ set()

HOSTDEVICE void MatrixDxD::set ( const vector< dVec > &  _mat)
inline

Set the values to some desired set.

References mat.

Referenced by operator *=(), and operator=().

◆ operator=()

HOSTDEVICE void MatrixDxD::operator= ( const MatrixDxD m2)
inline

Transpose.

assignment operator

References mat, and set().

◆ operator *=() [1/2]

HOSTDEVICE void MatrixDxD::operator *= ( const MatrixDxD m2)
inline

matrix multiplication operator

References mat, and set().

◆ operator *=() [2/2]

HOSTDEVICE void MatrixDxD::operator *= ( scalar  a)
inline

scalar multiplication operator

References mat.

◆ operator+=()

HOSTDEVICE void MatrixDxD::operator+= ( const MatrixDxD m2)
inline

Matrix addition operator.

References mat.

◆ operator-=()

HOSTDEVICE void MatrixDxD::operator-= ( const MatrixDxD m2)
inline

Matrix subtraction operator.

References mat.

Friends And Related Function Documentation

◆ operator * [1/4]

HOSTDEVICE friend MatrixDxD operator * ( const MatrixDxD m1,
const MatrixDxD m2 
)
friend

matrix multiplication operator

◆ operator * [2/4]

HOSTDEVICE friend MatrixDxD operator * ( const MatrixDxD m,
const scalar  a 
)
friend

scalar right multiplication operator

◆ operator * [3/4]

HOSTDEVICE friend MatrixDxD operator * ( const scalar  a,
const MatrixDxD m 
)
friend

scalar left multiplication operator

◆ operator+

HOSTDEVICE friend MatrixDxD operator+ ( const MatrixDxD m1,
const MatrixDxD m2 
)
friend

Matrix addition operator.

◆ operator-

HOSTDEVICE friend MatrixDxD operator- ( const MatrixDxD m1,
const MatrixDxD m2 
)
friend

matrix subtraction operator

◆ operator * [4/4]

HOSTDEVICE friend dVec operator * ( const MatrixDxD m,
const dVec &  v 
)
friend

matrix-vector multiplication operator

Member Data Documentation

◆ mat

vector<dVec> MatrixDxD::mat

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