[dune-pdelab] Computing Maximum and Average solution with DG

Jö Fahlke jorrit at jorrit.de
Sun May 20 16:59:51 CEST 2012


Am Sun, 20. May 2012, 14:35:35 +0200 schrieb Jared Okiro:
> >For first order shape functions, to get the exact maximum, just evaluate the
> >solution at the elements' corners.  The generic reference elements can tell
> >you the local coordinates of the corners.
> 
> In the test case that I attached, I presume that I am evaluating the
> maximum solution at the element's corners. If this is not correct
> then please help me on how I can achieve this.

No, your calculateAVGMAX() functions calculates the maximum at the quadrature
points, which are always in the interior of the element for the default
quadrature type.  Use the reference element to get the coordinates of the
corners.

>                                                I also presume that
> the DG shape functions for P1 elements live at the element's
> corners(I have not verified this exactly).

People usually associate DG basis functions with the elements (the codim-0
entities).  Associating them with a corner would mean the base function
support extends over more than one element which is not the case for DG.  Note
that this holds for *all* DG basis functions -- not matter which order they
are, or whether their shape functions happen to be the same as for P1 or any
other _continuous_ Galerkin method.

>                                            You have mentioned that
> one can determine the local coordinates of the corners for the
> generic reference elements, please elaborate this coz I seem not to
> understand it well.

http://www.dune-project.org/doc/doxygen/html/classDune_1_1GenericReferenceElement.html
Use the position() method, e.g.

  refelem.position(number_of_corner, dim);

Use

  refelem.size(dim);

to get the number of corners.  Remember that the corners have codim==dim,
thats why you supply the dimension of the grid as the argument to the codim
paarmeter here.

> >Do you need the maximum for shape functions of higher order?  If so, can you
> >live with the approximation you get from gaussian quadrature points?  I don't
> >know of an easy the to get the exact maximum in this case...
> 
> Yes I need to compute the maximum solution for my system with higher
> order shape functions(upto order 5). Is there a unique way of
> computing the maximum solution for higher order shape functions?. I
> will appreciate more advice on this.

If you need the exact solution, I don't think I can help you.  Maybe someone
else on this list has a bright idea?

I mean, you could try to find the extreme points of the solution by finding
the root(s) of the derivative, but then you'd have to check whether all of the
roots are actually inside the element and if not you have to repeat the
process for the codim-1 and codim-2 subentities etc.  But that sounds like a
lot of trouble and a project in its own right.

Bye,
Jö.

-- 
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

Kiss a non-smoker; taste the difference.
-- fortune
-------------- 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/20120520/5f14d700/attachment.sig>


More information about the dune-pdelab mailing list