DFT-EFE
 
Loading...
Searching...
No Matches
KohnShamOperatorContextFE.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 dftefeKohnShamOperatorContextFE_h
27#define dftefeKohnShamOperatorContextFE_h
28
35#include <ksdft/Hamiltonian.h>
36#include <memory>
37#include <variant>
38#include <type_traits>
39
40namespace dftefe
41{
42 namespace ksdft
43 {
55 template <typename ValueTypeOperator,
56 typename ValueTypeOperand,
57 typename ValueTypeBasisData,
58 utils::MemorySpace memorySpace,
59 size_type dim>
61 : public linearAlgebra::
62 OperatorContext<ValueTypeOperator, ValueTypeOperand, memorySpace>
63 {
64 public:
71 using ValueType =
73 ValueTypeOperand>;
74
76
78 std::variant<Hamiltonian<float, memorySpace> *,
80 Hamiltonian<std::complex<float>, memorySpace> *,
81 Hamiltonian<std::complex<double>, memorySpace> *>;
82
83 public:
88 const basis::
89 FEBasisManager<ValueTypeOperand, ValueTypeBasisData, memorySpace, dim>
90 & feBasisManager,
91 std::vector<HamiltonianPtrVariant> hamiltonianComponentsVec,
93 const size_type maxCellTimesNumVecs);
94
96
97 void
98 reinit(const basis::FEBasisManager<ValueTypeOperand,
99 ValueTypeBasisData,
100 memorySpace,
101 dim> & feBasisManager,
102 std::vector<HamiltonianPtrVariant> hamiltonianVec);
103
104 void
105 apply(
108
109 private:
110 const basis::
111 FEBasisManager<ValueTypeOperand, ValueTypeBasisData, memorySpace, dim>
116 }; // end of class KohnShamOperatorContextFE
117 } // end of namespace ksdft
118} // end of namespace dftefe
120#endif // dftefeKohnShamOperatorContextFE_h
An abstract class to encapsulate the partitioning of a finite element basis across multiple processor...
Definition: FEBasisManager.h:44
Definition: Hamiltonian.h:35
A derived class of linearAlgebra::OperatorContext to encapsulate the action of a discrete Kohn-Sham o...
Definition: KohnShamOperatorContextFE.h:63
linearAlgebra::LinAlgOpContext< memorySpace > d_linAlgOpContext
Definition: KohnShamOperatorContextFE.h:115
std::variant< Hamiltonian< float, memorySpace > *, Hamiltonian< double, memorySpace > *, Hamiltonian< std::complex< float >, memorySpace > *, Hamiltonian< std::complex< double >, memorySpace > * > HamiltonianPtrVariant
Definition: KohnShamOperatorContextFE.h:81
void reinit(const basis::FEBasisManager< ValueTypeOperand, ValueTypeBasisData, memorySpace, dim > &feBasisManager, std::vector< HamiltonianPtrVariant > hamiltonianVec)
Definition: KohnShamOperatorContextFE.t.cpp:661
const size_type d_maxCellTimesNumVecs
Definition: KohnShamOperatorContextFE.h:114
Storage d_hamiltonianInAllCells
Definition: KohnShamOperatorContextFE.h:113
linearAlgebra::blasLapack::scalar_type< ValueTypeOperator, ValueTypeOperand > ValueType
define ValueType as the superior (bigger set) of the ValueTypeOperator and ValueTypeOperand (e....
Definition: KohnShamOperatorContextFE.h:73
void apply(linearAlgebra::MultiVector< ValueTypeOperand, memorySpace > &X, linearAlgebra::MultiVector< ValueType, memorySpace > &Y) const override
Definition: KohnShamOperatorContextFE.t.cpp:852
const basis::FEBasisManager< ValueTypeOperand, ValueTypeBasisData, memorySpace, dim > * d_feBasisManager
Definition: KohnShamOperatorContextFE.h:112
Definition: LinAlgOpContext.h:38
An class template to encapsulate a MultiVector. A MultiVector is a collection of vectors belonging t...
Definition: MultiVector.h:134
blas::scalar_type< ValueType1, ValueType2 > scalar_type
Definition: BlasLapackTypedef.h:70
MemorySpace
Definition: MemorySpaceType.h:37
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
unsigned int size_type
Definition: TypeConfig.h:8