ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
diago_elpa.h
Go to the documentation of this file.
1#ifndef DIAGOELPA_H
2#define DIAGOELPA_H
3
4#include "source_base/macros.h" // GetRealType
7
8namespace hsolver
9{
10
11template <typename T>
13{
14 private:
15 using Real = typename GetTypeReal<T>::type;
16
17 public:
18 void diag(hamilt::Hamilt<T>* phm_in, psi::Psi<T>& psi, Real* eigenvalue_in);
19#ifdef __MPI
20 // diagnolization used in parallel-k case
21 void diag_pool(hamilt::MatrixBlock<T>& h_mat, hamilt::MatrixBlock<T>& s_mat, psi::Psi<T>& psi, Real* eigenvalue_in, MPI_Comm& comm);
22 MPI_Comm setmpicomm(); // set mpi comm;
23 static int elpa_num_thread; // need to set mpi_comm or not,-1 not,else the number of mpi needed
24#endif
25
26 static int DecomposedState;
27
28 private:
29#ifdef __MPI
30 bool ifElpaHandle(const bool& newIteration, const bool& ifNSCF);
31 static int lastmpinum; // last using mpi;
32#endif
33};
34
35template <typename T>
37template <typename T>
39template <typename T>
41} // namespace hsolver
42
43#endif
Definition hamilt.h:16
Definition diago_elpa.h:13
static int lastmpinum
Definition diago_elpa.h:31
typename GetTypeReal< T >::type Real
Definition diago_elpa.h:15
static int DecomposedState
Definition diago_elpa.h:26
static int elpa_num_thread
Definition diago_elpa.h:23
void diag_pool(hamilt::MatrixBlock< T > &h_mat, hamilt::MatrixBlock< T > &s_mat, psi::Psi< T > &psi, Real *eigenvalue_in, MPI_Comm &comm)
bool ifElpaHandle(const bool &newIteration, const bool &ifNSCF)
Definition diago_elpa.cpp:214
MPI_Comm setmpicomm()
void diag(hamilt::Hamilt< T > *phm_in, psi::Psi< T > &psi, Real *eigenvalue_in)
Definition psi.h:37
Definition diag_comm_info.h:9
Definition exx_lip.h:23
T type
Definition macros.h:8
Definition matrixblock.h:9