[dune-pdelab] Inquiry

Jö Fahlke jorrit at jorrit.de
Fri Sep 30 16:01:27 CEST 2011


Am Fri, 30. Sep 2011, 15:30:20 +0200 schrieb Jared Okiro:
> Date: Fri, 30 Sep 2011 15:30:20 +0200
> From: Jared Okiro <jaokiro at gmail.com>
> To: dune-pdelab at dune-project.org
> Subject: Re: [dune-pdelab] Inquiry
> 
> Thanks Joe for the information.
> I now need to calculate the L_infinity error and L1_error for my problem.
> I can see the function to use for L_infinity norm, but not sure of the
> function to use
> for the L1_error. Any advice please will be highly appreciated.
> I am wishing everyone a nice long weekend.

Well, concerning the L1-error, I don't think there is a pre-made GridFunction
for that.  You'll have to program that yourself.  The DifferenceSquaredAdapter
should be a good starting point.

Concerning the L_inf-error, you'll have to take a different approach, since
that one can no longer be expressed as an integral.  It's probably best to
adapt integrateGridFunction() -- name your function something like
gridFunctionAbsMax() and instead of doing the integration by taking the
weighted sum of the grid function values at the quadrature points, just
calculate the maximum of the absolute grid function values at the quadrature
points.  Yes, this probably won't give you the exact maximum but it should be
close enough.

(By the way, the integration for the L1-error also has some issues, since
you're integrating a function that is not a polynomial (the abs()), and
integrateGridFunction() only really works with polynomial, but the error
should be small and shouldn't get you into too much trouble.)

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

In the beginning the Universe was created.  This has made a lot of
people very angry and been widely regarded as a bad move.
-- Douglas Adams
-------------- 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/20110930/a91c5be1/attachment.sig>


More information about the dune-pdelab mailing list