![]() |
Dune-Fufem 2.12-git
|
Loading...
Searching...
No Matches
affineconstraints.hh
Go to the documentation of this file.
215 static_assert(Dune::AlwaysFalse<OtherMultiIndex>::value, "Value cannot be converted to MultiIndex type");
281 using LinearTerm = std::unordered_map<MultiIndex, LinearTermRow, MultiIndexHash, MultiIndexEquals>;
705 Dune::Fufem::recursiveForEachVectorEntry(isConstrained_, [&](auto&& isConstrained_i, const auto& i)
732 std::cout << "Error: interpolation for constrained DOF " << i << " depends on constrained DOF " << j << std::endl;
827 return Dune::Functions::makeContainer<char>(basis.rootBasis().preBasis().containerDescriptor(), false);
838 return Dune::Functions::makeISTLVector<Coefficient>(basis.rootBasis().preBasis().containerDescriptor());
849 static_assert(not std::is_same_v<GeneratedBitVector, std::monostate>, "Deducing a BitVector-type for non-flat indices in makeAffineConstraints requires dune-functions>=2.11.");
850 static_assert(not std::is_same_v<GeneratedVector, std::monostate>, "Deducing a Vector-type for non-flat indices in makeAffineConstraints requires dune-functions>=2.11.");
851 return AffineConstraints<GeneratedBitVector, GeneratedVector, MultiIndex, Coefficient>(generateBitVector(), generateVector());
Col col
void seed(const Vertex &vertex)
int size() const
void clear()
bool equals(const SLListConstIterator< T, A > &other) const
auto transformedRangeView(R &&range, F &&f)
static constexpr IntegralRange< T > range(T from, T to) noexcept
std::ptrdiff_t index() const
virtual void operator()()=0
void hash_combine(std::size_t &seed, const T &arg)
void mmv(const X &x, Y &y) const
Class to handle affine constraints on a subset of DOFs.
Definition affineconstraints.hh:196
void constrainVectorHomogeneously(Vector &b) const
Constrain vector to a constrained basis.
Definition affineconstraints.hh:653
AffineConstraints(const BitVector &isConstrained, const Vector &constantTerm)
Construct from bit vector and vector.
Definition affineconstraints.hh:301
AffineConstraints(const AffineConstraints &)=default
LinearTerm & linearTerm()
Mutable access to linear part of affine map.
Definition affineconstraints.hh:352
void resolveDependencies()
Resolve dependencies of constrained DOFs on other constrained DOFs.
Definition affineconstraints.hh:751
void constrainMatrix(Matrix &A) const
Constrain matrix to a constrained basis.
Definition affineconstraints.hh:592
const auto & constantTerm(const MultiIndexType &i) const
Const access to i-th row of constant part of affine map.
Definition affineconstraints.hh:407
void report() const
Report the constraints to std::cout.
Definition affineconstraints.hh:703
AffineConstraints(BitVector &&isConstrained, Vector &&constantTerm)
Construct from bit vector and vector.
Definition affineconstraints.hh:293
std::map< MI, Coefficient > LinearTermRow
Definition affineconstraints.hh:280
AffineConstraints()=default
const LinearTermRow & linearTerm(const MultiIndexType &i) const
Const access to i-th row of linear part of affine map.
Definition affineconstraints.hh:369
const LinearTerm & linearTerm() const
Const access to linear part of affine map.
Definition affineconstraints.hh:339
void extendMatrixPattern(MatrixPatternBackend &patternBackend, const Basis &basis) const
Extend matrix pattern for a constrained basis.
Definition affineconstraints.hh:486
void constrainVector(Vector &b) const
Constrain vector to a constrained basis.
Definition affineconstraints.hh:630
bool check() const
Check constraints for consistency.
Definition affineconstraints.hh:723
bool isConstrained(const MultiIndexType &i) const
Check if i-th DOF is constrained.
Definition affineconstraints.hh:310
const BitVector & isConstrained() const
Const access to bit-vector marking constrained DOFs.
Definition affineconstraints.hh:318
const ConstantTerm & constantTerm() const
Const access to constant part of affine map.
Definition affineconstraints.hh:384
BitVector & isConstrained()
Mutable access to bit-vector marking constrained DOFs.
Definition affineconstraints.hh:326
void interpolate(Vector &v) const
Interpolate vector according to affine constraints.
Definition affineconstraints.hh:436
void constrainLinearSystem(Matrix &A, Vector &b) const
Constrain linear system affine subspace satisfying the constraints.
Definition affineconstraints.hh:676
void interpolateHomogeneously(Vector &v) const
Interpolate vector according to affine constraints.
Definition affineconstraints.hh:464
std::unordered_map< MultiIndex, LinearTermRow, MultiIndexHash, MultiIndexEquals > LinearTerm
Definition affineconstraints.hh:281
void constrainLinearSystemHomogeneously(Matrix &A, Vector &b) const
Constrain linear system affine subspace satisfying the constraints.
Definition affineconstraints.hh:694
ConstantTerm & constantTerm()
Mutable access to constant part of affine map.
Definition affineconstraints.hh:395
AffineConstraints(AffineConstraints &&)=default
auto & constantTerm(const MultiIndexType &i)
Mutable access to i-th row of constant part of affine map.
Definition affineconstraints.hh:419
T copy(T... args)
T end(T... args)
T endl(T... args)
T find(T... args)
T forward(T... args)
auto makeAffineConstraints(const Basis &basis)
Create and initialize an AffineConstraints object for a basis.
Definition affineconstraints.hh:820
auto istlVectorBackend(Vector &v)
T is_same_v
Definition dunefunctionsboundaryfunctionalassembler.hh:29
STL namespace.
T size(T... args)
T swap(T... args)
