76 std::vector<Complex> zshift_;
77 std::vector<Complex> zweightRho_;
78 std::vector<Complex> zweightRhoDrvMu_;
79 std::vector<Complex> zweightRhoDrvT_;
80 std::vector<Complex> zweightHelmholtz_;
81 std::vector<Complex> zweightForce_;
125 bool isMatrixLoaded_;
128 bool isRealSymmetricSymbolicFactorized_;
129 bool isComplexSymmetricSymbolicFactorized_;
130 bool isRealUnsymmetricSymbolicFactorized_;
131 bool isComplexUnsymmetricSymbolicFactorized_;
140 std::vector<Int> diagIdxLocal_;
147 Real totalFreeEnergy_;
159 Int outputFileIndex );
163 void LoadRealSymmetricMatrix(
175 void LoadRealUnsymmetricMatrix(
280 void SelInvRealSymmetricMatrix(
283 double* AinvnzvalLocal );
285 void SelInvRealUnsymmetricMatrix(
288 double* AinvnzvalLocal );
291 void SelInvComplexSymmetricMatrix(
294 double* AinvnzvalLocal );
296 void SelInvComplexUnsymmetricMatrix(
299 double* AinvnzvalLocal );
332 const std::vector<Real>& shiftVec,
333 std::vector<Real>& inertiaVec,
368 Real numElectronExact,
369 Real numElectronTolerance,
372 Real& numElectronDrvMu );
377 Real numElectronExact,
387 Real muInertiaTolerance,
388 Real muInertiaExpansion,
389 Real muPEXSISafeGuard,
390 Real numElectronPEXSITolerance,
392 Int isSymbolicFactorize,
397 Real& numElectronPEXSI,
400 Int& numTotalInertiaIter,
401 Int& numTotalPEXSIIter );
441 Real numElectronExact,
442 Real numElectronTolerance,
448 bool& isPEXSIConverged );
453 Real numElectronExact,
462 Real muInertiaTolerance,
463 Real muInertiaExpansion,
464 Real numElectronPEXSITolerance,
466 Int isSymbolicFactorize,
471 Real& numElectronPEXSI,
474 Int& numTotalInertiaIter );
483 const GridType* GridPole()
const {
return gridPole_;}
508 Real TotalEnergyH()
const {
return totalEnergyH_;}
510 Real TotalEnergyS()
const {
return totalEnergyS_;}
512 Real TotalFreeEnergy()
const {
return totalFreeEnergy_;}
519 #endif // _PPEXSI_HPP_
void DFTDriver2(Real numElectronExact, Real temperature, Real gap, Real deltaE, Int numPole, Int isInertiaCount, Real muMin0, Real muMax0, Real mu0, Real muInertiaTolerance, Real muInertiaExpansion, Real numElectronPEXSITolerance, Int matrixType, Int isSymbolicFactorize, Int ordering, Int numProcSymbFact, Int verbosity, Real &muPEXSI, Real &numElectronPEXSI, Real &muMinInertia, Real &muMaxInertia, Int &numTotalInertiaIter)
Updated main driver for DFT. This reuses the pole expansion and only performs one PEXSI iteration per...
Definition: ppexsi.cpp:2706
A thin interface for passing parameters to set the SuperLU options.
Definition: superlu_dist_internal.hpp:62
const DistSparseMatrix< Real > & FreeEnergyDensityRealMat() const
Total Helmholtz free energy matrix (band energy part only).
Definition: ppexsi.hpp:506
SuperNodeType describes mapping between supernode and column, the permutation information, and potentially the elimination tree (not implemented here).
Definition: pselinv.hpp:166
void SymbolicFactorizeComplexSymmetricMatrix(std::string ColPerm, Int numProcSymbFact, Int verbosity)
Symbolically factorize the loaded matrices for complex arithmetic factorization and selected inversio...
Definition: ppexsi.cpp:727
Interface with SuperLU_Dist (version 3.0 and later)
void DFTDriver(Real numElectronExact, Real temperature, Real gap, Real deltaE, Int numPole, Int isInertiaCount, Int maxPEXSIIter, Real muMin0, Real muMax0, Real mu0, Real muInertiaTolerance, Real muInertiaExpansion, Real muPEXSISafeGuard, Real numElectronPEXSITolerance, Int matrixType, Int isSymbolicFactorize, Int ordering, Int numProcSymbFact, Int verbosity, Real &muPEXSI, Real &numElectronPEXSI, Real &muMinInertia, Real &muMaxInertia, Int &numTotalInertiaIter, Int &numTotalPEXSIIter)
Main driver for solving KSDFT.
Definition: ppexsi.cpp:2198
const DistSparseMatrix< Real > & EnergyDensityRealMat() const
Energy density matrix.
Definition: ppexsi.hpp:496
Main class for parallel PEXSI.
Definition: ppexsi.hpp:70
Main file for parallel selected inversion on unsymmetric matrices.
Main file for parallel selected inversion.
Definition: SuperLUMatrix.hpp:206
void CalculateFermiOperatorReal(Int numPole, Real temperature, Real gap, Real deltaE, Real mu, Real numElectronExact, Real numElectronTolerance, Int verbosity, Real &numElectron, Real &numElectronDrvMu)
Compute the Fermi operator for a given chemical potential for real symmetric matrices.
Definition: ppexsi.cpp:1597
Definition: SuperLUMatrix.hpp:337
Sparse matrix and Distributed sparse matrix in compressed column format.
GridType is the PSelInv way of defining the grid.
Definition: pselinv.hpp:129
Interface with MPI to facilitate communication.
void CalculateNegativeInertiaReal(const std::vector< Real > &shiftVec, std::vector< Real > &inertiaVec, Int verbosity)
Compute the negative inertia (the number of eigenvalues below a shift) for real symmetric matrices...
Definition: ppexsi.cpp:1437
const DistSparseMatrix< Real > & RhoRealMat() const
Density matrix.
Definition: ppexsi.hpp:489
Various utility subroutines.
void SymbolicFactorizeComplexUnsymmetricMatrix(std::string ColPerm, std::string RowPerm, Int numProcSymbFact, Int Transpose, double *AnzvalLocal, Int verbosity)
Symbolically factorize the loaded matrices for complex arithmetic factorization and selected inversio...
Definition: ppexsi.cpp:836
void SymbolicFactorizeRealSymmetricMatrix(std::string ColPerm, Int numProcSymbFact, Int verbosity)
Symbolically factorize the loaded matrices for real arithmetic factorization and selected inversion...
Definition: ppexsi.cpp:475
void CalculateFermiOperatorReal2(Int numPole, Real temperature, Real gap, Real deltaE, Real numElectronExact, Real numElectronTolerance, Real muMinPEXSI, Real muMaxPEXSI, Int verbosity, Real &mu, Real &numElectron, bool &isPEXSIConverged)
Compute the Fermi operator and derivied quantities.
Definition: ppexsi.cpp:3190
Definition: SuperLUGrid.hpp:124
Definition: SuperLUGrid.hpp:111
void SymbolicFactorizeRealUnsymmetricMatrix(std::string ColPerm, std::string RowPerm, Int numProcSymbFact, Int Transpose, double *AnzvalLocal, Int verbosity)
Symbolically factorize the loaded matrices for real arithmetic factorization and selected inversion...
Definition: ppexsi.cpp:588
A thin interface for passing parameters to set the PSelInv options.
Definition: pselinv.hpp:102
Pole expansion subroutines.