50 #ifndef _PEXSI_C_PEXSI_INTERFACE_H_
51 #define _PEXSI_C_PEXSI_INTERFACE_H_
653 double numElectronExact,
654 double* numElectronPEXSI,
655 double* numElectronDrvMuPEXSI,
680 double* AinvnzvalLocal,
708 double* AinvnzvalLocal,
733 double* AinvnzvalLocal,
761 double* AinvnzvalLocal,
849 double numElectronExact,
851 double* numElectronPEXSI,
852 double* muMinInertia,
853 double* muMaxInertia,
854 int* numTotalInertiaIter,
855 int* numTotalPEXSIIter,
878 double* DMnzvalLocal,
879 double* EDMnzvalLocal,
880 double* FDMnzvalLocal,
881 double* totalEnergyH,
882 double* totalEnergyS,
883 double* totalFreeEnergy,
907 #endif // _PEXSI_C_PEXSI_INTERFACE_H_
void PPEXSIInertiaCountRealSymmetricMatrix(PPEXSIPlan plan, PPEXSIOptions options, int numShift, double *shiftList, double *inertiaList, int *info)
Directly compute the negative inertia at a set of shifts.
Definition: interface.cpp:644
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:123
void PPEXSILoadRealSymmetricHSMatrix(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 symmetric H and S matrices into the PEXSI internal data structure.
Definition: interface.cpp:319
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:1019
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:262
int rowOrdering
row permutation strategy for factorization and selected inversion.
Definition: c_pexsi_interface.h:271
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
int symmetric
Matrix structure.
Definition: c_pexsi_interface.h:282
PPEXSIPlan PPEXSIPlanInitialize(MPI_Comm comm, int numProcRow, int numProcCol, int outputFileIndex, int *info)
Initialize the PEXSI plan.
Definition: interface.cpp:287
double muMax0
Initial guess of upper bound for mu.
Definition: c_pexsi_interface.h:213
void PPEXSISetDefaultOptions(PPEXSIOptions *options)
Set the default options for DFT driver.
Definition: interface.cpp:260
int transpose
Transpose.
Definition: c_pexsi_interface.h:288
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:911
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:739
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:782
int npSymbFact
Number of processors for PARMETIS/PT-SCOTCH. Only used if the ordering == 0.
Definition: c_pexsi_interface.h:276
void PPEXSISymbolicFactorizeRealSymmetricMatrix(PPEXSIPlan plan, PPEXSIOptions options, int *info)
Separately perform symbolic factorization to prepare factorization and selected inversion for real ar...
Definition: interface.cpp:420
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:533
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:156
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:878
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:223
void PPEXSILoadRealUnsymmetricHSMatrix(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 unsymmetric H and S matrices into the PEXSI internal data structure.
Definition: interface.cpp:368
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:846
double deltaE
An upper bound for the spectral radius of .
Definition: c_pexsi_interface.h:192
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:814
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:579
double temperature
Temperature, in the same unit as H.
Definition: c_pexsi_interface.h:184
void PPEXSIRetrieveRealSymmetricDFTMatrix(PPEXSIPlan plan, double *DMnzvalLocal, double *EDMnzvalLocal, double *FDMnzvalLocal, double *totalEnergyH, double *totalEnergyS, double *totalFreeEnergy, int *info)
Retrieve the output matrices after running PPEXSIDFTDriver.
Definition: interface.cpp:972
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:466
double muPEXSISafeGuard
Safe guard criterion in terms of the chemical potential to reinvoke the inertia counting procedure...
Definition: c_pexsi_interface.h:232
int verbosity
The level of output information.
Definition: c_pexsi_interface.h:295
int numPole
Number of terms in the pole expansion.
Definition: c_pexsi_interface.h:196