3#include <boost/numeric/mtl/vector/dense_vector.hpp>
5#include <dune/common/ftraits.hh>
7#include <amdis/Output.hpp>
8#include <amdis/common/FakeContainer.hpp>
9#include <amdis/linearalgebra/VectorBase.hpp>
10#include <amdis/typetree/MultiIndex.hpp>
14 class DefaultIndexDistribution;
36 using field_type =
typename Dune::FieldTraits<value_type>::field_type;
57 return mtl::vec::size(vector_);
62 template <
class Basis>
63 void init(Basis
const& basis,
bool clear)
65 vector_.change_dim(basis.dimension());
71 template <
class MultiIndex>
75 test_exit_dbg(i <
size(),
"Index {} out of range [0,{})", i,
size());
80 template <
class MultiIndex>
84 test_exit_dbg(i <
size(),
"Index {} out of range [0,{})", i,
size());
Dummy implementation for sequential index "distribution".
Definition: IndexDistribution.hpp:7
The basic container that stores a base vector data.
Definition: VectorBackend.hpp:20
value_type & at(MultiIndex const &idx)
Access the entry i of the vector with read-access.
Definition: VectorBackend.hpp:72
value_type const & at(MultiIndex const &idx) const
Access the entry i of the vector with read-access.
Definition: VectorBackend.hpp:81
typename BaseVector::value_type value_type
The type of the elements of the DOFVector.
Definition: VectorBackend.hpp:26
typename BaseVector::size_type size_type
The index/size - type.
Definition: VectorBackend.hpp:29
void init(Basis const &basis, bool clear)
Resize the vector_ to the size s.
Definition: VectorBackend.hpp:63
BaseVector & vector()
Return the data-vector vector_.
Definition: VectorBackend.hpp:49
MTLVector(DefaultIndexDistribution const &)
Constructor. Constructs new BaseVector.
Definition: VectorBackend.hpp:40
BaseVector const & vector() const
Return the data-vector vector_.
Definition: VectorBackend.hpp:43
std::size_t size() const
Return the current size of the vector_.
Definition: VectorBackend.hpp:55
mtl::dense_vector< T > BaseVector
The type of the base vector.
Definition: VectorBackend.hpp:23
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