ChaseMpiMatrices¶
-
template<class T>
class ChaseMpiMatrices¶ A class to setup the buffers of matrices and vectors which will be used by ChASE-MPI.
This class provides two constructors:
Allocating the buffers for ChaseMpi without MPI support.
Allocating the buffers for ChaseMpi with MPI support.
- Template Parameters:
T – the scalar type used for the application. ChASE is templated for real and complex scalar with both Single Precision and Double Precision, thus
Tcan be one offloat,double,std::complex<float>andstd::complex<double>.
Public Functions
-
inline ChaseMpiMatrices(std::size_t N, std::size_t max_block, T *V1 = nullptr, Base<T> *ritzv = nullptr, T *H = nullptr, T *V2 = nullptr, Base<T> *resid = nullptr)¶
A constructor of ChaseMpiMatrices for Non-MPI case which allocates everything required.
The private members of this class are initialized by the parameters of this constructor.
For
H__andH_, they are of sizeN * N.For
V1__,V1_,V2__andV1_, they are of sizeN * max_block.For
ritzv__,ritzv_,resid__andresid_, they are of sizemax_block.
- Parameters:
N – size of the square matrix defining the eigenproblem.
max_block – Maximum column number of matrix
V1_andV2_. It equals tonev_ + nex_.V1 – a pointer to the buffer
V1_.ritz – a pointer to the buffer
ritz_.H – a pointer to the buffer
H_.V2 – a pointer to the buffer
V2_.resid – a pointer to the buffer
resid_.
-
inline ChaseMpiMatrices(MPI_Comm comm, std::size_t N, std::size_t max_block, T *V1 = nullptr, Base<T> *ritzv = nullptr, T *V2 = nullptr, Base<T> *resid = nullptr)¶
A constructor of ChaseMpiMatrices for MPI case which allocates everything required except
H_.The private members of this class are initialized by the parameters of this constructor.
For
V1__,V1_,V2__andV1_, they are of sizeN * max_block.For
ritzv__,ritzv_,resid__andresid_, they are of sizeN * max_block.H_is not allocated here, but in ChaseMpiProperties class which takes the MPI environment and data distribution scheme into account.
- Parameters:
comm – the working MPI communicator of ChASE.
N – size of the square matrix defining the eigenproblem.
max_block – Maximum column number of matrix
V1_andV2_. It equals tonev_ + nex_.V1 – a pointer to the buffer
V1_.ritz – a pointer to the buffer
ritz_.V2 – a pointer to the buffer
V2_.resid – a pointer to the buffer
resid_.
-
inline T *get_H()¶
Return buffer stores the (local part if applicable) matrix A.
- Returns:
H_, a private member of this class.
-
inline T *get_V1()¶
Return the buffer
V1_which will be right-multiplied toAduring the process of ChASE.- Returns:
V1_, a private member of this class.
-
inline T *get_V2()¶
Return the buffer
V2_whose conjugate transpose will be left-multiplied toAduring the process of ChASE.- Returns:
V2_, a private member of this class.
Private Members
-
std::unique_ptr<T[]> H__¶
A smart pointer which manages the buffer of
H_which stores (local part if applicable) matrixA.
-
std::unique_ptr<T[]> V1__¶
A smart pointer which manages the buffer of
V1_which will be right-multiplied toAduring the process of ChASE. The eigenvectors obtained will also stored inV1_.
-
std::unique_ptr<T[]> V2__¶
A smart pointer which manages the buffer of
V2_whose conjugate transpose will be left-multiplied toAduring the process of ChASE.
-
std::unique_ptr<Base<T>[]> ritzv__¶
A smart pointer which manages the buffer which stores the computed Ritz values.
-
std::unique_ptr<Base<T>[]> resid__¶
A smart pointer which manages the buffer which stores the residual of computed Ritz pairs.
-
T *V1_¶
The buffer of
V1_which will be right-multiplied toAduring the process of ChASE. The eigenvectors obtained will also be stored inV_.