[dune-functions] How to check that a function is scalar (or vector valued)

Christian Engwer christian.engwer at uni-muenster.de
Wed Apr 1 10:10:34 CEST 2015


Dear all,

I'm currently struggling with a particular problem. I tried to get the
dune-pdelab interpolate work with new-style dune-functions
functions. The particular problem for me is now, that I have to deduce
the range type of my function. In particular I have check that the
returned value is either is_scalar (we would like to be able to return
double instead of FieldVector<double,1>) or that the size() is a
constexpr with value 1. One particular problem is that the size method
is not static, thus we can not easily check the value without an
object... It seems my C++ skills are diminishing, so perhaps one you
guys can enlighten me ;-)

I tried to come up with a type trait to check for the value of size,
but the non-static thing was always the show-stopper for me.

Ciao
Christian




More information about the dune-functions mailing list