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

Jö Fahlke jorrit at jorrit.de
Sun May 20 00:31:12 CEST 2012


Am Sat, 19. May 2012, 20:10:00 +0200 schrieb Steffen Müthing:
> I think the problem is due to the different interpolation schemes used by the
> two methods (your function and the VTKWriter, respectively):
> 
> You use a first order DG scheme and calculate the integration order in your
> function as
> 
> max(2*(dg_order -1),0),
> 
> which yields 0 in your case, so you get a zero order integration rule which only
> evaluates your solution at the cell center. For the VTKWriter, you use a vertex
> data set (and the subsampling level is 0), so the VTKWriter evaluates your
> solution at the vertices. And your solution assumes its maximum only at vertex
> positions...
> 
> Try increasing the integration order in your function and see if that helps.

That should improve things but won't yield the exact maximum.  Gaussian
quadrature points are never at the element boundaries, but the maximum for
linear shape functions will always be in an element's corner.

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.

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

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

featured product: Debian GNU/Linux - http://www.debian.org
-------------- 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/74276eaf/attachment.sig>


More information about the dune-pdelab mailing list