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 maxCellBlock,
69 const size_type waveFuncBatchSize);
70
71 ~KineticFE();
72
73 void
74 reinit(std::shared_ptr<
76 feBasisDataStorage);
77
78 void
79 getLocal(Storage &cellWiseStorage) const override;
80 void
81 evalEnergy(const std::vector<RealType> & occupation,
82 const basis::FEBasisManager<ValueTypeBasisCoeff,
83 ValueTypeBasisData,
84 memorySpace,
85 dim> & feBMPsi,
86 const linearAlgebra::MultiVector<ValueTypeBasisCoeff,
87 memorySpace> &waveFunc);
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>>
106
107 }; // end of class KineticFE
108 } // end of namespace ksdft
109} // end of namespace dftefe
110#include <ksdft/KineticFE.t.cpp>
111#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:54
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
void getLocal(Storage &cellWiseStorage) const override
Definition: KineticFE.t.cpp:108
linearAlgebra::blasLapack::scalar_type< ValueTypeBasisData, ValueTypeBasisCoeff > ValueType
Definition: KineticFE.h:52
Storage d_cellWiseStorageKineticEnergy
Definition: KineticFE.h:105
void reinit(std::shared_ptr< const basis::FEBasisDataStorage< ValueTypeBasisData, memorySpace > > feBasisDataStorage)
Definition: KineticFE.t.cpp:72
std::shared_ptr< linearAlgebra::LinAlgOpContext< memorySpace > > d_linAlgOpContext
Definition: KineticFE.h:103
const size_type d_waveFuncBatchSize
Definition: KineticFE.h:101
RealType d_energy
Definition: KineticFE.h:100
RealType getEnergy() const override
Definition: KineticFE.t.cpp:247
const size_type d_maxCellBlock
Definition: KineticFE.h:101
quadrature::QuadratureValuesContainer< ValueType, memorySpace > * d_gradPsi
Definition: KineticFE.h:104
~KineticFE()
Definition: KineticFE.t.cpp:57
void evalEnergy(const std::vector< RealType > &occupation, const basis::FEBasisManager< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace, dim > &feBMPsi, const linearAlgebra::MultiVector< ValueTypeBasisCoeff, memorySpace > &waveFunc)
Definition: KineticFE.t.cpp:119
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
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: QuadratureValuesContainer.h:39
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