5#include <dune/common/ftraits.hh>
7#include <amdis/Output.hpp>
8#include <amdis/algorithm/ForEach.hpp>
9#include <amdis/algorithm/Transform.hpp>
10#include <amdis/common/FakeContainer.hpp>
11#include <amdis/linearalgebra/VectorBase.hpp>
12#include <amdis/typetree/MultiIndex.hpp>
16 class DefaultIndexDistribution;
38 using field_type =
typename Dune::FieldTraits<value_type>::field_type;
59 return vector_.size();
64 template <
class Basis>
65 void init(Basis
const& basis,
bool clear)
67 vector_.resize(basis.dimension());
74 template <
class MultiIndex>
78 test_exit_dbg(i <
size(),
"Index {} out of range [0,{})", i,
size());
79 return vector_.coeffRef(i);
83 template <
class MultiIndex>
87 test_exit_dbg(i <
size(),
"Index {} out of range [0,{})", i,
size());
88 return vector_.coeff(i);
Dummy implementation for sequential index "distribution".
Definition: IndexDistribution.hpp:7
The basic container that stores a base vector and a corresponding basis.
Definition: VectorBackend.hpp:22
value_type & at(MultiIndex const &idx)
Access the entry i of the vector with write-access.
Definition: VectorBackend.hpp:75
value_type const & at(MultiIndex const &idx) const
Access the entry i of the vector with read-access.
Definition: VectorBackend.hpp:84
typename BaseVector::Index size_type
The index/size - type.
Definition: VectorBackend.hpp:31
typename BaseVector::Scalar value_type
The type of the elements of the DOFVector.
Definition: VectorBackend.hpp:28
size_type size() const
Return the current size of the vector_.
Definition: VectorBackend.hpp:57
EigenVector(DefaultIndexDistribution const &)
Constructor. Constructs new BaseVector.
Definition: VectorBackend.hpp:42
void init(Basis const &basis, bool clear)
Resize the vector_ to the size s.
Definition: VectorBackend.hpp:65
Eigen::Matrix< T, Eigen::Dynamic, 1 > BaseVector
The type of the base vector.
Definition: VectorBackend.hpp:25
BaseVector & vector()
Return the data-vector vector_.
Definition: VectorBackend.hpp:51
BaseVector const & vector() const
Return the data-vector vector_.
Definition: VectorBackend.hpp:45
CRTP base class for flat vector backends.
Definition: VectorBase.hpp:19
constexpr bool MultiIndex
A multi-index type.
Definition: Concepts.hpp:149
Definition: ForEach.hpp:39
General implementation of recursive inner-product.
Definition: InnerProduct.hpp:58