67 #include <sympack.hpp>
68 #include "pexsi/sympack_interf.hpp"
83 std::vector<Complex> zshift_;
84 std::vector<Complex> zweightRho_;
85 std::vector<Complex> zweightRhoDrvMu_;
86 std::vector<Complex> zweightRhoDrvT_;
87 std::vector<Complex> zweightHelmholtz_;
88 std::vector<Complex> zweightForce_;
138 symPACK::symPACKMatrix<Real>* symPACKRealMat_;
139 symPACK::symPACKMatrix<Complex>* symPACKComplexMat_;
140 symPACK::symPACKOptions symPACKOpt_;
143 symPACK::DistSparseMatrix<Real> symmPatternMat_;
145 symPACK::DistSparseMatrix<Real> symmHRealMat_;
146 symPACK::DistSparseMatrix<Real> symmSRealMat_;
148 symPACK::DistSparseMatrix<Complex> symmHComplexMat_;
149 symPACK::DistSparseMatrix<Complex> symmSComplexMat_;
151 symPACK::DistSparseMatrix<Real> symmShiftRealMat_;
152 symPACK::DistSparseMatrix<Complex> symmShiftComplexMat_;
154 symPACK::DistSparseMatrix<Real> symmShiftInvRealMat_;
155 symPACK::DistSparseMatrix<Complex> symmShiftInvComplexMat_;
169 bool isMatrixLoaded_;
172 bool isRealSymmetricSymbolicFactorized_;
173 bool isComplexSymmetricSymbolicFactorized_;
174 bool isRealUnsymmetricSymbolicFactorized_;
175 bool isComplexUnsymmetricSymbolicFactorized_;
184 std::vector<Int> diagIdxLocal_;
191 Real totalFreeEnergy_;
203 Int outputFileIndex );
221 void LoadComplexMatrix(
228 Complex* HnzvalLocal,
230 Complex* SnzvalLocal,
339 void SelInvRealSymmetricMatrix(
343 double* AinvnzvalLocal );
345 void SelInvRealUnsymmetricMatrix(
349 double* AinvnzvalLocal );
352 void SelInvComplexSymmetricMatrix(
356 double* AinvnzvalLocal );
358 void SelInvComplexUnsymmetricMatrix(
362 double* AinvnzvalLocal );
395 const std::vector<Real>& shiftVec,
396 std::vector<Real>& inertiaVec,
429 const std::vector<Real>& shiftVec,
430 std::vector<Real>& inertiaVec,
467 Real numElectronExact,
468 Real numElectronTolerance,
472 Real& numElectronDrvMu );
506 Real numElectronExact,
507 Real numElectronTolerance,
511 Real& numElectronDrvMu );
517 Real numElectronExact,
527 Real muInertiaTolerance,
528 Real muInertiaExpansion,
529 Real muPEXSISafeGuard,
530 Real numElectronPEXSITolerance,
532 Int isSymbolicFactorize,
538 Real& numElectronPEXSI,
541 Int& numTotalInertiaIter,
542 Int& numTotalPEXSIIter );
582 Real numElectronExact,
583 Real numElectronTolerance,
590 bool& isPEXSIConverged );
595 Real numElectronExact,
604 Real muInertiaTolerance,
605 Real muInertiaExpansion,
606 Real numElectronPEXSITolerance,
608 Int isSymbolicFactorize,
614 Real& numElectronPEXSI,
617 Int& numTotalInertiaIter );
626 const GridType* GridPole()
const {
return gridPole_;}
655 Real TotalEnergyH()
const {
return totalEnergyH_;}
657 Real TotalEnergyS()
const {
return totalEnergyS_;}
659 Real TotalFreeEnergy()
const {
return totalFreeEnergy_;}
666 #endif // _PPEXSI_HPP_
A thin interface for passing parameters to set the Factorization options.
Definition: pselinv.hpp:115
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:652
void SymbolicFactorizeRealUnsymmetricMatrix(Int solver, 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:988
SuperNodeType describes mapping between supernode and column, the permutation information, and potentially the elimination tree (not implemented here).
Definition: pselinv.hpp:177
Interface with SuperLU_Dist (version 3.0 and later)
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 solver, 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:4238
const DistSparseMatrix< Real > & EnergyDensityRealMat() const
Energy density matrix.
Definition: ppexsi.hpp:641
void CalculateNegativeInertiaReal(const std::vector< Real > &shiftVec, std::vector< Real > &inertiaVec, Int solver, Int verbosity)
Compute the negative inertia (the number of eigenvalues below a shift) for real symmetric matrices...
Definition: ppexsi.cpp:2111
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 solver, 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:3759
Main class for parallel PEXSI.
Definition: ppexsi.hpp:77
Main file for parallel selected inversion on unsymmetric matrices.
Main file for parallel selected inversion.
Definition: SuperLUMatrix.hpp:206
void CalculateNegativeInertiaComplex(const std::vector< Real > &shiftVec, std::vector< Real > &inertiaVec, Int solver, Int verbosity)
Compute the negative inertia (the number of eigenvalues below a shift) for complex Hermitian matrices...
Definition: ppexsi.cpp:2258
void CalculateFermiOperatorComplex(Int numPole, Real temperature, Real gap, Real deltaE, Real mu, Real numElectronExact, Real numElectronTolerance, Int solver, Int verbosity, Real &numElectron, Real &numElectronDrvMu)
Compute the Fermi operator for a given chemical potential for complex Hermitian matrices.
Definition: ppexsi.cpp:3051
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:140
Interface with MPI to facilitate communication.
const DistSparseMatrix< Real > & RhoRealMat() const
Density matrix.
Definition: ppexsi.hpp:633
Various utility subroutines.
void SymbolicFactorizeComplexUnsymmetricMatrix(Int solver, 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:1353
void SymbolicFactorizeRealSymmetricMatrix(Int solver, std::string ColPerm, Int numProcSymbFact, Int verbosity)
Symbolically factorize the loaded matrices for real arithmetic factorization and selected inversion...
Definition: ppexsi.cpp:785
Definition: SuperLUGrid.hpp:124
Definition: SuperLUGrid.hpp:111
A thin interface for passing parameters to set the PSelInv options.
Definition: pselinv.hpp:102
void SymbolicFactorizeComplexSymmetricMatrix(Int solver, std::string ColPerm, Int numProcSymbFact, Int verbosity)
Symbolically factorize the loaded matrices for complex arithmetic factorization and selected inversio...
Definition: ppexsi.cpp:1156
void CalculateFermiOperatorReal2(Int numPole, Real temperature, Real gap, Real deltaE, Real numElectronExact, Real numElectronTolerance, Real muMinPEXSI, Real muMaxPEXSI, Int solver, Int verbosity, Real &mu, Real &numElectron, bool &isPEXSIConverged)
Compute the Fermi operator and derivied quantities.
Definition: ppexsi.cpp:4693
void CalculateFermiOperatorReal(Int numPole, Real temperature, Real gap, Real deltaE, Real mu, Real numElectronExact, Real numElectronTolerance, Int solver, Int verbosity, Real &numElectron, Real &numElectronDrvMu)
Compute the Fermi operator for a given chemical potential for real symmetric matrices.
Definition: ppexsi.cpp:2405
Pole expansion subroutines.