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>
34namespace dftefe
35{
36 namespace basis
37 {
38 template <typename ValueType, utils::MemorySpace memorySpace>
40 {
41 public:
42 // TODO: Add numStrideCellWiseStorageDofs (max of numCellDofs over all
43 // cells) This also takes the case where numCellDofs = 0 Appropriately
44 // change src and dst ptrs
45 static void
47 const ValueType *data,
48 const size_type numComponents,
49 const size_type *cellLocalIdsStartPtr,
50 // const typename BasisManager<ValueType, memorySpace>::SizeTypeVector
51 // & numCellDofs,
52 const size_type totalCellDofs,
54
55 static void
57 const ValueType *data,
58 const size_type numComponents,
59 const size_type *cellLocalIdsStartPtr,
60 // const typename BasisManager<ValueType, memorySpace>::SizeTypeVector
61 // & numCellDofs,
62 const size_type totalCellDofs,
63 ValueType * itCellWiseStorageBegin);
64
65 // TODO: Add numStrideCellWiseStorageDofs (max of numCellDofs over all
66 // cells) This also takes the case where numCellDofs = 0
67 static void
70 & cellWiseStorage,
71 const size_type numComponents,
72 const size_type *cellLocalIdsStartPtr,
73 // const typename BasisManager<ValueType, memorySpace>::SizeTypeVector
74 // & numCellDofs,
75 const size_type totalCellDofs,
76 ValueType * data);
77
78 static void
80 const ValueType *itCellWiseStorageBegin,
81 const size_type numComponents,
82 const size_type *cellLocalIdsStartPtr,
83 // const typename BasisManager<ValueType, memorySpace>::SizeTypeVector
84 // & numCellDofs,
85 const size_type totalCellDofs,
86 ValueType * data);
87
88 static void
90 const ValueType *cellWiseBasisData,
91 const size_type *cellLocalIdsStartPtr,
93 const size_type totalCellDofs,
94 ValueType * data);
95
96 static void
99 & cellWiseStorage,
100 const size_type numComponents,
102 ValueType * data);
103
104
105 }; // end of class FECellWiseDataOperations
106
107
108#ifdef DFTEFE_WITH_DEVICE
109 template <typename ValueType>
110 class FECellWiseDataOperations<ValueType,
112 {
113 public:
114 // TODO: Add numStrideCellWiseStorageDofs (max of numCellDofs over all
115 // cells) This also takes the case where numCellDofs = 0 Appropriately
116 // change src and dst ptrs
117 static void
119 const ValueType *data,
120 const size_type numComponents,
121 const size_type *cellLocalIdsStartPtr,
122 const size_type totalCellDofs,
125 &cellWiseStorage);
126
127 static void
128 copyFieldToCellWiseData(const ValueType *data,
129 const size_type numComponents,
130 const size_type *cellLocalIdsStartPtr,
131 const size_type totalCellDofs,
132 ValueType * itCellWiseStorageBegin);
133
134 static void
135 addCellWiseDataToFieldData(const ValueType *itCellWiseStorageBegin,
136 const size_type numComponents,
137 const size_type *cellLocalIdsStartPtr,
138 const size_type totalCellDofs,
139 ValueType * data);
140
141 // TODO: Add numStrideCellWiseStorageDofs (max of numCellDofs over all
142 // cells) This also takes the case where numCellDofs = 0
143 static void
145 const dftefe::utils::MemoryStorage<ValueType,
147 & cellWiseStorage,
148 const size_type numComponents,
149 const size_type *cellLocalIdsStartPtr,
150 const size_type totalCellDofs,
151 ValueType * data);
152
153 static void
155 const ValueType *cellWiseBasisData,
156 const size_type *cellLocalIdsStartPtr,
159 & numCellDofs,
160 const size_type totalCellDofs,
161 ValueType * data);
162
163 static void
165 const dftefe::utils::MemoryStorage<ValueType,
167 & cellWiseStorage,
168 const size_type numComponents,
170 & numCellVecs,
171 ValueType *data);
172
173
174 }; // end of class FECellWiseDataOperations
175#endif
176 } // end of namespace basis
177} // end of namespace dftefe
178#endif // dftefeFECellWiseDataOperations_h
Definition: FECellWiseDataOperations.h:40
static void addCellWiseDataToFieldData(const dftefe::utils::MemoryStorage< ValueType, memorySpace > &cellWiseStorage, const size_type numComponents, const size_type *cellLocalIdsStartPtr, const size_type totalCellDofs, ValueType *data)
Definition: FECellWiseDataOperations.cpp:137
static void reshapeCellWiseData(const dftefe::utils::MemoryStorage< ValueType, memorySpace > &cellWiseStorage, const size_type numComponents, const utils::MemoryStorage< size_type, memorySpace > &numCellVecs, ValueType *data)
Definition: FECellWiseDataOperations.cpp:188
static void addCellWiseBasisDataToDiagonalData(const ValueType *cellWiseBasisData, const size_type *cellLocalIdsStartPtr, const utils::MemoryStorage< size_type, memorySpace > &numCellDofs, const size_type totalCellDofs, ValueType *data)
Definition: FECellWiseDataOperations.cpp:158
static void copyFieldToCellWiseData(const ValueType *data, const size_type numComponents, const size_type *cellLocalIdsStartPtr, const size_type totalCellDofs, dftefe::utils::MemoryStorage< ValueType, memorySpace > &cellWiseStorage)
Definition: FECellWiseDataOperations.cpp:34
Definition: MemoryStorage.h:38
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
std::uint64_t size_type
Definition: TypeConfig.h:9