[dune-functions] interface check for GridViewFunction

Carsten Gräser graeser at mi.fu-berlin.de
Sun Sep 20 01:15:20 CEST 2015


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <https://lists.dune-project.org/pipermail/dune-functions/attachments/20150920/e5e8e04a/attachment.sig>


More information about the dune-functions mailing list