DFT-EFE
 
Loading...
Searching...
No Matches
DensityCalculator.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 dftefeDensityCalculator_h
27#define dftefeDensityCalculator_h
28
32
33namespace dftefe
34{
35 namespace ksdft
36 {
37 template <typename ValueTypeBasisData,
38 typename ValueTypeBasisCoeff,
39 utils::MemorySpace memorySpace,
40 size_type dim>
42 {
43 public:
44 using ValueType =
46 ValueTypeBasisCoeff>;
47
49
50 public:
56 std::shared_ptr<
58 feBasisDataStorage,
59 const basis::FEBasisManager<ValueTypeBasisCoeff,
60 ValueTypeBasisData,
61 memorySpace,
62 dim> &feBMPsi,
64 linAlgOpContext,
65 const size_type cellBlockSize,
66 const size_type waveFuncBatchSize);
67
73
74 void
75 reinit(std::shared_ptr<
77 feBasisDataStorage,
78 const basis::FEBasisManager<ValueTypeBasisCoeff,
79 ValueTypeBasisData,
80 memorySpace,
81 dim> &feBMPsi);
82
83 void
85 const std::vector<RealType> &occupation,
87 & waveFunc,
89
90 private:
91 std::shared_ptr<const quadrature::QuadratureRuleContainer>
93 std::shared_ptr<basis::FEBasisOperations<ValueTypeBasisCoeff,
94 ValueTypeBasisData,
95 memorySpace,
96 dim>>
98 const basis::FEBasisManager<ValueTypeBasisCoeff,
99 ValueTypeBasisData,
100 memorySpace,
104 std::shared_ptr<linearAlgebra::LinAlgOpContext<memorySpace>>
106
109
112
114
116
119
122
125
127
128 }; // end of class DensityCalculator
129 } // end of namespace ksdft
130} // end of namespace dftefe
132#endif // dftefeDensityCalculator_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: DensityCalculator.h:42
linearAlgebra::MultiVector< ValueTypeBasisCoeff, memorySpace > * d_psiBatchSmall
Definition: DensityCalculator.h:124
quadrature::QuadratureValuesContainer< RealType, memorySpace > * d_rhoBatch
Definition: DensityCalculator.h:113
quadrature::QuadratureValuesContainer< RealType, memorySpace > * d_psiModSqBatchSmallQuad
Definition: DensityCalculator.h:121
quadrature::QuadratureValuesContainer< ValueType, memorySpace > * d_psiBatchQuad
Definition: DensityCalculator.h:108
linearAlgebra::blasLapack::real_type< ValueType > RealType
Definition: DensityCalculator.h:48
std::shared_ptr< linearAlgebra::LinAlgOpContext< memorySpace > > d_linAlgOpContext
Definition: DensityCalculator.h:105
std::shared_ptr< const quadrature::QuadratureRuleContainer > d_quadRuleContainer
Definition: DensityCalculator.h:92
const size_type d_waveFuncBatchSize
Definition: DensityCalculator.h:103
void computeRho(const std::vector< RealType > &occupation, const linearAlgebra::MultiVector< ValueTypeBasisCoeff, memorySpace > &waveFunc, quadrature::QuadratureValuesContainer< RealType, memorySpace > &rho)
Definition: DensityCalculator.t.cpp:355
~DensityCalculator()
Default Destructor.
Definition: DensityCalculator.t.cpp:253
size_type d_batchSizeSmall
Definition: DensityCalculator.h:126
quadrature::QuadratureValuesContainer< ValueType, memorySpace > * d_psiBatchSmallQuad
Definition: DensityCalculator.h:118
std::shared_ptr< basis::FEBasisOperations< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace, dim > > d_feBasisOp
Definition: DensityCalculator.h:97
const size_type d_cellBlockSize
Definition: DensityCalculator.h:102
const basis::FEBasisManager< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace, dim > * d_feBMPsi
Definition: DensityCalculator.h:101
void reinit(std::shared_ptr< const basis::FEBasisDataStorage< ValueTypeBasisData, memorySpace > > feBasisDataStorage, const basis::FEBasisManager< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace, dim > &feBMPsi)
Definition: DensityCalculator.t.cpp:301
quadrature::QuadratureValuesContainer< RealType, memorySpace > * d_psiModSqBatchQuad
Definition: DensityCalculator.h:111
linearAlgebra::blasLapack::scalar_type< ValueTypeBasisData, ValueTypeBasisCoeff > ValueType
Definition: DensityCalculator.h:46
linearAlgebra::MultiVector< ValueTypeBasisCoeff, memorySpace > * d_psiBatch
Definition: DensityCalculator.h:115
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