Deprecation warnings from Dune::Hybrid::size
At some points, e.g. in the multidomain assembler, we use for Dune::MultiTypeBlockMatrix
/Dune::MultiTypeBlockVector
m
:
using namespace Dune::Hybrid;
forEach(m, [](auto& row){
...
});
This accesses Dune::MultiTypeBlockMatrix::size
which is deprecated since before dune 2.7 and causes the warning. Unfortunately this means we need to use a bit more verbose syntax:
using namespace Dune::Hybrid;
forEach(integralRange(M::N()), [](auto& i){
auto& row = m[i];
...
});
should work.
A proposal to allow ::N()
to de deduced from a range passed to Dune::Hybrid::forEach
(https://gitlab.dune-project.org/core/dune-common/-/merge_requests/803) has been rejected for good reasons. The might be something like rows(m)
in the future... but that doesn't help now.
Edited by Timo Koch