[dune-functions] GridFunction interface

Oliver Sander sander at igpm.rwth-aachen.de
Fri Mar 20 16:10:11 CET 2015


Am 20.03.2015 um 16:02 schrieb Carsten Gräser:
> 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.

I am not convinced either.  In fact I'd find 1) more unexpected than 2).
If I have a function that depends on some coordinates I'd expect its
derivatives to be wrt to these coordinates.  So if the function is a local
function I'd expect the derivatives to be wrt to local coordinates.
If I want them wrt global coordinates then I'd need to multiply by
JacobianInverseTransform.

Cheers,
Oliver

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


-------------- 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/20150320/b3b8cc53/attachment.sig>


More information about the dune-functions mailing list