26#ifndef dftefeCFEConstraintsLocalDealii_h
27#define dftefeCFEConstraintsLocalDealii_h
31#include <deal.II/lac/affine_constraints.h>
34#include <unordered_map>
41 template <
typename ValueTypeBasisCoeff,
55 dealii::AffineConstraints<ValueTypeBasisCoeff>
56 &dealiiAffineConstraintMatrix,
57 std::vector<std::pair<global_size_type, global_size_type>>
59 std::vector<global_size_type> &ghostIndices,
60 std::unordered_map<global_size_type, size_type>
61 &globalToLocalMapLocalDofs);
70 &constraintsLocalIn)
override;
83 ValueTypeBasisCoeff constraintValue)
override;
85 const std::vector<std::pair<global_size_type, ValueTypeBasisCoeff>> *
113 memorySpace> &vectorData,
115 ValueTypeBasisCoeff alpha)
const override;
120 const dealii::AffineConstraints<ValueTypeBasisCoeff> &
130 const std::vector<std::pair<global_size_type, ValueTypeBasisCoeff>>
154 dealii::AffineConstraints<ValueTypeBasisCoeff>
171 std::vector<std::pair<global_size_type, global_size_type>>
Definition: CFEConstraintsLocalDealii.h:46
SizeTypeVector d_rowConstraintsSizes
Definition: CFEConstraintsLocalDealii.h:169
bool d_isClosed
Definition: CFEConstraintsLocalDealii.h:157
void close() override
Definition: CFEConstraintsLocalDealii.t.cpp:96
dealii::AffineConstraints< ValueTypeBasisCoeff > d_dealiiAffineConstraintMatrix
Definition: CFEConstraintsLocalDealii.h:155
void copyConstraintsDataFromDealiiToDealii(const CFEConstraintsLocalDealii< ValueTypeBasisCoeff, memorySpace, dim > &constraintsDataIn)
Definition: CFEConstraintsLocalDealii.t.cpp:190
void addEntries(const global_size_type constrainedDofIndex, const std::vector< std::pair< global_size_type, ValueTypeBasisCoeff > > &colWeightPairs)
Definition: CFEConstraintsLocalDealii.t.cpp:465
bool isConstrained(global_size_type basisId) const override
Definition: CFEConstraintsLocalDealii.t.cpp:138
GlobalSizeTypeVector d_columnConstraintsIdsGlobal
Definition: CFEConstraintsLocalDealii.h:163
std::vector< global_size_type > d_ghostIndices
Definition: CFEConstraintsLocalDealii.h:173
void setConstrainedNodesToZero(linearAlgebra::MultiVector< ValueTypeBasisCoeff, memorySpace > &vectorData, size_type blockSize) const override
Definition: CFEConstraintsLocalDealii.t.cpp:532
void distributeParentToChild(linearAlgebra::MultiVector< ValueTypeBasisCoeff, memorySpace > &vectorData, size_type blockSize) const override
Definition: CFEConstraintsLocalDealii.t.cpp:489
utils::MemoryStorage< double, memorySpace > d_columnConstraintsValues
Definition: CFEConstraintsLocalDealii.h:165
bool isClosed() const override
Definition: CFEConstraintsLocalDealii.t.cpp:127
void setInhomogeneity(global_size_type basisId, ValueTypeBasisCoeff constraintValue) override
Definition: CFEConstraintsLocalDealii.t.cpp:109
bool isInhomogeneouslyConstrained(const global_size_type index) const override
Definition: CFEConstraintsLocalDealii.t.cpp:168
GlobalSizeTypeVector d_rowConstraintsIdsGlobal
Definition: CFEConstraintsLocalDealii.h:159
SizeTypeVector d_columnConstraintsIdsLocal
Definition: CFEConstraintsLocalDealii.h:161
SizeTypeVector d_constraintRowSizesAccumulated
Definition: CFEConstraintsLocalDealii.h:162
const dealii::AffineConstraints< ValueTypeBasisCoeff > & getAffineConstraints() const
Definition: CFEConstraintsLocalDealii.t.cpp:148
bool isGhostEntry(const global_size_type globalId) const
Definition: CFEConstraintsLocalDealii.t.cpp:565
bool inLocallyOwnedRanges(const global_size_type globalId) const
Definition: CFEConstraintsLocalDealii.t.cpp:581
const std::vector< std::pair< global_size_type, ValueTypeBasisCoeff > > * getConstraintEntries(const global_size_type lineDof) const override
Definition: CFEConstraintsLocalDealii.t.cpp:158
SizeTypeVector d_rowConstraintsIdsLocal
Definition: CFEConstraintsLocalDealii.h:160
void distributeChildToParent(linearAlgebra::MultiVector< ValueTypeBasisCoeff, memorySpace > &vectorData, size_type blockSize) const override
Definition: CFEConstraintsLocalDealii.t.cpp:511
~CFEConstraintsLocalDealii()=default
bool d_isCleared
Definition: CFEConstraintsLocalDealii.h:156
void addLine(const global_size_type lineDof)
Definition: CFEConstraintsLocalDealii.t.cpp:478
void copyFrom(const ConstraintsLocal< ValueTypeBasisCoeff, memorySpace > &constraintsLocalIn) override
Definition: CFEConstraintsLocalDealii.t.cpp:60
size_type globalToLocal(const global_size_type globalId) const
Definition: CFEConstraintsLocalDealii.t.cpp:600
std::vector< std::pair< global_size_type, global_size_type > > d_locallyOwnedRanges
Definition: CFEConstraintsLocalDealii.h:172
void setConstrainedNodes(linearAlgebra::MultiVector< ValueTypeBasisCoeff, memorySpace > &vectorData, size_type blockSize, ValueTypeBasisCoeff alpha) const override
Definition: CFEConstraintsLocalDealii.t.cpp:548
utils::MemoryStorage< ValueTypeBasisCoeff, memorySpace > d_constraintsInhomogenities
Definition: CFEConstraintsLocalDealii.h:167
ValueTypeBasisCoeff getInhomogeneity(const global_size_type lineDof) const override
Definition: CFEConstraintsLocalDealii.t.cpp:179
void copyConstraintsDataFromDealiiToDftefe()
Definition: CFEConstraintsLocalDealii.t.cpp:288
std::unordered_map< global_size_type, size_type > d_globalToLocalMap
Definition: CFEConstraintsLocalDealii.h:174
void clear() override
Definition: CFEConstraintsLocalDealii.t.cpp:85
Definition: ConstraintsLocal.h:43
An class template to encapsulate a MultiVector. A MultiVector is a collection of vectors belonging t...
Definition: MultiVector.h:134
MemorySpace
Definition: MemorySpaceType.h:37
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
unsigned int size_type
Definition: TypeConfig.h:8
unsigned long int global_size_type
Definition: TypeConfig.h:9