DFT-EFE
 
Loading...
Searching...
No Matches
DensityCalculatorKernels.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 dftefeDensityCalculatorKernels_h
27#define dftefeDensityCalculatorKernels_h
28
32#include <ksdft/KSAttributes.h>
33
34namespace dftefe
35{
36 namespace ksdft
37 {
38 template <typename ValueType,
39 typename RealType,
40 utils::MemorySpace memorySpace,
41 size_type dim>
43 {
44 public:
45 static void
47 const size_type batchSize,
48 const std::pair<size_type, size_type> cellRange,
49 const RealType * occupationInBatch,
50 ValueType * psiBatchQuad,
51 RealType * modPsiSqBatchQuad,
52 std::shared_ptr<const quadrature::QuadratureRuleContainer>
53 quadRuleContainer,
54 RealType * rhoBatch,
56 const SpinMode spinMode);
57
58 static void
60 const size_type batchSize,
61 const std::pair<size_type, size_type> cellRange,
62 const RealType * occupationInBatch,
63 const ValueType * psiBatchQuad,
64 const ValueType * gradPsiBatchQuad,
65 RealType * psiGradPsiBatch,
66 std::shared_ptr<const quadrature::QuadratureRuleContainer>
67 quadRuleContainer,
68 RealType * gradRhoBatch,
70 const SpinMode spinMode);
71 }; // end of class DensityCalculatorKernels
72
73
74#ifdef DFTEFE_WITH_DEVICE
75 template <typename ValueType, typename RealType, size_type dim>
76 class DensityCalculatorKernels<ValueType,
78 utils::MemorySpace::DEVICE,
79 dim>
80 {
81 public:
82 static void
84 const size_type batchSize,
85 const std::pair<size_type, size_type> cellRange,
86 const RealType * occupationInBatch,
87 ValueType * psiBatchQuad,
88 RealType * modPsiSqBatchQuad,
89 std::shared_ptr<const quadrature::QuadratureRuleContainer>
90 quadRuleContainer,
91 RealType *rhoBatch,
93 & linAlgOpContext,
94 const SpinMode spinMode);
95
96 static void
98 const size_type batchSize,
99 const std::pair<size_type, size_type> cellRange,
100 const RealType * occupationInBatch,
101 const ValueType * psiBatchQuad,
102 const ValueType * gradPsiBatchQuad,
103 RealType * psiGradPsiBatch,
104 std::shared_ptr<const quadrature::QuadratureRuleContainer>
105 quadRuleContainer,
106 RealType *gradRhoBatch,
108 & linAlgOpContext,
109 const SpinMode spinMode);
110 }; // end of class DensityCalculatorKernels
111#endif
112 } // namespace ksdft
113} // end of namespace dftefe
114#endif // dftefeDensityCalculatorKernels_h
Definition: DensityCalculatorKernels.h:43
static void computeGradRhoInBatch(const size_type batchSize, const std::pair< size_type, size_type > cellRange, const RealType *occupationInBatch, const ValueType *psiBatchQuad, const ValueType *gradPsiBatchQuad, RealType *psiGradPsiBatch, std::shared_ptr< const quadrature::QuadratureRuleContainer > quadRuleContainer, RealType *gradRhoBatch, linearAlgebra::LinAlgOpContext< memorySpace > &linAlgOpContext, const SpinMode spinMode)
Definition: DensityCalculatorKernels.cpp:155
static void computeRhoInBatch(const size_type batchSize, const std::pair< size_type, size_type > cellRange, const RealType *occupationInBatch, ValueType *psiBatchQuad, RealType *modPsiSqBatchQuad, std::shared_ptr< const quadrature::QuadratureRuleContainer > quadRuleContainer, RealType *rhoBatch, linearAlgebra::LinAlgOpContext< memorySpace > &linAlgOpContext, const SpinMode spinMode)
Definition: DensityCalculatorKernels.cpp:39
Definition: LinAlgOpContext.h:52
SpinMode
Definition: KSAttributes.h:55
MemorySpace
Definition: MemorySpaceType.h:37
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
std::uint64_t size_type
Definition: TypeConfig.h:9
Definition: TypeConfig.h:17