Skip to content
Snippets Groups Projects
Commit 36bf1861 authored by Carsten Gräser's avatar Carsten Gräser
Browse files

Make matrix/vector traversal termination work with proxy types

parent 432a70c4
Branches
Tags
1 merge request!258Add constraints support for dune-functions basis
......@@ -8,6 +8,7 @@
#include <functional>
#include <variant>
#include <dune/common/typetraits.hh>
#include <dune/common/rangeutilities.hh>
#include <dune/common/hybridutilities.hh>
......@@ -115,7 +116,7 @@ namespace Dune::Fufem::Impl {
template<class Entry, class FlatIndex>
void operator()(Entry&& vector_i, FlatIndex i)
{
if constexpr (Dune::IsNumber<std::decay_t<Entry>>::value)
if constexpr (Dune::IsNumber<typename Dune::AutonomousValueType<std::decay_t<Entry>>::type>::value)
f_(vector_i, extendMultiIndex(index_, i));
else
Impl::forEachVectorEntry(vector_i, Dune::Fufem::Impl::RecursiveVectorVisitor(f_, extendMultiIndex(index_, i)));
......@@ -141,7 +142,7 @@ namespace Dune::Fufem::Impl {
template<class Entry, class FlatRowIndex, class FlatColIndex>
void operator()(Entry&& matrix_ij, FlatRowIndex i, FlatColIndex j)
{
if constexpr (Dune::IsNumber<std::decay_t<Entry>>::value)
if constexpr (Dune::IsNumber<typename Dune::AutonomousValueType<std::decay_t<Entry>>::type>::value)
f_(matrix_ij, extendMultiIndex(rowIndex_, i), extendMultiIndex(colIndex_, j));
else
Impl::forEachMatrixEntry(matrix_ij, Dune::Fufem::Impl::RecursiveMatrixVisitor(f_, extendMultiIndex(rowIndex_, i), extendMultiIndex(colIndex_, j)));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment