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/Field.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,
51 & numCellDofs,
53
54 static void
56 const ValueType *data,
57 const size_type numComponents,
58 const size_type *cellLocalIdsStartPtr,
60 & numCellDofs,
61 ValueType *itCellWiseStorageBegin);
62
63 // TODO: Add numStrideCellWiseStorageDofs (max of numCellDofs over all
64 // cells) This also takes the case where numCellDofs = 0
65 static void
68 & cellWiseStorage,
69 const size_type numComponents,
70 const size_type *cellLocalIdsStartPtr,
72 & numCellDofs,
73 ValueType *data);
74
75 static void
77 const ValueType *itCellWiseStorageBegin,
78 const size_type numComponents,
79 const size_type *cellLocalIdsStartPtr,
81 & numCellDofs,
82 ValueType *data);
83
84 static void
86 const ValueType *cellWiseBasisData,
87 const size_type *cellLocalIdsStartPtr,
89 ValueType * data);
90
91 static void
94 & cellWiseStorage,
95 const size_type numComponents,
97 ValueType * data);
98
99
100 }; // end of class FECellWiseDataOperations
101
102
103#ifdef DFTEFE_WITH_DEVICE
104 template <typename ValueType>
106 {
107 public:
108 static void
110 const ValueType *data,
111 const size_type numComponents,
112 const size_type *cellLocalIdsStartPtr,
113 const BasisManager<ValueType,
115 &numCellDofs,
118 &cellWiseStorage);
119
120 static void
122 const dftefe::utils::MemoryStorage<ValueType,
124 & cellWiseStorage,
125 const size_type numComponents,
126 const size_type *cellLocalIdsStartPtr,
127 const BasisManager<ValueType,
129 & numCellDofs,
130 ValueType *data);
131
132 static void
134 const ValueType *cellWiseBasisData,
135 const size_type *cellLocalIdsStartPtr,
137 ValueType * data);
138
139 static void
140 reshapeCellWiseData(const ValueType *cellWiseData,
141 const size_type numVec,
142 const size_type vecSize,
143 const size_type numCells,
144 ValueType * data);
145
146
147 }; // end of class FECellWiseDataOperations
148#endif
149 } // end of namespace basis
150} // end of namespace dftefe
152#endif // dftefeFECellWiseDataOperations_h
An abstract class to encapsulate the partitioning of a basis across multiple processors.
Definition: BasisManager.h:54
Definition: FECellWiseDataOperations.h:40
static void copyFieldToCellWiseData(const ValueType *data, const size_type numComponents, const size_type *cellLocalIdsStartPtr, const typename BasisManager< ValueType, memorySpace >::SizeTypeVector &numCellDofs, dftefe::utils::MemoryStorage< ValueType, memorySpace > &cellWiseStorage)
Definition: FECellWiseDataOperations.t.cpp:31
static void addCellWiseDataToFieldData(const dftefe::utils::MemoryStorage< ValueType, memorySpace > &cellWiseStorage, const size_type numComponents, const size_type *cellLocalIdsStartPtr, const typename BasisManager< ValueType, memorySpace >::SizeTypeVector &numCellDofs, ValueType *data)
Definition: FECellWiseDataOperations.t.cpp:122
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.t.cpp:186
static void addCellWiseBasisDataToDiagonalData(const ValueType *cellWiseBasisData, const size_type *cellLocalIdsStartPtr, const utils::MemoryStorage< size_type, memorySpace > &numCellDofs, ValueType *data)
Definition: FECellWiseDataOperations.t.cpp:157
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
unsigned int size_type
Definition: TypeConfig.h:8