DFT-EFE
 
Loading...
Searching...
No Matches
FECellWiseDataOperations.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 Bikash Kanungo, Vishal Subramanian, Avirup Sircar
24 */
25
26#ifndef dftefeFECellWiseDataOperations_h
27#define dftefeFECellWiseDataOperations_h
28
29#include <utils/TypeConfig.h>
31#include <utils/MemoryStorage.h>
32#include <basis/BasisManager.h>
35namespace dftefe
36{
37 namespace basis
38 {
39 template <typename ValueType, utils::MemorySpace memorySpace>
41 {
42 public:
43 // TODO: Add numStrideCellWiseStorageDofs (max of numCellDofs over all
44 // cells) This also takes the case where numCellDofs = 0 Appropriately
45 // change src and dst ptrs
46 static void
48 const ValueType *data,
49 const size_type numComponents,
50 const size_type *cellLocalIdsStartPtr,
51 // const typename BasisManager<ValueType, memorySpace>::SizeTypeVector
52 // & numCellDofs,
53 const size_type totalCellDofs,
56
57 static void
59 const ValueType *data,
60 const size_type numComponents,
61 const size_type *cellLocalIdsStartPtr,
62 // const typename BasisManager<ValueType, memorySpace>::SizeTypeVector
63 // & numCellDofs,
64 const size_type totalCellDofs,
65 ValueType * itCellWiseStorageBegin,
67
68 // TODO: Add numStrideCellWiseStorageDofs (max of numCellDofs over all
69 // cells) This also takes the case where numCellDofs = 0
70 static void
73 & cellWiseStorage,
74 const size_type numComponents,
75 const size_type *cellLocalIdsStartPtr,
76 // const typename BasisManager<ValueType, memorySpace>::SizeTypeVector
77 // & numCellDofs,
78 const size_type totalCellDofs,
79 ValueType * data,
81
82 static void
84 const ValueType *itCellWiseStorageBegin,
85 const size_type numComponents,
86 const size_type *cellLocalIdsStartPtr,
87 // const typename BasisManager<ValueType, memorySpace>::SizeTypeVector
88 // & numCellDofs,
89 const size_type totalCellDofs,
90 ValueType * data,
92
93 static void
95 const ValueType *cellWiseBasisData,
96 const size_type *cellLocalIdsStartPtr,
98 const size_type totalCellDofs,
99 ValueType * data,
101
102 static void
105 & cellWiseStorage,
106 const size_type numComponents,
108 ValueType * data,
110
111
112 }; // end of class FECellWiseDataOperations
113
114
115#ifdef DFTEFE_WITH_DEVICE
116 template <typename ValueType>
117 class FECellWiseDataOperations<ValueType,
119 {
120 public:
121 // TODO: Add numStrideCellWiseStorageDofs (max of numCellDofs over all
122 // cells) This also takes the case where numCellDofs = 0 Appropriately
123 // change src and dst ptrs
124 static void
126 const ValueType *data,
127 const size_type numComponents,
128 const size_type *cellLocalIdsStartPtr,
129 const size_type totalCellDofs,
132 &cellWiseStorage,
134 &linAlgOpContext);
135
136 static void
138 const ValueType *data,
139 const size_type numComponents,
140 const size_type *cellLocalIdsStartPtr,
141 const size_type totalCellDofs,
142 ValueType * itCellWiseStorageBegin,
144 &linAlgOpContext);
145
146 static void
148 const ValueType *itCellWiseStorageBegin,
149 const size_type numComponents,
150 const size_type *cellLocalIdsStartPtr,
151 const size_type totalCellDofs,
152 ValueType * data,
154 &linAlgOpContext);
155
156 // TODO: Add numStrideCellWiseStorageDofs (max of numCellDofs over all
157 // cells) This also takes the case where numCellDofs = 0
158 static void
160 const dftefe::utils::MemoryStorage<ValueType,
162 & cellWiseStorage,
163 const size_type numComponents,
164 const size_type *cellLocalIdsStartPtr,
165 const size_type totalCellDofs,
166 ValueType * data,
168 &linAlgOpContext);
169
170 static void
172 const ValueType *cellWiseBasisData,
173 const size_type *cellLocalIdsStartPtr,
176 & numCellDofs,
177 const size_type totalCellDofs,
178 ValueType * data,
180 &linAlgOpContext);
181
182 static void
184 const dftefe::utils::MemoryStorage<ValueType,
186 & cellWiseStorage,
187 const size_type numComponents,
189 & numCellVecs,
190 ValueType *data,
192 &linAlgOpContext);
193
194
195 }; // end of class FECellWiseDataOperations
196#endif
197 } // end of namespace basis
198} // end of namespace dftefe
199#endif // dftefeFECellWiseDataOperations_h
Definition: FECellWiseDataOperations.h:41
static void addCellWiseBasisDataToDiagonalData(const ValueType *cellWiseBasisData, const size_type *cellLocalIdsStartPtr, const utils::MemoryStorage< size_type, memorySpace > &numCellDofs, const size_type totalCellDofs, ValueType *data, linearAlgebra::LinAlgOpContext< memorySpace > &linAlgOpContext)
Definition: FECellWiseDataOperations.cpp:164
static void addCellWiseDataToFieldData(const dftefe::utils::MemoryStorage< ValueType, memorySpace > &cellWiseStorage, const size_type numComponents, const size_type *cellLocalIdsStartPtr, const size_type totalCellDofs, ValueType *data, linearAlgebra::LinAlgOpContext< memorySpace > &linAlgOpContext)
Definition: FECellWiseDataOperations.cpp:141
static void copyFieldToCellWiseData(const ValueType *data, const size_type numComponents, const size_type *cellLocalIdsStartPtr, const size_type totalCellDofs, dftefe::utils::MemoryStorage< ValueType, memorySpace > &cellWiseStorage, linearAlgebra::LinAlgOpContext< memorySpace > &linAlgOpContext)
Definition: FECellWiseDataOperations.cpp:34
static void reshapeCellWiseData(const dftefe::utils::MemoryStorage< ValueType, memorySpace > &cellWiseStorage, const size_type numComponents, const utils::MemoryStorage< size_type, memorySpace > &numCellVecs, ValueType *data, linearAlgebra::LinAlgOpContext< memorySpace > &linAlgOpContext)
Definition: FECellWiseDataOperations.cpp:195
Definition: LinAlgOpContext.h:52
Definition: MemoryStorage.h:38
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
std::uint64_t size_type
Definition: TypeConfig.h:9