26#ifndef dftefeCFEConstraintsLocalDealii_h
27#define dftefeCFEConstraintsLocalDealii_h
31#include <deal.II/lac/affine_constraints.h>
34#include <unordered_map>
41 template <
typename ValueTypeBasisCoeff,
53 const dealii::IndexSet &locally_relevant_dofs);
56 dealii::AffineConstraints<ValueTypeBasisCoeff>
57 &dealiiAffineConstraintMatrix,
58 std::vector<std::pair<global_size_type, global_size_type>>
60 std::vector<global_size_type> &ghostIndices,
61 std::unordered_map<global_size_type, size_type>
62 &globalToLocalMapLocalDofs);
71 &constraintsLocalIn)
override;
84 ValueTypeBasisCoeff constraintValue)
override;
86 const std::vector<std::pair<global_size_type, ValueTypeBasisCoeff>> *
114 memorySpace> &vectorData,
116 ValueTypeBasisCoeff alpha)
const override;
121 const dealii::AffineConstraints<ValueTypeBasisCoeff> &
131 const std::vector<std::pair<global_size_type, ValueTypeBasisCoeff>>
155 dealii::AffineConstraints<ValueTypeBasisCoeff>
172 std::vector<std::pair<global_size_type, global_size_type>>
Definition: CFEConstraintsLocalDealii.h:46
SizeTypeVector d_rowConstraintsSizes
Definition: CFEConstraintsLocalDealii.h:170
bool d_isClosed
Definition: CFEConstraintsLocalDealii.h:158
void close() override
Definition: CFEConstraintsLocalDealii.t.cpp:98
dealii::AffineConstraints< ValueTypeBasisCoeff > d_dealiiAffineConstraintMatrix
Definition: CFEConstraintsLocalDealii.h:156
void copyConstraintsDataFromDealiiToDealii(const CFEConstraintsLocalDealii< ValueTypeBasisCoeff, memorySpace, dim > &constraintsDataIn)
Definition: CFEConstraintsLocalDealii.t.cpp:192
void addEntries(const global_size_type constrainedDofIndex, const std::vector< std::pair< global_size_type, ValueTypeBasisCoeff > > &colWeightPairs)
Definition: CFEConstraintsLocalDealii.t.cpp:467
bool isConstrained(global_size_type basisId) const override
Definition: CFEConstraintsLocalDealii.t.cpp:140
GlobalSizeTypeVector d_columnConstraintsIdsGlobal
Definition: CFEConstraintsLocalDealii.h:164
std::vector< global_size_type > d_ghostIndices
Definition: CFEConstraintsLocalDealii.h:174
void setConstrainedNodesToZero(linearAlgebra::MultiVector< ValueTypeBasisCoeff, memorySpace > &vectorData, size_type blockSize) const override
Definition: CFEConstraintsLocalDealii.t.cpp:534
void distributeParentToChild(linearAlgebra::MultiVector< ValueTypeBasisCoeff, memorySpace > &vectorData, size_type blockSize) const override
Definition: CFEConstraintsLocalDealii.t.cpp:491
utils::MemoryStorage< double, memorySpace > d_columnConstraintsValues
Definition: CFEConstraintsLocalDealii.h:166
bool isClosed() const override
Definition: CFEConstraintsLocalDealii.t.cpp:129
void setInhomogeneity(global_size_type basisId, ValueTypeBasisCoeff constraintValue) override
Definition: CFEConstraintsLocalDealii.t.cpp:111
bool isInhomogeneouslyConstrained(const global_size_type index) const override
Definition: CFEConstraintsLocalDealii.t.cpp:170
GlobalSizeTypeVector d_rowConstraintsIdsGlobal
Definition: CFEConstraintsLocalDealii.h:160
SizeTypeVector d_columnConstraintsIdsLocal
Definition: CFEConstraintsLocalDealii.h:162
SizeTypeVector d_constraintRowSizesAccumulated
Definition: CFEConstraintsLocalDealii.h:163
const dealii::AffineConstraints< ValueTypeBasisCoeff > & getAffineConstraints() const
Definition: CFEConstraintsLocalDealii.t.cpp:150
bool isGhostEntry(const global_size_type globalId) const
Definition: CFEConstraintsLocalDealii.t.cpp:567
bool inLocallyOwnedRanges(const global_size_type globalId) const
Definition: CFEConstraintsLocalDealii.t.cpp:583
const std::vector< std::pair< global_size_type, ValueTypeBasisCoeff > > * getConstraintEntries(const global_size_type lineDof) const override
Definition: CFEConstraintsLocalDealii.t.cpp:160
SizeTypeVector d_rowConstraintsIdsLocal
Definition: CFEConstraintsLocalDealii.h:161
void distributeChildToParent(linearAlgebra::MultiVector< ValueTypeBasisCoeff, memorySpace > &vectorData, size_type blockSize) const override
Definition: CFEConstraintsLocalDealii.t.cpp:513
~CFEConstraintsLocalDealii()=default
bool d_isCleared
Definition: CFEConstraintsLocalDealii.h:157
void addLine(const global_size_type lineDof)
Definition: CFEConstraintsLocalDealii.t.cpp:480
void copyFrom(const ConstraintsLocal< ValueTypeBasisCoeff, memorySpace > &constraintsLocalIn) override
Definition: CFEConstraintsLocalDealii.t.cpp:62
size_type globalToLocal(const global_size_type globalId) const
Definition: CFEConstraintsLocalDealii.t.cpp:602
std::vector< std::pair< global_size_type, global_size_type > > d_locallyOwnedRanges
Definition: CFEConstraintsLocalDealii.h:173
void setConstrainedNodes(linearAlgebra::MultiVector< ValueTypeBasisCoeff, memorySpace > &vectorData, size_type blockSize, ValueTypeBasisCoeff alpha) const override
Definition: CFEConstraintsLocalDealii.t.cpp:550
utils::MemoryStorage< ValueTypeBasisCoeff, memorySpace > d_constraintsInhomogenities
Definition: CFEConstraintsLocalDealii.h:168
ValueTypeBasisCoeff getInhomogeneity(const global_size_type lineDof) const override
Definition: CFEConstraintsLocalDealii.t.cpp:181
void copyConstraintsDataFromDealiiToDftefe()
Definition: CFEConstraintsLocalDealii.t.cpp:290
std::unordered_map< global_size_type, size_type > d_globalToLocalMap
Definition: CFEConstraintsLocalDealii.h:175
void clear() override
Definition: CFEConstraintsLocalDealii.t.cpp:87
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