DFT-FE 1.3.0-pre
Density Functional Theory With Finite-Elements
Loading...
Searching...
No Matches
excDensityLLMGGAClass.h
Go to the documentation of this file.
1//
2// Created by Arghadwip Paul.
3//
4
5#ifndef DFTFE_EXCDENSITYLLMGGACLASS_H
6#define DFTFE_EXCDENSITYLLMGGACLASS_H
7
8#include <xc.h>
10namespace dftfe
11{
12 class NNLLMGGA;
13 template <dftfe::utils::MemorySpace memorySpace>
15 {
16 public:
17 excDensityLLMGGAClass(std::shared_ptr<xc_func_type> &funcXPtr,
18 std::shared_ptr<xc_func_type> &funcCPtr,
19 const bool useLibXC);
20
21 excDensityLLMGGAClass(std::shared_ptr<xc_func_type> &funcXPtr,
22 std::shared_ptr<xc_func_type> &funcCPtr,
23 std::string modelXCInputFile,
24 const bool useLibXC);
25
27
28
29 void
31 AuxDensityMatrix<memorySpace> &auxDensityMatrix,
32 const std::pair<dftfe::uInt, dftfe::uInt> &quadIndexRange,
33 std::unordered_map<
36 &xDataOut,
37 std::unordered_map<
40 &cDataout) const override;
41
42 void
44 const std::vector<xcRemainderOutputDataAttributes> &outputDataAttributes)
45 const override;
46
47 void
50 &src,
52 const dftfe::uInt inputVecSize,
53 const dftfe::uInt kPointIndex,
54 const dftfe::uInt spinIndex) override;
55
56 /*
57 * @brief The apply function that will be called in HXCheby() with single precision.
58 * The distribute() and updateGhostValues() for src
59 * has to be called before this function.
60 * Similarly for dst, accumulateLocallyOwned() should be called in HX()
61 * after this function is called. param[in] src The input vector param[out]
62 * dst The output vector param[in] inputVecSize The size of the input vector
63 * param[in] kPointIndex the k point for which the HX() is called
64 * param[in] spinIndex the spin index for which the HX() is called
65 */
66 void
69 memorySpace> &src,
71 &dst,
72 const dftfe::uInt inputVecSize,
73 const dftfe::uInt kPointIndex,
74 const dftfe::uInt spinIndex) override;
75
76 void
78 const std::shared_ptr<AuxDensityMatrix<memorySpace>> &auxDensityMatrixPtr,
79 const std::vector<double> &kPointWeights) override;
80 void
82 const std::shared_ptr<AuxDensityMatrix<memorySpace>> &auxDensityMatrix,
83 const std::vector<double> &kPointWeights) override;
84
85 double
87
88 double
90
91 void
93
94 private:
95 NNLLMGGA *d_NNLLMGGAPtr;
96 std::shared_ptr<xc_func_type> d_funcXPtr;
97 std::shared_ptr<xc_func_type> d_funcCPtr;
98 std::vector<double> d_spacingFDStencil;
100 bool d_useLibXC; ///< Flag to indicate whether to use libxc or not
101 };
102} // namespace dftfe
103#endif // DFTFE_EXCDENSITYLLMGGACLASS_H
Definition AuxDensityMatrix.h:40
ExcSSDFunctionalBaseClass(const ExcFamilyType excFamType, const densityFamilyType densityFamType, const std::vector< DensityDescriptorDataAttributes > &densityDescriptorAttributesList)
Definition ExcSSDFunctionalBaseClass.t.cc:25
void updateWaveFunctionDependentFuncDerWrtPsi(const std::shared_ptr< AuxDensityMatrix< memorySpace > > &auxDensityMatrixPtr, const std::vector< double > &kPointWeights) override
dftfe::uInt d_vxcDivergenceTermFDStencilSize
Definition excDensityLLMGGAClass.h:99
double getWaveFunctionDependentExcEnergy() override
void applyWaveFunctionDependentFuncDerWrtPsi(const dftfe::linearAlgebra::MultiVector< dataTypes::number, memorySpace > &src, dftfe::linearAlgebra::MultiVector< dataTypes::number, memorySpace > &dst, const dftfe::uInt inputVecSize, const dftfe::uInt kPointIndex, const dftfe::uInt spinIndex) override
std::shared_ptr< xc_func_type > d_funcXPtr
Definition excDensityLLMGGAClass.h:96
NNLLMGGA * d_NNLLMGGAPtr
Definition excDensityLLMGGAClass.h:95
std::vector< double > d_spacingFDStencil
Definition excDensityLLMGGAClass.h:98
void applyWaveFunctionDependentFuncDerWrtPsi(const dftfe::linearAlgebra::MultiVector< dataTypes::numberFP32, memorySpace > &src, dftfe::linearAlgebra::MultiVector< dataTypes::numberFP32, memorySpace > &dst, const dftfe::uInt inputVecSize, const dftfe::uInt kPointIndex, const dftfe::uInt spinIndex) override
std::shared_ptr< xc_func_type > d_funcCPtr
Definition excDensityLLMGGAClass.h:97
void checkInputOutputDataAttributesConsistency(const std::vector< xcRemainderOutputDataAttributes > &outputDataAttributes) const override
void computeWaveFunctionDependentExcEnergy(const std::shared_ptr< AuxDensityMatrix< memorySpace > > &auxDensityMatrix, const std::vector< double > &kPointWeights) override
void computeRhoTauDependentXCData(AuxDensityMatrix< memorySpace > &auxDensityMatrix, const std::pair< dftfe::uInt, dftfe::uInt > &quadIndexRange, std::unordered_map< xcRemainderOutputDataAttributes, dftfe::utils::MemoryStorage< double, dftfe::utils::MemorySpace::HOST > > &xDataOut, std::unordered_map< xcRemainderOutputDataAttributes, dftfe::utils::MemoryStorage< double, dftfe::utils::MemorySpace::HOST > > &cDataout) const override
excDensityLLMGGAClass(std::shared_ptr< xc_func_type > &funcXPtr, std::shared_ptr< xc_func_type > &funcCPtr, const bool useLibXC)
void reinitKPointDependentVariables(dftfe::uInt kPointIndex) override
bool d_useLibXC
Flag to indicate whether to use libxc or not.
Definition excDensityLLMGGAClass.h:100
excDensityLLMGGAClass(std::shared_ptr< xc_func_type > &funcXPtr, std::shared_ptr< xc_func_type > &funcCPtr, std::string modelXCInputFile, const bool useLibXC)
double getExpectationOfWaveFunctionDependentExcFuncDerWrtPsi() override
An class template to encapsulate a MultiVector. A MultiVector is a collection of vectors belonging t...
Definition MultiVector.h:127
Definition MemoryStorage.h:33
float numberFP32
Definition dftfeDataTypes.h:41
Definition pseudoPotentialToDftfeConverter.cc:34
xcRemainderOutputDataAttributes
Definition ExcSSDFunctionalBaseClass.h:58
std::uint32_t uInt
Definition TypeConfig.h:10