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> 36 using field_type =
typename Dune::FieldTraits<value_type>::field_type;
40 template <
class Basis>
58 return vector_.size();
63 template <
class SizeInfo>
73 template <
class MultiIndex>
77 test_exit_dbg(i <
size(),
"Index {} out of range [0,{})", i,
size());
78 return vector_.coeffRef(i);
82 template <
class MultiIndex>
86 test_exit_dbg(i <
size(),
"Index {} out of range [0,{})", i,
size());
87 return vector_.coeff(i);
value_type const & at(MultiIndex const &idx) const
Access the entry i of the vector with read-access.
Definition: VectorBackend.hpp:83
constexpr bool MultiIndex
A multi-index type.
Definition: Concepts.hpp:150
typename BaseVector::Scalar value_type
The type of the elements of the DOFVector.
Definition: VectorBackend.hpp:26
BaseVector & vector()
Return the data-vector vector_.
Definition: VectorBackend.hpp:50
Eigen::Matrix< T, Eigen::Dynamic, 1 > BaseVector
The type of the base vector.
Definition: VectorBackend.hpp:23
value_type & at(MultiIndex const &idx)
Access the entry i of the vector with write-access.
Definition: VectorBackend.hpp:74
Definition: AdaptBase.hpp:6
EigenVector(Basis const &)
Constructor. Constructs new BaseVector.
Definition: VectorBackend.hpp:41
The basic container that stores a base vector and a corresponding basis.
Definition: VectorBackend.hpp:18
typename BaseVector::Index size_type
The index/size - type.
Definition: VectorBackend.hpp:29
void init(SizeInfo const &size, bool clear)
Resize the vector_ to the size s.
Definition: VectorBackend.hpp:64
CRTP base class for flat vector backends.
Definition: VectorBase.hpp:18
BaseVector const & vector() const
Return the data-vector vector_.
Definition: VectorBackend.hpp:44
size_type size() const
Return the current size of the vector_.
Definition: VectorBackend.hpp:56