DFT-EFE
 
Loading...
Searching...
No Matches
ConstraintsLocal.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#ifndef dftefeConstraintsLocal_h
27#define dftefeConstraintsLocal_h
28
29#include <utils/TypeConfig.h>
30#include <utils/MPIPatternP2P.h>
31
34namespace dftefe
35{
36 namespace basis
37 {
41 template <typename ValueTypeBasisCoeff, utils::MemorySpace memorySpace>
43 {
44 public:
45 ~ConstraintsLocal() = default;
46
47 //
48 // Copy function - note one has to call close after calling copyFrom
49 //
50 virtual void
52 &constraintsLocalIn) = 0;
53
54 virtual void
55 clear() = 0;
56 virtual void
58 ValueTypeBasisCoeff constraintValue) = 0;
59 virtual void
60 close() = 0;
61 virtual bool
62 isClosed() const = 0;
63 virtual bool
64 isConstrained(global_size_type basisId) const = 0;
65
66 virtual const std::vector<
67 std::pair<global_size_type, ValueTypeBasisCoeff>> *
68 getConstraintEntries(const global_size_type lineDof) const = 0;
69
70 virtual bool
72
73 virtual ValueTypeBasisCoeff
74 getInhomogeneity(const global_size_type lineDof) const = 0;
75
76 virtual void
79 & vectorData,
80 size_type blockSize) const = 0;
81 virtual void
84 & vectorData,
85 size_type blockSize) const = 0;
86
87 virtual void
90 & vectorData,
91 size_type blockSize) const = 0;
92
93 virtual void
95 memorySpace> &vectorData,
96 size_type blockSize,
97 ValueTypeBasisCoeff alpha) const = 0;
98 };
99
100 } // namespace basis
101} // namespace dftefe
102
103#endif // dftefeConstraints_h
Definition: ConstraintsLocal.h:43
virtual bool isClosed() const =0
virtual ValueTypeBasisCoeff getInhomogeneity(const global_size_type lineDof) const =0
virtual bool isConstrained(global_size_type basisId) const =0
virtual void setConstrainedNodes(linearAlgebra::MultiVector< ValueTypeBasisCoeff, memorySpace > &vectorData, size_type blockSize, ValueTypeBasisCoeff alpha) const =0
virtual void setInhomogeneity(global_size_type basisId, ValueTypeBasisCoeff constraintValue)=0
virtual void setConstrainedNodesToZero(linearAlgebra::MultiVector< ValueTypeBasisCoeff, memorySpace > &vectorData, size_type blockSize) const =0
virtual void distributeParentToChild(linearAlgebra::MultiVector< ValueTypeBasisCoeff, memorySpace > &vectorData, size_type blockSize) const =0
virtual void copyFrom(const ConstraintsLocal< ValueTypeBasisCoeff, memorySpace > &constraintsLocalIn)=0
virtual void distributeChildToParent(linearAlgebra::MultiVector< ValueTypeBasisCoeff, memorySpace > &vectorData, size_type blockSize) const =0
virtual const std::vector< std::pair< global_size_type, ValueTypeBasisCoeff > > * getConstraintEntries(const global_size_type lineDof) const =0
virtual bool isInhomogeneouslyConstrained(const global_size_type index) const =0
An class template to encapsulate a MultiVector. A MultiVector is a collection of vectors belonging t...
Definition: MultiVector.h:134
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
unsigned int size_type
Definition: TypeConfig.h:8
unsigned long int global_size_type
Definition: TypeConfig.h:9