[dune-functions] interface check for GridViewFunction

Christian Engwer christian.engwer at uni-muenster.de
Sun Sep 20 16:13:01 CEST 2015


Hi Carsten,

thanks for putting this concept together. One downside of the current
concepts approach (in contrast to interface tests) is that I don't get
any information on what is missing/broken in the interface.

Is there an easy way to fix this? If not in general, then at least for
debugging?

Ciao
Christian

On Sun, Sep 20, 2015 at 01:15:20AM +0200, Carsten Gräser wrote:
> Am 20.09.2015 um 00:04 schrieb Carsten Gräser:
> > Am 19.09.2015 um 23:40 schrieb Christian Engwer:
> >> Dear all,
> >>
> >> I lost track... how do I test, whether my implementation fulfills the
> >> GridViewFunction interface?
> > 
> > There's no dedicated check for GridViewFunctions. But you can use the
> > concept check for grid functions wrt to the GridViewEntitySet. Assume
> > that you have given types Function/Range/GridView you can use
> > 
> >  using Coordinate = GridView::Codim<0> ::Geometry::GlobalCoordinate;
> >  using Signature = Range(Coordinate);
> >  using EntitySet = Dune::Functions::GridViewEntitySet<GridView, 0>;
> >  bool isGridViewFunction
> >         = Dune::Functions::Concept::isGridFunction<Function, Signature, EntitySet>();
> 
> Now you can do
> 
>   using Coordinate = GridView::Codim<0> ::Geometry::GlobalCoordinate;
>   using Signature = Range(Coordinate);
>   bool isGridViewFunction
>          = Dune::Functions::Concept::isGridViewFunction<Function,Signature, GridView>();
> 
> I'm thinking if we should replace the parameter Signature in favor of Range
> to make the check easier. Domain can be derived from the GridView/EntitySet
> and the concept does anyway check if EntitySet::GlobalCoordinate is convertible
> to Domain.
> 
> This would mean to adjust uses of the concept in dune-functions.
> Did anyone use the GridFunction concept definition outside of
> dune-functions?
> 
> Best,
> Carsten
> 
> 
> > 
> > Maybe I'll add this as a shortcut to functionconcepts.
> > 
> > Best,
> > Carsten
> > 
> > 
> > 
> > _______________________________________________
> > dune-functions mailing list
> > dune-functions at dune-project.org
> > http://lists.dune-project.org/mailman/listinfo/dune-functions
> > 
> 
> 
> -- 
> Prof. Dr. Carsten Gräser
> Freie Universität Berlin
> Institut für Mathematik
> Arnimallee 6
> 14195 Berlin, Germany
> phone: +49 30 838 72637
> fax  : +49 30 838 472637
> email: graeser at mi.fu-berlin.de
> URL  : http://page.mi.fu-berlin.de/graeser
> 



> _______________________________________________
> dune-functions mailing list
> dune-functions at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-functions


-- 
Prof. Dr. Christian Engwer 
Institut für Numerische und Angewandte Mathematik
Fachbereich Mathematik und Informatik der Universität Münster
Einsteinstrasse 62
48149 Münster

E-Mail  christian.engwer at uni-muenster.de
Telefon +49 251 83-35067
FAX     +49 251 83-32729




More information about the dune-functions mailing list