[dune-functions] GridFunction interface

Carsten Gräser graeser at mi.fu-berlin.de
Fri Mar 20 16:02:43 CET 2015


Am 20.03.2015 um 14:42 schrieb Carsten Gräser:

[...]

> 1)Return derivatives wrt global coordinates. Then we must
>   introduce some special LocalDerivativeTraits associated
>   to the global DerivativeTraits+EntitySet. This would reflect,
>   that the derivative is given wrt a non-standard coordinate system.
>   However the user would have to specify these traits by hand if he
>   wants to wrap a local function in a DifferentiableFunction.
> 
>   + This seems to be what we had in mind until now.
>   + Perhaps this is what one normally needs
>   + derivative(localFunction(f)) == localFunction(derivative(f))
>   - Complicates our function concept
>   - Complicated to explain
>   - More complicated implementation of interface
>   - Do we really need this? One can (and would for performance
>     reasons) always use localFunction(derivative(f)) for this.
>   - LocalDerivativeTraits only encodes that there are non-standard
>     coordinates, but not how to transform them.
> 
> 2)Return derivatives wrt local coordinates. Then all types
>   and values are consistent, the above problem would disappear,
>   and a local function would be a functions like any other.
> 
>   + Keeps concept simple and consistent
>   + Straight forward to implement
>   + Provides a way to access derivatives in local coordinates,
>     the others can already be obtained by localFunction(derivative(f))
>   - Perhaps unexpected, but only if you're trained to 1)
>   - derivative(localFunction(f)) != localFunction(derivative(f))
> 
> I'm undecided about this. Questions? Opinions? Other options?
For now I've implemented 1) in order to have a clean solution
and because we once decided that we'd like to go this way.
However I'm not totally convinced.

Carsten




More information about the dune-functions mailing list