[dune-functions] GridFunction interface

Carsten Gräser graeser at mi.fu-berlin.de
Fri Mar 20 13:11:40 CET 2015


Hi,
I stumbled upon two small inconsistencies in the GridFunction
interface.

A)We currently have some 'derivative' and 'localFunction'
  as free functions, while others like 'entitySet', 'localContext'
  are member functions. While this allows to non-intrusively
  add derivative support, this is not the case for 'localFunction'.
  Furthermore adding derivative support for callables can also
  be done by the DifferentiableFunctionFromCallables wrapper.

  I'm not sure if there's a real reason for the free methods.

B)One reason to return LocalFunction as object, is that they
  should behave like any other function. However this is
  not exactly true for its derivative, because the returned
  derivatives are computed wrt. global coordinates for local
  coordinate arguments.

  For me this is not a real problem. But we must clearly state
  this in the docs.

Best,
Carsten




More information about the dune-functions mailing list