DFT-EFE
 
Loading...
Searching...
No Matches
ExchangeCorrelationFE.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (c) 2021. *
3 * The Regents of the University of Michigan and DFT-EFE developers. *
4 * *
5 * This file is part of the DFT-EFE code. *
6 * *
7 * DFT-EFE is free software: you can redistribute it and/or modify *
8 * it under the terms of the Lesser GNU General Public License as *
9 * published by the Free Software Foundation, either version 3 of *
10 * the License, or (at your option) any later version. *
11 * *
12 * DFT-EFE is distributed in the hope that it will be useful, but *
13 * WITHOUT ANY WARRANTY; without even the implied warranty *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
15 * See the Lesser GNU General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU Lesser General Public *
18 * License at the top level of DFT-EFE distribution. If not, see *
19 * <https://www.gnu.org/licenses/>. *
20 ******************************************************************************/
21
22/*
23 * @author Avirup Sircar
24 */
25
26#ifndef dftefeExchangeCorrelationFE_h
27#define dftefeExchangeCorrelationFE_h
28
30#include <ksdft/Hamiltonian.h>
31#include <ksdft/Energy.h>
35#include <ksdft/Defaults.h>
36#include <xc.h>
37
38namespace dftefe
39{
40 namespace ksdft
41 {
42 template <typename ValueTypeBasisData,
43 typename ValueTypeBasisCoeff,
44 utils::MemorySpace memorySpace,
45 size_type dim>
47 : public Hamiltonian<ValueTypeBasisData, memorySpace>,
48 public Energy<linearAlgebra::blasLapack::real_type<
49 linearAlgebra::blasLapack::scalar_type<ValueTypeBasisData,
50 ValueTypeBasisCoeff>>>
51 {
52 public:
53 using ValueType =
55 ValueTypeBasisCoeff>;
56
58
60
61 public:
67 &electronChargeDensity,
68 std::shared_ptr<
70 feBasisDataStorage,
72 linAlgOpContext,
73 const size_type cellBlockSize);
74
76
77 void
79 std::shared_ptr<
81 feBasisDataStorage);
82
83 void
86 &electronChargeDensity);
87
88 void
89 getLocal(Storage &cellWiseStorage) const override;
90
91 void
93
95 getEnergy() const override;
96
97 private:
98 std::shared_ptr<
103 std::shared_ptr<
106 std::shared_ptr<
109 std::shared_ptr<const basis::FEBasisOperations<ValueTypeBasisCoeff,
110 ValueTypeBasisData,
111 memorySpace,
112 dim>>
116 std::shared_ptr<linearAlgebra::LinAlgOpContext<memorySpace>>
118
119 xc_func_type *d_funcX;
120 xc_func_type *d_funcC;
121
123
124 }; // end of class ExchangeCorrelationFE
125 } // end of namespace ksdft
126} // end of namespace dftefe
128#endif // dftefeExchangeCorrelationFE_h
An abstract class to store and access data for a given basis, such as the basis function values on a ...
Definition: FEBasisDataStorage.h:53
Definition: FEBasisDofHandler.h:57
Definition: FEBasisOperations.h:57
Definition: Energy.h:35
Definition: ExchangeCorrelationFE.h:51
utils::MemoryStorage< RealType, utils::MemorySpace::HOST > * d_rho
Definition: ExchangeCorrelationFE.h:122
RealType d_energy
Definition: ExchangeCorrelationFE.h:114
linearAlgebra::blasLapack::real_type< ValueType > RealType
Definition: ExchangeCorrelationFE.h:57
const quadrature::QuadratureValuesContainer< RealType, memorySpace > * d_electronChargeDensity
Definition: ExchangeCorrelationFE.h:102
RealType getEnergy() const override
Definition: ExchangeCorrelationFE.t.cpp:435
std::shared_ptr< const basis::FEBasisDofHandler< ValueTypeBasisCoeff, memorySpace, dim > > d_feBasisDofHandler
Definition: ExchangeCorrelationFE.h:105
~ExchangeCorrelationFE()
Definition: ExchangeCorrelationFE.t.cpp:229
void reinitBasis(std::shared_ptr< const basis::FEBasisDataStorage< ValueTypeBasisData, memorySpace > > feBasisDataStorage)
Definition: ExchangeCorrelationFE.t.cpp:259
xc_func_type * d_funcC
Definition: ExchangeCorrelationFE.h:120
void getLocal(Storage &cellWiseStorage) const override
Definition: ExchangeCorrelationFE.t.cpp:356
linearAlgebra::blasLapack::scalar_type< ValueTypeBasisData, ValueTypeBasisCoeff > ValueType
Definition: ExchangeCorrelationFE.h:55
const size_type d_cellBlockSize
Definition: ExchangeCorrelationFE.h:115
void evalEnergy(const utils::mpi::MPIComm &comm)
Definition: ExchangeCorrelationFE.t.cpp:375
xc_func_type * d_funcX
Definition: ExchangeCorrelationFE.h:119
void reinitField(const quadrature::QuadratureValuesContainer< RealType, memorySpace > &electronChargeDensity)
Definition: ExchangeCorrelationFE.t.cpp:299
std::shared_ptr< linearAlgebra::LinAlgOpContext< memorySpace > > d_linAlgOpContext
Definition: ExchangeCorrelationFE.h:117
std::shared_ptr< const basis::FEBasisOperations< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace, dim > > d_feBasisOp
Definition: ExchangeCorrelationFE.h:113
std::shared_ptr< const basis::FEBasisDataStorage< ValueTypeBasisData, memorySpace > > d_feBasisDataStorage
Definition: ExchangeCorrelationFE.h:108
std::shared_ptr< quadrature::QuadratureValuesContainer< RealType, memorySpace > > d_xcPotentialQuad
Definition: ExchangeCorrelationFE.h:100
Definition: Hamiltonian.h:35
Definition: LinAlgOpContext.h:38
Definition: QuadratureValuesContainer.h:39
Definition: MemoryStorage.h:38
blas::scalar_type< ValueType1, ValueType2 > scalar_type
Definition: BlasLapackTypedef.h:70
blas::real_type< ValueType > real_type
Definition: BlasLapackTypedef.h:64
int MPIComm
Definition: MPITypes.h:83
MemorySpace
Definition: MemorySpaceType.h:37
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
unsigned int size_type
Definition: TypeConfig.h:8