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);
86
87
88 static void
91 & vectorData,
92 const size_type blockSize,
94 & rowConstraintsIdsLocal,
95 const ValueTypeBasisCoeff alpha);
96 };
97
98
99#ifdef DFTEFE_WITH_DEVICE
100 template <typename ValueTypeBasisCoeff>
101 class ConstraintsInternal<ValueTypeBasisCoeff,
103 {
104 public:
105 static void
107 linearAlgebra::MultiVector<ValueTypeBasisCoeff,
109 & vectorData,
110 const size_type blockSize,
113 &rowConstraintsIdsLocal,
116 &rowConstraintsSizes,
119 &columnConstraintsIdsLocal,
122 &columnConstraintsAccumulated,
124 &columnConstraintsValues,
125 const utils::MemoryStorage<ValueTypeBasisCoeff,
127 &constraintsInhomogenities,
129 &linAlgOpContext);
130
131 static void
133 linearAlgebra::MultiVector<ValueTypeBasisCoeff,
135 & vectorData,
136 const size_type blockSize,
139 &rowConstraintsIdsLocal,
142 &rowConstraintsSizes,
145 &columnConstraintsIdsLocal,
148 &columnConstraintsAccumulated,
150 &columnConstraintsValues,
152 &linAlgOpContext);
153
154 static void
156 linearAlgebra::MultiVector<ValueTypeBasisCoeff,
158 & vectorData,
159 const size_type blockSize,
162 &rowConstraintsIdsLocal);
163 };
164#endif
165
166 } // namespace basis
167} // namespace dftefe
168
169
170#endif // dftefeConstraintsInternal_h
Definition: ConstraintsInternal.h:43
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< ValueTypeBasisCoeff, memorySpace > &constraintsInhomogenities, linearAlgebra::LinAlgOpContext< memorySpace > &linAlgOpContext)
Definition: ConstraintsInternal.cpp:38
static void constraintsSetConstrainedNodesToZero(linearAlgebra::MultiVector< ValueTypeBasisCoeff, memorySpace > &vectorData, const size_type blockSize, const utils::MemoryStorage< size_type, memorySpace > &rowConstraintsIdsLocal)
Definition: ConstraintsInternal.cpp:176
static void constraintsSetConstrainedNodes(linearAlgebra::MultiVector< ValueTypeBasisCoeff, memorySpace > &vectorData, const size_type blockSize, const utils::MemoryStorage< size_type, memorySpace > &rowConstraintsIdsLocal, const ValueTypeBasisCoeff alpha)
Definition: ConstraintsInternal.cpp:199
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
Definition: LinAlgOpContext.h:38
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
unsigned int size_type
Definition: TypeConfig.h:8