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());
constexpr bool MultiIndex
A multi-index type.
Definition: Concepts.hpp:149
MTLVector(DefaultIndexDistribution const &)
Constructor. Constructs new BaseVector.
Definition: VectorBackend.hpp:40
Definition: ForEach.hpp:17
typename BaseVector::value_type value_type
The type of the elements of the DOFVector.
Definition: VectorBackend.hpp:26
Definition: AdaptBase.hpp:6
void init(Basis const &basis, bool clear)
Resize the vector_ to the size s.
Definition: VectorBackend.hpp:63
General implementation of recursive inner-product.
Definition: InnerProduct.hpp:16
value_type & at(MultiIndex const &idx)
Access the entry i of the vector with read-access.
Definition: VectorBackend.hpp:72
mtl::dense_vector< T > BaseVector
The type of the base vector.
Definition: VectorBackend.hpp:23
std::size_t size() const
Return the current size of the vector_.
Definition: VectorBackend.hpp:55
CRTP base class for flat vector backends.
Definition: VectorBase.hpp:18
Dummy implementation for sequential index "distribution".
Definition: IndexDistribution.hpp:6
The basic container that stores a base vector data.
Definition: VectorBackend.hpp:18
BaseVector & vector()
Return the data-vector vector_.
Definition: VectorBackend.hpp:49
value_type const & at(MultiIndex const &idx) const
Access the entry i of the vector with read-access.
Definition: VectorBackend.hpp:81
typename BaseVector::size_type size_type
The index/size - type.
Definition: VectorBackend.hpp:29
BaseVector const & vector() const
Return the data-vector vector_.
Definition: VectorBackend.hpp:43