DFT-EFE
 
Loading...
Searching...
No Matches
ConstraintsInternal.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 Vishal Subramanian
24 */
25
26
27#ifndef dftefeConstraintsInternal_h
28#define dftefeConstraintsInternal_h
29
30#include <utils/TypeConfig.h>
31#include <utils/MemoryStorage.h>
33
35
36namespace dftefe
37{
38 namespace basis
39 {
40 template <typename ValueTypeBasisCoeff,
43 {
44 public:
45 static void
48 & vectorData,
49 const size_type blockSize,
51 &rowConstraintsIdsLocal,
52 const utils::MemoryStorage<size_type, memorySpace> &rowConstraintsSizes,
54 &columnConstraintsIdsLocal,
56 &columnConstraintsAccumulated,
58 &columnConstraintsValues,
60 & constraintsInhomogenities,
62
63 static void
66 & vectorData,
67 const size_type blockSize,
69 &rowConstraintsIdsLocal,
70 const utils::MemoryStorage<size_type, memorySpace> &rowConstraintsSizes,
72 &columnConstraintsIdsLocal,
74 &columnConstraintsAccumulated,
76 & columnConstraintsValues,
78
79 static void
82 & vectorData,
83 const size_type blockSize,
85 & rowConstraintsIdsLocal,
87
88
89 static void
92 & vectorData,
93 const size_type blockSize,
95 & rowConstraintsIdsLocal,
96 const ValueTypeBasisCoeff alpha,
98 };
99
100
101#ifdef DFTEFE_WITH_DEVICE
102 template <typename ValueTypeBasisCoeff>
103 class ConstraintsInternal<ValueTypeBasisCoeff,
105 {
106 public:
107 static void
109 linearAlgebra::MultiVector<ValueTypeBasisCoeff,
111 & vectorData,
112 const size_type blockSize,
115 &rowConstraintsIdsLocal,
118 &rowConstraintsSizes,
121 &columnConstraintsIdsLocal,
124 &columnConstraintsAccumulated,
126 &columnConstraintsValues,
128 &constraintsInhomogenities,
130 &linAlgOpContext);
131
132 static void
134 linearAlgebra::MultiVector<ValueTypeBasisCoeff,
136 & vectorData,
137 const size_type blockSize,
140 &rowConstraintsIdsLocal,
143 &rowConstraintsSizes,
146 &columnConstraintsIdsLocal,
149 &columnConstraintsAccumulated,
151 &columnConstraintsValues,
153 &linAlgOpContext);
154
155 static void
157 linearAlgebra::MultiVector<ValueTypeBasisCoeff,
159 & vectorData,
160 const size_type blockSize,
163 &rowConstraintsIdsLocal,
165 &linAlgOpContext);
166
167 static void
169 linearAlgebra::MultiVector<ValueTypeBasisCoeff,
171 & vectorData,
172 const size_type blockSize,
175 & rowConstraintsIdsLocal,
176 const ValueTypeBasisCoeff alpha,
178 &linAlgOpContext);
179 };
180#endif
181
182 } // namespace basis
183} // namespace dftefe
184
185
186#endif // dftefeConstraintsInternal_h
Definition: ConstraintsInternal.h:43
static void constraintsSetConstrainedNodesToZero(linearAlgebra::MultiVector< ValueTypeBasisCoeff, memorySpace > &vectorData, const size_type blockSize, const utils::MemoryStorage< size_type, memorySpace > &rowConstraintsIdsLocal, linearAlgebra::LinAlgOpContext< memorySpace > &linAlgOpContext)
Definition: ConstraintsInternal.cpp:176
static void constraintsDistributeChildToParent(linearAlgebra::MultiVector< ValueTypeBasisCoeff, memorySpace > &vectorData, const size_type blockSize, const utils::MemoryStorage< size_type, memorySpace > &rowConstraintsIdsLocal, const utils::MemoryStorage< size_type, memorySpace > &rowConstraintsSizes, const utils::MemoryStorage< size_type, memorySpace > &columnConstraintsIdsLocal, const utils::MemoryStorage< size_type, memorySpace > &columnConstraintsAccumulated, const utils::MemoryStorage< double, memorySpace > &columnConstraintsValues, linearAlgebra::LinAlgOpContext< memorySpace > &linAlgOpContext)
Definition: ConstraintsInternal.cpp:113
static void constraintsDistributeParentToChild(linearAlgebra::MultiVector< ValueTypeBasisCoeff, memorySpace > &vectorData, const size_type blockSize, const utils::MemoryStorage< size_type, memorySpace > &rowConstraintsIdsLocal, const utils::MemoryStorage< size_type, memorySpace > &rowConstraintsSizes, const utils::MemoryStorage< size_type, memorySpace > &columnConstraintsIdsLocal, const utils::MemoryStorage< size_type, memorySpace > &columnConstraintsAccumulated, const utils::MemoryStorage< double, memorySpace > &columnConstraintsValues, const utils::MemoryStorage< double, memorySpace > &constraintsInhomogenities, linearAlgebra::LinAlgOpContext< memorySpace > &linAlgOpContext)
Definition: ConstraintsInternal.cpp:38
static void constraintsSetConstrainedNodes(linearAlgebra::MultiVector< ValueTypeBasisCoeff, memorySpace > &vectorData, const size_type blockSize, const utils::MemoryStorage< size_type, memorySpace > &rowConstraintsIdsLocal, const ValueTypeBasisCoeff alpha, linearAlgebra::LinAlgOpContext< memorySpace > &linAlgOpContext)
Definition: ConstraintsInternal.cpp:200
Definition: LinAlgOpContext.h:52
An class template to encapsulate a MultiVector. A MultiVector is a collection of vectors belonging t...
Definition: MultiVector.h:134
Definition: MemoryStorage.h:38
MemorySpace
Definition: MemorySpaceType.h:37
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
std::uint64_t size_type
Definition: TypeConfig.h:9