DFT-FE 1.1.0-pre
Density Functional Theory With Finite-Elements
Loading...
Searching...
No Matches
excDensityLDAClass.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
18#ifndef DFTFE_EXCDENSIYLDACLASS_H
19#define DFTFE_EXCDENSIYLDACLASS_H
20
21#include <xc.h>
23namespace dftfe
24{
25 class NNLDA;
26 template <dftfe::utils::MemorySpace memorySpace>
28 {
29 public:
30 excDensityLDAClass(std::shared_ptr<xc_func_type> funcXPtr,
31 std::shared_ptr<xc_func_type> funcCPtr);
32
33 excDensityLDAClass(std::shared_ptr<xc_func_type> funcXPtr,
34 std::shared_ptr<xc_func_type> funcCPtr,
35 std::string modelXCInputFile);
36
38
39
40
41 void
43 AuxDensityMatrix<memorySpace> &auxDensityMatrix,
44 const std::pair<dftfe::uInt, dftfe::uInt> &quadIndexRange,
45 std::unordered_map<xcRemainderOutputDataAttributes, std::vector<double>>
46 &xDataOut,
47 std::unordered_map<xcRemainderOutputDataAttributes, std::vector<double>>
48 &cDataout) const override;
49 void
51 const std::vector<xcRemainderOutputDataAttributes> &outputDataAttributes)
52 const override;
53
54 void
57 &src,
59 const dftfe::uInt inputVecSize,
60 const dftfe::uInt kPointIndex,
61 const dftfe::uInt spinIndex) override;
62
63
64 /*
65 * @brief The apply function that will be called in HXCheby() with single precision.
66 * The distribute() and updateGhostValues() for src
67 * has to be called before this function.
68 * Similarly for dst, accumulateLocallyOwned() should be called in HX()
69 * after this function is called. param[in] src The input vector param[out]
70 * dst The output vector param[in] inputVecSize The size of the input vector
71 * param[in] kPointIndex the k point for which the HX() is called
72 * param[in] spinIndex the spin index for which the HX() is called
73 */
74 void
77 memorySpace> &src,
79 &dst,
80 const dftfe::uInt inputVecSize,
81 const dftfe::uInt kPointIndex,
82 const dftfe::uInt spinIndex) override;
83
84 void
86 const std::shared_ptr<AuxDensityMatrix<memorySpace>> &auxDensityMatrixPtr,
87 const std::vector<double> &kPointWeights) override;
88 void
90 const std::shared_ptr<AuxDensityMatrix<memorySpace>> &auxDensityMatrix,
91 const std::vector<double> &kPointWeights) override;
92
93 double
95
96 double
98
99 void
101
102 private:
104 std::shared_ptr<xc_func_type> d_funcXPtr;
105 std::shared_ptr<xc_func_type> d_funcCPtr;
106 };
107} // namespace dftfe
108
109#endif // DFTFE_EXCDENSIYLDACLASS_H
Definition AuxDensityMatrix.h:40
ExcSSDFunctionalBaseClass(const ExcFamilyType excFamType, const densityFamilyType densityFamType, const std::vector< DensityDescriptorDataAttributes > &densityDescriptorAttributesList)
Definition ExcSSDFunctionalBaseClass.t.cc:25
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
double getExpectationOfWaveFunctionDependentExcFuncDerWrtPsi() override
excDensityLDAClass(std::shared_ptr< xc_func_type > funcXPtr, std::shared_ptr< xc_func_type > funcCPtr, std::string modelXCInputFile)
void checkInputOutputDataAttributesConsistency(const std::vector< xcRemainderOutputDataAttributes > &outputDataAttributes) const 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 excDensityLDAClass.h:104
void computeRhoTauDependentXCData(AuxDensityMatrix< memorySpace > &auxDensityMatrix, const std::pair< dftfe::uInt, dftfe::uInt > &quadIndexRange, std::unordered_map< xcRemainderOutputDataAttributes, std::vector< double > > &xDataOut, std::unordered_map< xcRemainderOutputDataAttributes, std::vector< double > > &cDataout) const override
void reinitKPointDependentVariables(dftfe::uInt kPointIndex) override
excDensityLDAClass(std::shared_ptr< xc_func_type > funcXPtr, std::shared_ptr< xc_func_type > funcCPtr)
NNLDA * d_NNLDAPtr
Definition excDensityLDAClass.h:103
void computeWaveFunctionDependentExcEnergy(const std::shared_ptr< AuxDensityMatrix< memorySpace > > &auxDensityMatrix, const std::vector< double > &kPointWeights) override
void updateWaveFunctionDependentFuncDerWrtPsi(const std::shared_ptr< AuxDensityMatrix< memorySpace > > &auxDensityMatrixPtr, const std::vector< double > &kPointWeights) override
std::shared_ptr< xc_func_type > d_funcCPtr
Definition excDensityLDAClass.h:105
double getWaveFunctionDependentExcEnergy() 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:43
Definition pseudoPotentialToDftfeConverter.cc:34
xcRemainderOutputDataAttributes
Definition ExcSSDFunctionalBaseClass.h:58
std::uint32_t uInt
Definition TypeConfig.h:10