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 static void
44 const ValueType *data,
45 const size_type numComponents,
46 const size_type *cellLocalIdsStartPtr,
48 & numCellDofs,
50
51 static void
54 & cellWiseStorage,
55 const size_type numComponents,
56 const size_type *cellLocalIdsStartPtr,
58 & numCellDofs,
59 ValueType *data);
60
61 static void
63 const ValueType *cellWiseBasisData,
64 const size_type *cellLocalIdsStartPtr,
66 ValueType * data);
67
68 static void
71 & cellWiseStorage,
72 const size_type numComponents,
74 ValueType * data);
75
76
77 }; // end of class FECellWiseDataOperations
78
79
80#ifdef DFTEFE_WITH_DEVICE
81 template <typename ValueType>
83 {
84 public:
85 static void
87 const ValueType *data,
88 const size_type numComponents,
89 const size_type *cellLocalIdsStartPtr,
90 const BasisManager<ValueType,
92 &numCellDofs,
95 &cellWiseStorage);
96
97 static void
99 const dftefe::utils::MemoryStorage<ValueType,
101 & cellWiseStorage,
102 const size_type numComponents,
103 const size_type *cellLocalIdsStartPtr,
104 const BasisManager<ValueType,
106 & numCellDofs,
107 ValueType *data);
108
109 static void
111 const ValueType *cellWiseBasisData,
112 const size_type *cellLocalIdsStartPtr,
114 ValueType * data);
115
116 static void
117 reshapeCellWiseData(const ValueType *cellWiseData,
118 const size_type numVec,
119 const size_type vecSize,
120 const size_type numCells,
121 ValueType * data);
122
123
124 }; // end of class FECellWiseDataOperations
125#endif
126 } // end of namespace basis
127} // end of namespace dftefe
129#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:61
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:125
static void addCellWiseBasisDataToDiagonalData(const ValueType *cellWiseBasisData, const size_type *cellLocalIdsStartPtr, const utils::MemoryStorage< size_type, memorySpace > &numCellDofs, ValueType *data)
Definition: FECellWiseDataOperations.t.cpp:96
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
unsigned int size_type
Definition: TypeConfig.h:8