[dune-functions] Global basis interface

Carsten Gräser graeser at mi.fu-berlin.de
Mon Oct 5 09:27:46 CEST 2015


Dear all,
when describing the global basis interface I was wondering what
exactly we require from implementers of a global basis. Currently
the bases in dune-functions do all only implement the Factory
only and use the Default(GlobalBasis|LocalView|LocalIndexSet)
classes. The DefaultGlobalBasis itself provides access to the
factory. My question is, if we require this for all bases.
It seems that we have the following possibilities

a)Anything that implements the GlobalBasis,LocalView,LocalIndexSet
  is OK. We don't require to have a factory.

b)Any global basis must also export a factory allowing to reuse
  the basis.

c)One must implement the Node, NodeFactory, and NodeIndexSet only
  and the Global* and Local* classes are always the default ones

At first sight a) seems to be more flexible and I'm always
in favour of flexibility, but c)

* ... can represent anything that a) can: Just move your
  construction/bindcode form LocalView and LocalIndexSet
  to Factory::node()/Node::bind() and NodeIndexSet()
  NodeIndexSet::bind(), respectively
* ... is more flexible that a) you can always reuse the basis
* ... is easier to implement than a), you don't need to
  write the LocalView
* ... is easier to implement than b), you don't need to
  write the GlobalBasis, LocalView, LocalIndexSet

If you implement a basis from scratch c) seems to be the best
solution: Most flexible in use and least code to write. However,
a) may make life easier for people that want to wrap their
existing nested (but only dune-function-like) global basis
in a dune-functions compatible way (hello PDELab?).

In case we opt for a) I'd simply drop the 'Default'prefixes.

What's your opinion?

Best,
Carsten



-- 
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/20151005/85066ca8/attachment.pgp>


More information about the dune-functions mailing list