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> 34 using field_type =
typename Dune::FieldTraits<value_type>::field_type;
38 template <
class Basis>
56 return mtl::vec::size(vector_);
61 template <
class SizeInfo>
62 void init(SizeInfo
const& sizeInfo,
bool clear)
64 vector_.change_dim(sizeInfo({}));
70 template <
class MultiIndex>
74 test_exit_dbg(i <
size(),
"Index {} out of range [0,{})", i,
size());
79 template <
class MultiIndex>
83 test_exit_dbg(i <
size(),
"Index {} out of range [0,{})", i,
size());
constexpr bool MultiIndex
A multi-index type.
Definition: Concepts.hpp:150
void init(SizeInfo const &sizeInfo, bool clear)
Resize the vector_ to the size s.
Definition: VectorBackend.hpp:62
typename BaseVector::value_type value_type
The type of the elements of the DOFVector.
Definition: VectorBackend.hpp:24
Definition: AdaptBase.hpp:6
value_type & at(MultiIndex const &idx)
Access the entry i of the vector with read-access.
Definition: VectorBackend.hpp:71
mtl::dense_vector< T > BaseVector
The type of the base vector.
Definition: VectorBackend.hpp:21
std::size_t size() const
Return the current size of the vector_.
Definition: VectorBackend.hpp:54
CRTP base class for flat vector backends.
Definition: VectorBase.hpp:18
MTLVector(Basis const &)
Constructor. Constructs new BaseVector.
Definition: VectorBackend.hpp:39
The basic container that stores a base vector data.
Definition: VectorBackend.hpp:16
BaseVector & vector()
Return the data-vector vector_.
Definition: VectorBackend.hpp:48
value_type const & at(MultiIndex const &idx) const
Access the entry i of the vector with read-access.
Definition: VectorBackend.hpp:80
typename BaseVector::size_type size_type
The index/size - type.
Definition: VectorBackend.hpp:27
BaseVector const & vector() const
Return the data-vector vector_.
Definition: VectorBackend.hpp:42