50 #ifndef _PEXSI_C_PEXSI_INTERFACE_H_
51 #define _PEXSI_C_PEXSI_INTERFACE_H_
690 double numElectronExact,
691 double* numElectronPEXSI,
692 double* numElectronDrvMuPEXSI,
757 double numElectronExact,
758 double* numElectronPEXSI,
759 double* numElectronDrvMuPEXSI,
784 double* AinvnzvalLocal,
812 double* AinvnzvalLocal,
837 double* AinvnzvalLocal,
865 double* AinvnzvalLocal,
953 double numElectronExact,
955 double* numElectronPEXSI,
956 double* muMinInertia,
957 double* muMaxInertia,
958 int* numTotalInertiaIter,
959 int* numTotalPEXSIIter,
1033 double numElectronExact,
1035 double* numElectronPEXSI,
1036 double* muMinInertia,
1037 double* muMaxInertia,
1038 int* numTotalInertiaIter,
1058 double* DMnzvalLocal,
1059 double* EDMnzvalLocal,
1060 double* FDMnzvalLocal,
1061 double* totalEnergyH,
1062 double* totalEnergyS,
1063 double* totalFreeEnergy,
1084 double* DMnzvalLocal,
1085 double* EDMnzvalLocal,
1086 double* FDMnzvalLocal,
1087 double* totalEnergyH,
1088 double* totalEnergyS,
1089 double* totalFreeEnergy,
1170 #endif // _PEXSI_C_PEXSI_INTERFACE_H_
void PPEXSIInertiaCountRealMatrix(PPEXSIPlan plan, PPEXSIOptions options, int numShift, double *shiftList, double *inertiaList, int *info)
Directly compute the negative inertia at a set of shifts for real matrices.
Definition: interface.cpp:694
double muMin0
Initial guess of lower bound for mu.
Definition: c_pexsi_interface.h:209
int isConstructCommPattern
Whether to construct PSelInv communication pattern.
Definition: c_pexsi_interface.h:251
void ReadDistSparseMatrixFormattedInterface(char *filename, int size, int nnz, int nnzLocal, int numColLocal, int *colptrLocal, int *rowindLocal, double *nzvalLocal, MPI_Comm comm)
Reading the data of a formatted DistSparseMatrix.
Definition: interface.cpp:120
double mu0
Initial guess for mu (for the solver) (AG)
Definition: c_pexsi_interface.h:217
void PPEXSIPlanFinalize(PPEXSIPlan plan, int *info)
Release the memory used by PEXSI.
Definition: interface.cpp:1187
double muInertiaExpansion
If the chemical potential is not in the initial interval, the interval is expanded by muInertiaExpans...
Definition: c_pexsi_interface.h:227
int ordering
Ordering strategy for factorization and selected inversion.
Definition: c_pexsi_interface.h:271
int rowOrdering
row permutation strategy for factorization and selected inversion.
Definition: c_pexsi_interface.h:280
double numElectronPEXSITolerance
Stopping criterion of the PEXSI iteration in terms of the number of electrons compared to numElectron...
Definition: c_pexsi_interface.h:237
intptr_t PPEXSIPlan
A handle for holding the internal PEXSI data structure.
Definition: c_pexsi_interface.h:174
double muInertiaTolerance
Stopping criterion in terms of the chemical potential for the inertia counting procedure.
Definition: c_pexsi_interface.h:222
void PPEXSILoadComplexHSMatrix(PPEXSIPlan plan, PPEXSIOptions options, int nrows, int nnz, int nnzLocal, int numColLocal, int *colptrLocal, int *rowindLocal, double *HnzvalLocal, int isSIdentity, double *SnzvalLocal, int *info)
Load the complex H and S matrices into the PEXSI internal data structure. H and S can be either compl...
Definition: interface.cpp:357
int symmetric
Matrix structure.
Definition: c_pexsi_interface.h:291
PPEXSIPlan PPEXSIPlanInitialize(MPI_Comm comm, int numProcRow, int numProcCol, int outputFileIndex, int *info)
Initialize the PEXSI plan.
Definition: interface.cpp:279
double muMax0
Initial guess of upper bound for mu.
Definition: c_pexsi_interface.h:213
void PPEXSILoadRealHSMatrix(PPEXSIPlan plan, PPEXSIOptions options, int nrows, int nnz, int nnzLocal, int numColLocal, int *colptrLocal, int *rowindLocal, double *HnzvalLocal, int isSIdentity, double *SnzvalLocal, int *info)
Load the real H and S matrices into the PEXSI internal data structure. H and S can be either real sym...
Definition: interface.cpp:308
void PPEXSICalculateFermiOperatorComplex(PPEXSIPlan plan, PPEXSIOptions options, double mu, double numElectronExact, double *numElectronPEXSI, double *numElectronDrvMuPEXSI, int *info)
Compute the density matrices and number of electrons for a given chemical potential. Here H and S are complex Hermitian matrices (even though S is real in electronic structure calculation)
Definition: interface.cpp:826
void PPEXSISetDefaultOptions(PPEXSIOptions *options)
Set the default options for DFT driver.
Definition: interface.cpp:251
void PPEXSIGetPoleDM(double *zshift, double *zweight, int Npole, double temp, double gap, double deltaE, double mu)
Pole expansion for density matrix (DM).
Definition: interface.cpp:1209
int transpose
Transpose.
Definition: c_pexsi_interface.h:297
void PPEXSIRetrieveRealDFTMatrix(PPEXSIPlan plan, double *DMnzvalLocal, double *EDMnzvalLocal, double *FDMnzvalLocal, double *totalEnergyH, double *totalEnergyS, double *totalFreeEnergy, int *info)
Retrieve the output matrices after running PPEXSIDFTDriver for real input matrices.
Definition: interface.cpp:1099
void PPEXSIDFTDriver(PPEXSIPlan plan, PPEXSIOptions options, double numElectronExact, double *muPEXSI, double *numElectronPEXSI, double *muMinInertia, double *muMaxInertia, int *numTotalInertiaIter, int *numTotalPEXSIIter, int *info)
Simplified driver for solving Kohn-Sham DFT.
Definition: interface.cpp:987
void PPEXSIInertiaCountComplexMatrix(PPEXSIPlan plan, PPEXSIOptions options, int numShift, double *shiftList, double *inertiaList, int *info)
Directly compute the negative inertia at a set of shifts for complex matrices.
Definition: interface.cpp:740
Structure for the input parameters in DFT calculations.
Definition: c_pexsi_interface.h:180
void PPEXSICalculateFermiOperatorReal(PPEXSIPlan plan, PPEXSIOptions options, double mu, double numElectronExact, double *numElectronPEXSI, double *numElectronDrvMuPEXSI, int *info)
Directly compute the negative inertia at a set of shifts.
Definition: interface.cpp:787
void PPEXSISelInvRealSymmetricMatrix(PPEXSIPlan plan, PPEXSIOptions options, double *AnzvalLocal, double *AinvnzvalLocal, int *info)
Simplified driver interface for computing the selected elements of a real symmetric matrix...
Definition: interface.cpp:866
int npSymbFact
Number of processors for PARMETIS/PT-SCOTCH. Only used if the ordering == 0.
Definition: c_pexsi_interface.h:285
void PPEXSISymbolicFactorizeRealSymmetricMatrix(PPEXSIPlan plan, PPEXSIOptions options, int *info)
Separately perform symbolic factorization to prepare factorization and selected inversion for real ar...
Definition: interface.cpp:405
void ReadDistSparseMatrixFormattedHeadInterface(char *filename, int *size, int *nnz, int *nnzLocal, int *numColLocal, MPI_Comm comm)
Read the sizes of a DistSparseMatrix in formatted form (txt) for allocating memory in C...
Definition: interface.cpp:63
int isInertiaCount
Whether inertia counting is used at the very beginning.
Definition: c_pexsi_interface.h:200
void PPEXSISymbolicFactorizeComplexSymmetricMatrix(PPEXSIPlan plan, PPEXSIOptions options, int *info)
Separately perform symbolic factorization to prepare factorization and selected inversion for complex...
Definition: interface.cpp:551
void ReadDistSparseMatrixHeadInterface(char *filename, int *size, int *nnz, int *nnzLocal, int *numColLocal, MPI_Comm comm)
Read the sizes of a DistSparseMatrix in unformatted form (csc) for allocating memory in C...
Definition: interface.cpp:153
void PPEXSISelInvComplexUnsymmetricMatrix(PPEXSIPlan plan, PPEXSIOptions options, double *AnzvalLocal, double *AinvnzvalLocal, int *info)
Simplified driver interface for computing the selected elements of a complex unsymmetric matrix...
Definition: interface.cpp:956
int maxPEXSIIter
Maximum number of PEXSI iterations after each inertia counting procedure.
Definition: c_pexsi_interface.h:205
void ParaReadDistSparseMatrixInterface(char *filename, int size, int nnz, int nnzLocal, int numColLocal, int *colptrLocal, int *rowindLocal, double *nzvalLocal, MPI_Comm comm)
Actual reading the data of a DistSparseMatrix using MPI-IO, assuming that the arrays have been alloca...
Definition: interface.cpp:214
void PPEXSIGetPoleEDM(double *zshift, double *zweight, int Npole, double temp, double gap, double deltaE, double mu)
Pole expansion for energy density matrix (EDM).
Definition: interface.cpp:1235
void PPEXSISelInvComplexSymmetricMatrix(PPEXSIPlan plan, PPEXSIOptions options, double *AnzvalLocal, double *AinvnzvalLocal, int *info)
Simplified driver interface for computing the selected elements of a complex symmetric matrix...
Definition: interface.cpp:926
double deltaE
An upper bound for the spectral radius of .
Definition: c_pexsi_interface.h:192
void PPEXSIRetrieveComplexDFTMatrix(PPEXSIPlan plan, double *DMnzvalLocal, double *EDMnzvalLocal, double *FDMnzvalLocal, double *totalEnergyH, double *totalEnergyS, double *totalFreeEnergy, int *info)
Retrieve the output matrices after running PPEXSIDFTDriver for complex input matrices.
Definition: interface.cpp:1142
int isSymbolicFactorize
Whether to perform symbolic factorization.
Definition: c_pexsi_interface.h:247
int matrixType
matrixType (global) Type of input H and S matrices.
Definition: c_pexsi_interface.h:243
void PPEXSISelInvRealUnsymmetricMatrix(PPEXSIPlan plan, PPEXSIOptions options, double *AnzvalLocal, double *AinvnzvalLocal, int *info)
Simplified driver interface for computing the selected elements of a real unsymmetric matrix...
Definition: interface.cpp:896
void PPEXSISymbolicFactorizeComplexUnsymmetricMatrix(PPEXSIPlan plan, PPEXSIOptions options, double *AnzvalLocal, int *info)
Separately perform symbolic factorization to prepare factorization and selected inversion for complex...
Definition: interface.cpp:631
double temperature
Temperature, in the same unit as H.
Definition: c_pexsi_interface.h:184
int solver
Solver used to do the factorization prior to the selected inversion.
Definition: c_pexsi_interface.h:259
double gap
Spectral gap. Note This can be set to be 0 in most cases.
Definition: c_pexsi_interface.h:188
void PPEXSISymbolicFactorizeRealUnsymmetricMatrix(PPEXSIPlan plan, PPEXSIOptions options, double *AnzvalLocal, int *info)
Separately perform symbolic factorization to prepare factorization and selected inversion for real ar...
Definition: interface.cpp:486
double muPEXSISafeGuard
Safe guard criterion in terms of the chemical potential to reinvoke the inertia counting procedure...
Definition: c_pexsi_interface.h:232
void PPEXSIDFTDriver2(PPEXSIPlan plan, PPEXSIOptions options, double numElectronExact, double *muPEXSI, double *numElectronPEXSI, double *muMinInertia, double *muMaxInertia, int *numTotalInertiaIter, int *info)
Simplified driver for solving Kohn-Sham DFT. Version 2. This is still in test phase.
Definition: interface.cpp:1044
void PPEXSIGetPoleFDM(double *zshift, double *zweight, int Npole, double temp, double gap, double deltaE, double mu)
Pole expansion for free energy density matrix (FDM).
Definition: interface.cpp:1261
int verbosity
The level of output information.
Definition: c_pexsi_interface.h:304
int numPole
Number of terms in the pole expansion.
Definition: c_pexsi_interface.h:196