-
- Downloads
Improve specializations of Hybrid::size()
The interfaces tested subsequently for `Hybrid::size(const T& t)` are now * standard tuple-like interface `std::tuple_size<T>::value` (e.g. needed for `std::tuple`), * static constexpr `T::size()` (e.g. needed for `Dune::TupleVector`), * static constexpr `T::N()` (e.g. needed for `Dune::MultiTypeBlockMatrix`), * dynamic member function `t.N()` (e.g. needed for `Dune::Matrix`), * dynamic member function `t.size()` (e.g. needed for `std::vector`). Unfortunately the matrix interface is rather inconsistent. While `Dune::DenseMatrix` provides a dyanmic `size()` method, the dynamic dense matrix `Dune::Matrix` does not. The only consistent interface to get the number of rows is the `N()` method which exists in dynamic (e.g. `Dune::Matrix`) and constexpr static (e.g. `Dune::MultiTypeBlockMatrix`) flavour. Hence to support matrices consistently, we must add support for those cases, too. For the static constexpr `N()`, this was made neccessary, because of the removal of static consexpr `Dune::MultiTypeBlockMatrix::size()`. The dynamic case should be added for consistency to also support `Dune::Matrix` and `Dune::BCRSMatrix`. As a by-product, this allows to get rid of the `FieldMatrix` specialization.
Please register or sign in to comment