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
33namespace dftefe
34{
35 namespace ksdft
36 {
37 template <typename ValueType,
38 typename RealType,
39 utils::MemorySpace memorySpace,
40 size_type dim>
42 {
43 public:
44 static void
46 const size_type batchSize,
47 const std::pair<size_type, size_type> cellRange,
48 const RealType * occupationInBatch,
49 ValueType * psiBatchQuad,
50 RealType * modPsiSqBatchQuad,
51 std::shared_ptr<const quadrature::QuadratureRuleContainer>
52 quadRuleContainer,
53 RealType * rhoBatch,
55
56 static void
58 const size_type batchSize,
59 const std::pair<size_type, size_type> cellRange,
60 const RealType * occupationInBatch,
61 const ValueType * psiBatchQuad,
62 const ValueType * gradPsiBatchQuad,
63 RealType * psiGradPsiBatch,
64 std::shared_ptr<const quadrature::QuadratureRuleContainer>
65 quadRuleContainer,
66 RealType * gradRhoBatch,
68 }; // end of class DensityCalculatorKernels
69
70
71#ifdef DFTEFE_WITH_DEVICE
72 template <typename ValueType, typename RealType, size_type dim>
73 class DensityCalculatorKernels<ValueType,
75 utils::MemorySpace::DEVICE,
76 dim>
77 {
78 public:
79 static void
81 const size_type batchSize,
82 const std::pair<size_type, size_type> cellRange,
83 const RealType * occupationInBatch,
84 ValueType * psiBatchQuad,
85 RealType * modPsiSqBatchQuad,
86 std::shared_ptr<const quadrature::QuadratureRuleContainer>
87 quadRuleContainer,
88 RealType *rhoBatch,
90 &linAlgOpContext);
91
92 static void
94 const size_type batchSize,
95 const std::pair<size_type, size_type> cellRange,
96 const RealType * occupationInBatch,
97 const ValueType * psiBatchQuad,
98 const ValueType * gradPsiBatchQuad,
99 RealType * psiGradPsiBatch,
100 std::shared_ptr<const quadrature::QuadratureRuleContainer>
101 quadRuleContainer,
102 RealType *gradRhoBatch,
104 &linAlgOpContext);
105 }; // end of class DensityCalculatorKernels
106#endif
107 } // namespace ksdft
108} // end of namespace dftefe
109#endif // dftefeDensityCalculatorKernels_h
Definition: DensityCalculatorKernels.h:42
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)
Definition: DensityCalculatorKernels.cpp:80
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)
Definition: DensityCalculatorKernels.cpp:39
Definition: LinAlgOpContext.h:52
MemorySpace
Definition: MemorySpaceType.h:37
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
std::uint64_t size_type
Definition: TypeConfig.h:9
Definition: TypeConfig.h:17