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 forstd::tuple
), - static constexpr
T::size()
(e.g. needed forDune::TupleVector
), static constexprT::N()
(e.g. needed forDune::MultiTypeBlockMatrix
),dynamic member functiont.N()
(e.g. needed forDune::Matrix
),- dynamic member function
t.size()
(e.g. needed forstd::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.
Support for the N()
cases was removed from the MR and left to future discussion.
This MR now removes an obsolete special case for FieldVector
, extends the test to cover
this case, and fixes the documentation.