DFT-EFE
 
Loading...
Searching...
No Matches
KineticFE.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 dftefeKineticFE_h
27#define dftefeKineticFE_h
28
30#include <ksdft/Hamiltonian.h>
31#include <ksdft/Energy.h>
34
35namespace dftefe
36{
37 namespace ksdft
38 {
39 template <typename ValueTypeBasisData,
40 typename ValueTypeBasisCoeff,
41 utils::MemorySpace memorySpace,
42 size_type dim>
44 : public Hamiltonian<ValueTypeBasisData, memorySpace>,
45 public Energy<linearAlgebra::blasLapack::real_type<
46 linearAlgebra::blasLapack::scalar_type<ValueTypeBasisData,
47 ValueTypeBasisCoeff>>>
48 {
49 public:
50 using ValueType =
52 ValueTypeBasisCoeff>;
53
55
57
58 public:
63 std::shared_ptr<
65 feBasisDataStorage,
67 linAlgOpContext,
68 const size_type cellBlockSize);
69
70 ~KineticFE() = default;
71
72 void
73 reinit(std::shared_ptr<
75 feBasisDataStorage);
76
77 void
78 getLocal(Storage &cellWiseStorage) const override;
79 void
80 evalEnergy(const std::vector<RealType> & occupation,
81 const basis::FEBasisManager<ValueTypeBasisCoeff,
82 ValueTypeBasisData,
83 memorySpace,
84 dim> & feBMPsi,
85 const linearAlgebra::MultiVector<ValueTypeBasisCoeff,
86 memorySpace> &waveFunc,
87 const size_type waveFuncBatchSize);
89 getEnergy() const override;
90
91 private:
92 std::shared_ptr<
95 std::shared_ptr<basis::FEBasisOperations<ValueTypeBasisCoeff,
96 ValueTypeBasisData,
97 memorySpace,
98 dim>>
102 std::shared_ptr<linearAlgebra::LinAlgOpContext<memorySpace>>
104
105 }; // end of class KineticFE
106 } // end of namespace ksdft
107} // end of namespace dftefe
108#include <ksdft/KineticFE.t.cpp>
109#endif // dftefeKineticFE_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
An abstract class to encapsulate the partitioning of a finite element basis across multiple processor...
Definition: FEBasisManager.h:44
Definition: FEBasisOperations.h:57
Definition: Energy.h:35
Definition: Hamiltonian.h:35
Definition: KineticFE.h:48
const size_type d_cellBlockSize
Definition: KineticFE.h:101
void getLocal(Storage &cellWiseStorage) const override
Definition: KineticFE.t.cpp:75
linearAlgebra::blasLapack::scalar_type< ValueTypeBasisData, ValueTypeBasisCoeff > ValueType
Definition: KineticFE.h:52
void reinit(std::shared_ptr< const basis::FEBasisDataStorage< ValueTypeBasisData, memorySpace > > feBasisDataStorage)
Definition: KineticFE.t.cpp:56
std::shared_ptr< linearAlgebra::LinAlgOpContext< memorySpace > > d_linAlgOpContext
Definition: KineticFE.h:103
RealType d_energy
Definition: KineticFE.h:100
RealType getEnergy() const override
Definition: KineticFE.t.cpp:324
std::shared_ptr< basis::FEBasisOperations< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace, dim > > d_feBasisOp
Definition: KineticFE.h:99
std::shared_ptr< const basis::FEBasisDataStorage< ValueTypeBasisData, memorySpace > > d_feBasisDataStorage
Definition: KineticFE.h:94
linearAlgebra::blasLapack::real_type< ValueType > RealType
Definition: KineticFE.h:54
void evalEnergy(const std::vector< RealType > &occupation, const basis::FEBasisManager< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace, dim > &feBMPsi, const linearAlgebra::MultiVector< ValueTypeBasisCoeff, memorySpace > &waveFunc, const size_type waveFuncBatchSize)
Definition: KineticFE.t.cpp:96
Definition: LinAlgOpContext.h:38
An class template to encapsulate a MultiVector. A MultiVector is a collection of vectors belonging t...
Definition: MultiVector.h:134
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
MemorySpace
Definition: MemorySpaceType.h:37
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
unsigned int size_type
Definition: TypeConfig.h:8