DFT-FE 1.1.0-pre
Density Functional Theory With Finite-Elements
Loading...
Searching...
No Matches
excDensityGGAClass.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (c) 2017-2025 The Regents of the University of Michigan and DFT-FE
4// authors.
5//
6// This file is part of the DFT-FE code.
7//
8// The DFT-FE code is free software; you can use it, redistribute
9// it, and/or modify it under the terms of the GNU Lesser General
10// Public License as published by the Free Software Foundation; either
11// version 2.1 of the License, or (at your option) any later version.
12// The full text of the license can be found in the file LICENSE at
13// the top level of the DFT-FE distribution.
14//
15// ---------------------------------------------------------------------
16//
17#ifndef DFTFE_EXCDENSITYGGACLASS_H
18#define DFTFE_EXCDENSITYGGACLASS_H
19
20#include <xc.h>
22namespace dftfe
23{
24 class NNGGA;
25 template <dftfe::utils::MemorySpace memorySpace>
27 {
28 public:
29 excDensityGGAClass(std::shared_ptr<xc_func_type> funcXPtr,
30 std::shared_ptr<xc_func_type> funcCPtr);
31
32
33 excDensityGGAClass(std::shared_ptr<xc_func_type> funcXPtr,
34 std::shared_ptr<xc_func_type> funcCPtr,
35 std::string modelXCInputFile);
36
37
39
40 void
42 AuxDensityMatrix<memorySpace> &auxDensityMatrix,
43 const std::vector<double> & quadPoints,
44 std::unordered_map<xcRemainderOutputDataAttributes, std::vector<double>>
45 &xDataOut,
46 std::unordered_map<xcRemainderOutputDataAttributes, std::vector<double>>
47 &cDataout) const override;
48
49 void
51 const std::vector<xcRemainderOutputDataAttributes> &outputDataAttributes)
52 const override;
53
54 void
57 & src,
59 const unsigned int inputVecSize,
60 const unsigned int kPointIndex,
61 const unsigned int spinIndex) override;
62
63 /*
64 * @brief The apply function that will be called in HXCheby() with single precision.
65 * The distribute() and updateGhostValues() for src
66 * has to be called before this function.
67 * Similarly for dst, accumulateLocallyOwned() should be called in HX()
68 * after this function is called. param[in] src The input vector param[out]
69 * dst The output vector param[in] inputVecSize The size of the input vector
70 * param[in] kPointIndex the k point for which the HX() is called
71 * param[in] spinIndex the spin index for which the HX() is called
72 */
73 void
76 memorySpace> &src,
78 & dst,
79 const unsigned int inputVecSize,
80 const unsigned int kPointIndex,
81 const unsigned int spinIndex) override;
82
83 void
85 const std::shared_ptr<AuxDensityMatrix<memorySpace>> &auxDensityMatrixPtr,
86 const std::vector<double> &kPointWeights) override;
87 void
89 const std::shared_ptr<AuxDensityMatrix<memorySpace>> &auxDensityMatrix,
90 const std::vector<double> &kPointWeights) override;
91
92 double
94
95 double
97
98 void
99 reinitKPointDependentVariables(unsigned int kPointIndex) override;
100
101 private:
102 NNGGA * d_NNGGAPtr;
103 std::shared_ptr<xc_func_type> d_funcXPtr;
104 std::shared_ptr<xc_func_type> d_funcCPtr;
105 std::vector<double> d_spacingFDStencil;
107 };
108} // namespace dftfe
109#endif // DFTFE_EXCDENSITYGGACLASS_H
Definition AuxDensityMatrix.h:33
ExcSSDFunctionalBaseClass(const ExcFamilyType excFamType, const densityFamilyType densityFamType, const std::vector< DensityDescriptorDataAttributes > &densityDescriptorAttributesList)
Definition ExcSSDFunctionalBaseClass.t.cc:25
unsigned int d_vxcDivergenceTermFDStencilSize
Definition excDensityGGAClass.h:106
void checkInputOutputDataAttributesConsistency(const std::vector< xcRemainderOutputDataAttributes > &outputDataAttributes) const override
NNGGA * d_NNGGAPtr
Definition excDensityGGAClass.h:102
void computeRhoTauDependentXCData(AuxDensityMatrix< memorySpace > &auxDensityMatrix, const std::vector< double > &quadPoints, std::unordered_map< xcRemainderOutputDataAttributes, std::vector< double > > &xDataOut, std::unordered_map< xcRemainderOutputDataAttributes, std::vector< double > > &cDataout) const override
std::shared_ptr< xc_func_type > d_funcCPtr
Definition excDensityGGAClass.h:104
excDensityGGAClass(std::shared_ptr< xc_func_type > funcXPtr, std::shared_ptr< xc_func_type > funcCPtr)
excDensityGGAClass(std::shared_ptr< xc_func_type > funcXPtr, std::shared_ptr< xc_func_type > funcCPtr, std::string modelXCInputFile)
void updateWaveFunctionDependentFuncDerWrtPsi(const std::shared_ptr< AuxDensityMatrix< memorySpace > > &auxDensityMatrixPtr, const std::vector< double > &kPointWeights) override
void computeWaveFunctionDependentExcEnergy(const std::shared_ptr< AuxDensityMatrix< memorySpace > > &auxDensityMatrix, const std::vector< double > &kPointWeights) override
std::vector< double > d_spacingFDStencil
Definition excDensityGGAClass.h:105
std::shared_ptr< xc_func_type > d_funcXPtr
Definition excDensityGGAClass.h:103
void applyWaveFunctionDependentFuncDerWrtPsi(const dftfe::linearAlgebra::MultiVector< dataTypes::number, memorySpace > &src, dftfe::linearAlgebra::MultiVector< dataTypes::number, memorySpace > &dst, const unsigned int inputVecSize, const unsigned int kPointIndex, const unsigned int spinIndex) override
void reinitKPointDependentVariables(unsigned int kPointIndex) override
double getWaveFunctionDependentExcEnergy() override
void applyWaveFunctionDependentFuncDerWrtPsi(const dftfe::linearAlgebra::MultiVector< dataTypes::numberFP32, memorySpace > &src, dftfe::linearAlgebra::MultiVector< dataTypes::numberFP32, memorySpace > &dst, const unsigned int inputVecSize, const unsigned int kPointIndex, const unsigned int spinIndex) override
double getExpectationOfWaveFunctionDependentExcFuncDerWrtPsi() override
An class template to encapsulate a MultiVector. A MultiVector is a collection of vectors belonging t...
Definition MultiVector.h:127
float numberFP32
Definition dftfeDataTypes.h:45
Definition pseudoPotentialToDftfeConverter.cc:34
xcRemainderOutputDataAttributes
Definition ExcSSDFunctionalBaseClass.h:51