-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged in ML-XC-LLmetaGGA (pull request #580)
XC refactoring Approved-by: Nikhil Kodali Approved-by: Phani Motamarri
- Loading branch information
Showing
222 changed files
with
6,703 additions
and
4,076 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
// | ||
// Created by Sambit Das. | ||
// | ||
|
||
#ifndef DFTFE_AUXDM_AUXDENSITYFE_H | ||
#define DFTFE_AUXDM_AUXDENSITYFE_H | ||
|
||
#include <vector> | ||
#include <utility> | ||
#include <AuxDensityMatrix.h> | ||
|
||
namespace dftfe | ||
{ | ||
class AuxDensityFE : public AuxDensityMatrix | ||
{ | ||
public: | ||
// CAUTION: points have to be a contiguous subset of d_quadPointsSet | ||
void | ||
applyLocalOperations( | ||
const std::vector<double> &points, | ||
std::unordered_map<DensityDescriptorDataAttributes, std::vector<double>> | ||
&densityData) override; | ||
|
||
void | ||
evalOverlapMatrixStart(const std::vector<double> &quadpts, | ||
const std::vector<double> &quadWt) override; | ||
|
||
void | ||
evalOverlapMatrixEnd(const MPI_Comm &mpiComm) override; | ||
|
||
void | ||
projectDensityMatrixStart( | ||
std::unordered_map<std::string, std::vector<double>> &projectionInputs, | ||
int iSpin) override; | ||
|
||
void | ||
projectDensityMatrixEnd(const MPI_Comm &mpiComm) override; | ||
|
||
/** | ||
* @brief Projects the quadrature density to aux basis (L2 projection). | ||
* This is actually a copy call. All the local partition quadrature points | ||
* must to be passed to this function in one go | ||
* | ||
* @param projectionInputs is a map from string to inputs needed | ||
* for projection. | ||
* projectionInputs["quadpts"], | ||
* projectionInputs["quadWt"], | ||
* projectionInputs["densityFunc"] | ||
* projectionInputs["gradDensityFunc"] | ||
* | ||
* densityFunc The density Values at quad points | ||
* densityFunc(spin_index, quad_index), | ||
* quad_index is fastest. | ||
* | ||
* gradDensityFunc The density Values at quad points | ||
* gradDensityFunc(spin_index, quad_index,dim_index), | ||
* dim_index is fastest. | ||
* | ||
*/ | ||
void | ||
projectDensityStart(std::unordered_map<std::string, std::vector<double>> | ||
&projectionInputs) override; | ||
|
||
void | ||
projectDensityEnd(const MPI_Comm &mpiComm) override; | ||
|
||
|
||
private: | ||
std::vector<double> d_densityValsTotalAllQuads; | ||
std::vector<double> d_densityValsSpinUpAllQuads; | ||
std::vector<double> d_densityValsSpinDownAllQuads; | ||
std::vector<double> d_gradDensityValsSpinUpAllQuads; | ||
std::vector<double> d_gradDensityValsSpinDownAllQuads; | ||
std::vector<double> d_quadPointsAll; | ||
std::vector<double> d_quadWeightsAll; | ||
}; | ||
} // namespace dftfe | ||
|
||
#endif // DFTFE_AUXDM_AUXDENSITYFE_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
// | ||
// Created by Arghadwip Paul. | ||
// | ||
|
||
#ifndef DFTFE_AUXDM_AUXDENSITYMATRIX_H | ||
#define DFTFE_AUXDM_AUXDENSITYMATRIX_H | ||
|
||
#include <vector> | ||
#include <utility> | ||
#include <map> | ||
#include <string> | ||
#include <unordered_map> | ||
#include <mpi.h> | ||
|
||
namespace dftfe | ||
{ | ||
enum class DensityDescriptorDataAttributes | ||
{ | ||
valuesTotal, | ||
valuesSpinUp, | ||
valuesSpinDown, | ||
gradValuesSpinUp, | ||
gradValuesSpinDown, | ||
hessianSpinUp, | ||
hessianSpinDown, | ||
laplacianSpinUp, | ||
laplacianSpinDown | ||
}; | ||
|
||
class AuxDensityMatrix | ||
{ | ||
public: | ||
/** | ||
* @brief compute local descriptors of the aux basis electron-density | ||
* representation at the supplied set of points using | ||
*/ | ||
virtual void | ||
applyLocalOperations( | ||
const std::vector<double> &Points, | ||
std::unordered_map<DensityDescriptorDataAttributes, std::vector<double>> | ||
&densityData) = 0; | ||
|
||
/** | ||
* @brief Compute aux basis overlap matrix batchwise contribution from | ||
* supplied set of quadrature points and their associated weights | ||
*/ | ||
virtual void | ||
evalOverlapMatrixStart(const std::vector<double> &quadpts, | ||
const std::vector<double> &quadWt) = 0; | ||
|
||
/** | ||
* @brief for MPI accumulation | ||
*/ | ||
virtual void | ||
evalOverlapMatrixEnd(const MPI_Comm &mpiComm) = 0; | ||
|
||
/** | ||
* @brief Projects the KS density matrix to aux basis (L2 projection) batch wise | ||
*/ | ||
virtual void | ||
projectDensityMatrixStart( | ||
std::unordered_map<std::string, std::vector<double>> &projectionInputs, | ||
int iSpin) = 0; | ||
|
||
/** | ||
* @brief for MPI accumulation | ||
*/ | ||
virtual void | ||
projectDensityMatrixEnd(const MPI_Comm &mpiComm) = 0; | ||
|
||
|
||
/** | ||
* @brief Projects the quadrature density to aux basis (L2 projection) batch wise | ||
*/ | ||
virtual void | ||
projectDensityStart(std::unordered_map<std::string, std::vector<double>> | ||
&projectionInputs) = 0; | ||
|
||
/** | ||
* @brief for MPI accumulation | ||
*/ | ||
virtual void | ||
projectDensityEnd(const MPI_Comm &mpiComm) = 0; | ||
}; | ||
} // namespace dftfe | ||
|
||
#endif // DFTFE_AUXDM_AUXDENSITYMATRIX_H |
Oops, something went wrong.