ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
pexsi_solver.h
Go to the documentation of this file.
1#ifndef PEXSI_Solver_H
2#define PEXSI_Solver_H
3
4#include <vector>
5
6namespace pexsi
7{
9{
10 public:
11 void prepare(const int blacs_text,
12 const int nb,
13 const int nrow,
14 const int ncol,
15 const double* h,
16 const double* s,
17 double*& DM,
18 double*& EDM);
19 int solve(double mu0);
20 const double get_totalFreeEnergy() const;
21 const double get_totalEnergyH() const;
22 const double get_totalEnergyS() const;
23 const double get_mu() const;
24
25 //==========================================================
26 // PEXSI related variables
27 //==========================================================
31 static int pexsi_npole;
35 static bool pexsi_inertia;
39 static int pexsi_nmax;
43 static bool pexsi_comm;
47 static bool pexsi_storage;
51 static int pexsi_ordering;
59 static int pexsi_nproc;
65 static bool pexsi_symm;
71 static bool pexsi_trans;
77 static int pexsi_method;
82 static int pexsi_nproc_pole;
86 static double pexsi_temp;
90 static double pexsi_gap;
94 static double pexsi_delta_e;
98 static double pexsi_mu_lower;
102 static double pexsi_mu_upper;
106 static double pexsi_mu;
110 static double pexsi_mu_thr;
114 static double pexsi_mu_expand;
118 static double pexsi_mu_guard;
122 static double pexsi_elec_thr;
126 static double pexsi_zero_thr;
127
128 private:
130 int nb;
131 int nrow;
132 int ncol;
133 double* h;
134 double* s;
135 double* DM;
136 double* EDM;
140 double mu;
141};
142} // namespace pexsi
143#endif // PEXSI_Solver_H
Definition pexsi_solver.h:9
static double pexsi_zero_thr
If the absolute value of CCS matrix element is less than this value, it will be considered as zero.
Definition pexsi_solver.h:126
static int pexsi_npole
Number of terms in the pole expansion.
Definition pexsi_solver.h:31
static double pexsi_mu_upper
Initial guess of upper bound for mu.
Definition pexsi_solver.h:102
double totalEnergyS
Definition pexsi_solver.h:138
static double pexsi_mu_expand
If the chemical potential is not in the initial interval, the interval is expanded by muInertiaExpans...
Definition pexsi_solver.h:114
static double pexsi_mu_lower
Initial guess of lower bound for mu.
Definition pexsi_solver.h:98
static bool pexsi_inertia
Whether inertia counting is used at the very beginning.
Definition pexsi_solver.h:35
double totalEnergyH
Definition pexsi_solver.h:137
static double pexsi_temp
Temperature, in the same unit as H.
Definition pexsi_solver.h:86
const double get_totalEnergyS() const
double * s
Definition pexsi_solver.h:134
double * DM
Definition pexsi_solver.h:135
double totalFreeEnergy
Definition pexsi_solver.h:139
static double pexsi_delta_e
An upper bound for the spectral radius of .
Definition pexsi_solver.h:94
static bool pexsi_trans
Transpose.
Definition pexsi_solver.h:71
const double get_totalEnergyH() const
static bool pexsi_storage
Whether to use symmetric storage space used by the Selected Inversion algorithm for symmetric matrice...
Definition pexsi_solver.h:47
static double pexsi_elec_thr
Stopping criterion of the PEXSI iteration in terms of the number of electrons compared to numElectron...
Definition pexsi_solver.h:122
int ncol
Definition pexsi_solver.h:132
static double pexsi_mu
Initial guess for mu (for the solver) (AG)
Definition pexsi_solver.h:106
static int pexsi_ordering
Ordering strategy for factorization and selected inversion.
Definition pexsi_solver.h:51
int nrow
Definition pexsi_solver.h:131
double * h
Definition pexsi_solver.h:133
static double pexsi_gap
Spectral gap. Note This can be set to be 0 in most cases.
Definition pexsi_solver.h:90
int blacs_text
Definition pexsi_solver.h:129
static double pexsi_mu_guard
Safe guard criterion in terms of the chemical potential to reinvoke the inertia counting procedure.
Definition pexsi_solver.h:118
static double pexsi_mu_thr
Stopping criterion in terms of the chemical potential for the inertia counting procedure.
Definition pexsi_solver.h:110
static int pexsi_nproc
Number of processors for PARMETIS/PT-SCOTCH. Only used if the ordering == 0.
Definition pexsi_solver.h:59
const double get_totalFreeEnergy() const
int nb
Definition pexsi_solver.h:130
int solve(double mu0)
void prepare(const int blacs_text, const int nb, const int nrow, const int ncol, const double *h, const double *s, double *&DM, double *&EDM)
static int pexsi_row_ordering
row permutation strategy for factorization and selected inversion.
Definition pexsi_solver.h:55
double * EDM
Definition pexsi_solver.h:136
static bool pexsi_symm
Matrix structure.
Definition pexsi_solver.h:65
static int pexsi_nmax
Maximum number of PEXSI iterations after each inertia counting procedure.
Definition pexsi_solver.h:39
static int pexsi_nproc_pole
The point parallelizaion of PEXSI.
Definition pexsi_solver.h:82
double mu
Definition pexsi_solver.h:140
const double get_mu() const
static int pexsi_method
The pole expansion method to be used.
Definition pexsi_solver.h:77
static bool pexsi_comm
Whether to construct PSelInv communication pattern.
Definition pexsi_solver.h:43
Definition dist_bcd_matrix.h:12