DFT-EFE
 
Loading...
Searching...
No Matches
EnrichmentDataEvalKernels.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#ifndef dftefeEnrichmentDataEvalKernels_h
26#define dftefeEnrichmentDataEvalKernels_h
27
28#include <utils/TypeConfig.h>
30#include <memory>
31#include <utils/MemoryStorage.h>
32#include <atoms/SphericalData.h>
35
36namespace dftefe
37{
38 namespace basis
39 {
40 template <utils::MemorySpace memorySpace>
42 {
43 public:
44 static void
46 const size_type numEnrichmentFunc,
47 const std::vector<size_type> &pointsPerEnrichId,
48 const std::vector<std::shared_ptr<atoms::SphericalData>>
49 & sphericalDataVec,
50 const double * points,
51 const double * origin,
52 double * values,
54
55 static void
57 const size_type numEnrichmentFunc,
58 const std::vector<size_type> &pointsPerEnrichId,
59 const std::vector<std::shared_ptr<atoms::SphericalData>>
60 & sphericalDataVec,
61 const double * points,
62 const double * origin,
63 double * values,
65
66 static void
68 const double * quadPtsInAllCells,
69 const double * originPtsInAllCells,
70 std::pair<size_type, size_type> cellRange,
71 const std::vector<size_type> numEnrichIdsInAllCells,
72 const std::vector<size_type> numQuadPtsInAllCells,
74 * sphericalDataFuncInAllCells,
75 double *output,
77
78 static void
80 const double * quadPtsInAllCells,
81 const double * originPtsInAllCells,
82 std::pair<size_type, size_type> cellRange,
83 const std::vector<size_type> numEnrichIdsInAllCells,
84 const std::vector<size_type> numQuadPtsInAllCells,
86 * sphericalDataFuncInAllCells,
87 double *output,
89 }; // end of class EnrichmentDataEvalKernels
90
91#ifdef DFTEFE_WITH_DEVICE
92 template <>
94 {
95 public:
96 static void
98 const size_type numEnrichmentFunc,
99 const std::vector<size_type> &pointsPerEnrichId,
100 const std::vector<std::shared_ptr<atoms::SphericalData>>
101 & sphericalDataVec,
102 const double *points,
103 const double *origin,
104 double * values,
106 &linAlgOpContext);
107
108 static void
110 const size_type numEnrichmentFunc,
111 const std::vector<size_type> &pointsPerEnrichId,
112 const std::vector<std::shared_ptr<atoms::SphericalData>>
113 & sphericalDataVec,
114 const double *points,
115 const double *origin,
116 double * values,
118 &linAlgOpContext);
119
120 static void
122 const double * quadPtsInAllCells,
123 const double * originPtsInAllCells,
124 std::pair<size_type, size_type> cellRange,
125 const std::vector<size_type> numEnrichIdsInAllCells,
126 const std::vector<size_type> numQuadPtsInAllCells,
128 dftefe::utils::MemorySpace::DEVICE> *sphericalDataFuncInAllCells,
129 double * output,
131 &linAlgOpContext);
132
133 static void
135 const double * quadPtsInAllCells,
136 const double * originPtsInAllCells,
137 std::pair<size_type, size_type> cellRange,
138 const std::vector<size_type> numEnrichIdsInAllCells,
139 const std::vector<size_type> numQuadPtsInAllCells,
141 dftefe::utils::MemorySpace::DEVICE> *sphericalDataFuncInAllCells,
142 double * output,
144 &linAlgOpContext);
145 }; // end of class EnrichmentDataEvalKernels
146#endif
147 } // end of namespace basis
148} // end of namespace dftefe
149#endif // dftefeEnrichmentDataEvalKernels_h
Definition: SphericalDataNumerical.h:57
Definition: EnrichmentDataEvalKernels.h:42
static void getEnrichmentValuesInCellRange(const double *quadPtsInAllCells, const double *originPtsInAllCells, std::pair< size_type, size_type > cellRange, const std::vector< size_type > numEnrichIdsInAllCells, const std::vector< size_type > numQuadPtsInAllCells, const atoms::SphericalDataNumerical::Func< memorySpace > *sphericalDataFuncInAllCells, double *output, linearAlgebra::LinAlgOpContext< memorySpace > &linAlgOpContext)
Definition: EnrichmentDataEvalDeviceKernels.cpp:93
static void getEnrichmentGradientsInCellRange(const double *quadPtsInAllCells, const double *originPtsInAllCells, std::pair< size_type, size_type > cellRange, const std::vector< size_type > numEnrichIdsInAllCells, const std::vector< size_type > numQuadPtsInAllCells, const atoms::SphericalDataNumerical::Func< memorySpace > *sphericalDataFuncInAllCells, double *output, linearAlgebra::LinAlgOpContext< memorySpace > &linAlgOpContext)
Definition: EnrichmentDataEvalDeviceKernels.cpp:163
static void getEnrichmentGradients(const size_type numEnrichmentFunc, const std::vector< size_type > &pointsPerEnrichId, const std::vector< std::shared_ptr< atoms::SphericalData > > &sphericalDataVec, const double *points, const double *origin, double *values, linearAlgebra::LinAlgOpContext< memorySpace > &linAlgOpContext)
Definition: EnrichmentDataEvalDeviceKernels.cpp:269
static void getEnrichmentValues(const size_type numEnrichmentFunc, const std::vector< size_type > &pointsPerEnrichId, const std::vector< std::shared_ptr< atoms::SphericalData > > &sphericalDataVec, const double *points, const double *origin, double *values, linearAlgebra::LinAlgOpContext< memorySpace > &linAlgOpContext)
Definition: EnrichmentDataEvalDeviceKernels.cpp:233
Definition: LinAlgOpContext.h:52
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
std::uint64_t size_type
Definition: TypeConfig.h:9