[dune-pdelab] DiscreteGridFunction interface

Jö Fahlke jorrit at jorrit.de
Wed Aug 8 15:15:29 CEST 2012


Am Wed,  8. Aug 2012, 10:10:53 +0200 schrieb Christian Engwer:
> I'd like to get a new topic on the never ending
> interface-discussion-list.
> 
> Why doesn't the DiscreteGridFunction allow the evaluation of
> derivatives? 
> 
> DiscreteGridFunction is based on the LocalFunctions which allow to
> evaluate derivatives and tell till which order. If nobody comes up
> with a good reason not to do it, I'd like to include such
> functionality in the DiscreteGridFunction. I currently have the
> problem, that I'd like to implement different kinds of error
> functionals, some of them work require the gradient, some the function
> itself and I would prefer not to expose this part to the user.

One reason is that the GridFunction interface does not include evaluating the
derivatives.

Another reason is that the local-valued LocalFiniteElements only provide
local-valued derivatives.  You still need to know which transformation to
apply, which (in general) depends on the kind of element.  This is of course a
non-issue with global-valued finite elements.

The traditional approach in PDELab is DiscreteGridFunctionGradient, which
provides the gradient of a scalar local-valued LocalFiniteElement function,
implicitly assuming Piola-transform.  If that is not the transformation you
want, you have (or had) to write your own DiscreteGridFunctionFoo.  E.g. there
is a variation of DiscreteGridFunctionGradient[1] for global-valued
LocalFiniteElements.

IMO making it possible to ask the GridFunction for the derivative sounds like
a good idea.

Regards,
Jö.

[1] OTOH I don't know whether it is a specialization of
    DiscreteGridFunctionGradient or whether it is provided under a different
    name.

-- 
Jorrit (Jö) Fahlke, Interdisciplinary Center for Scientific Computing,
Heidelberg University, Im Neuenheimer Feld 368, D-69120 Heidelberg
Tel: +49 6221 54 8890 Fax: +49 6221 54 8884

Der Horizont vieler Menschen ist ein Kreis mit Radius Null - und das
nennen sie ihren Standpunkt.
-- A. Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune-pdelab/attachments/20120808/7d1d0274/attachment.sig>


More information about the dune-pdelab mailing list