← Back to team overview

dolfin team mailing list archive

[HG DOLFIN] Merge in new function errornorm()

 

One or more new changesets pushed to the primary dolfin repository.
A short summary of the last three changesets is included below.

changeset:   4797:4734212611574f8e257c8503b87948017c06c6f6
tag:         tip
parent:      4796:a6246bdcd357bd9e495d684e6d54bda9b7381ea9
parent:      4795:9fde0f1cfbe1600743dd23b0171012f936923288
user:        Anders Logg <logg@xxxxxxxxx>
date:        Mon Sep 22 17:04:08 2008 +0200
files:       demo/pde/dg/poisson/python/demo.py.orig
description:
Merge in new function errornorm()


changeset:   4796:a6246bdcd357bd9e495d684e6d54bda9b7381ea9
parent:      4791:4e5af313d815284bc4636e377d5fbfb3818f9849
user:        Anders Logg <logg@xxxxxxxxx>
date:        Mon Sep 22 17:03:48 2008 +0200
files:       site-packages/dolfin/__init__.py site-packages/dolfin/errornorm.py site-packages/dolfin/norm.py site-packages/dolfin/project.py
description:
Add new utility function errornorm()

This function provides a simple way to compute the norm of the
difference between two given functions. It can be used to evaluate the
error of a given approximate solution when the exact solution is
known. In simple cases, one may just define

  e = u - uh

and evalute for example the square of the error in the L2 norm by

  e = u - uh
  assemble(e*e*dx, mesh)

However, this is not stable w.r.t. round-off errors considering that
the form compiler will expand the expression above to

  u*u*dx + uh*uh*dx - 2*u*uh*dx

and this might get further expanded into thousands of terms for
higher order elements. Thus, the error will be evaluated by adding
a large number of terms which should sum up to something close to
zero (if the error is small).

This function computes the error by first projecting both u and uh
to a common space (of high accuracy), then subtracting the two fields
(which is easy since they are expressed in the same basis) and then
evaluating the integral."""


changeset:   4795:9fde0f1cfbe1600743dd23b0171012f936923288
parent:      4794:a5c40b3c0a40df1ab0f11c4b76b8080a375346a8
parent:      4792:af4d32c75d1d7872905f1e6982edf34a76d883f6
user:        Ilmar Wilbers <ilmarw@xxxxxxxxx>
date:        Mon Sep 22 15:47:11 2008 +0200
files:       
description:
Repo fix yet again.

----------------------------------------------------------------------
For more details, visit http://www.fenics.org/hg/dolfin