[dune-functions] GridFunction interface

Christian Engwer christian.engwer at uni-muenster.de
Fri Mar 20 17:36:26 CET 2015


Hi Carsten,

> Lets assume f:\Omega \to V, E a fixed element, R the reference
> element, and T:R \to E the geomertry map. Now let
> 
>   g = localFunction(f);
>   g.bind(E);
> 
> Then we have g = f \circ T^{-1} : R \to V. But with approach 1)

I think here is the first place where we see things differently. The
local function (at least if we do it like Oli proposed) does not
always fulfill

g(x) = f(T^{-1}(x))

Oli proposed to omit the piola transformation, thus the range of f and
g (possibly) differ. In this case g would be given as

g(x) = |J| J^-1 f(T^{-1}(x))

> we would have
> 
>   derivative(g) = f' \circ T^{-1} != g'
>
> and derivative(g)(x) \in L(E,V) instead of L(R,V). In contrast
> 2) would lead to derivative(g) = g' and derivative(g)(x) \in L(R,V)
> as expected.

I always interpreted the local function as a local view. I do not map
the function, but I restrict it onto the element.

And there are several practical reason why I don't want to map the
function...

* If we consider analytic functions, we will now have to implement the
  mapping in the other direction, but in this case it is even more
  complicated to decide which mapping is the correct one.
* If I want to use the functions, I only think about the local element
  in order to have an efficient way to evaluate my integrals and to
  make use of sparsity. I always want to map my function values to
  global space and I also want to evaluate my derivatives with respect
  to global space.
* It is not as simple as always multiplying by the inverse of the
  jacobian, because sometimes (as described earlier) the evaluation
  has already be transformed in order to get the same result as f(x)

I agree that local function suggests a different behavior, perhaps we
should do it the same way as with the basis and call it localView(f)
instead of localFunction(f)?
  
> As far as I understand you're taking about local E-dependent
> coordinates for the range V which is orthogonal to the problem
> mentioned above.

No, the local function would always have the range, but the range for
global function and local function differs in the case of vector
fields. If you think about a more extrem example... RT0 on a surface,
the local range is R^2 and the global range is R^3.

Somehow I have the feeling we are talking past each other...

Christian





More information about the dune-functions mailing list