I am trying to compute the L2/H1 error norms for an elliptic problem
defined on two different grids (not necessarily embedded, different
h-p refinements) for convergence studies. In the presence of an exact
solution, I can use the VectorTools::integrate_difference routine to
accomplish what I need but am having a hard time doing it cleanly
without resorting to a separate projection of the solution on to the
target mesh and a consequent wrapping of the resultant solution using
a Function to use the VectorTools routine like above in the case when
I have a reference solution on a very finely refined grid.
This idea perhaps seems roundabout and was wondering if there was a
better API that I have overlooked to accomplish this task. Any
pointers to examples or routines that might help out will be much
appreciated.
It depends on whether one mesh is always at least as fine as the other.
If that's so, then you can of course interpolate the solution from the
coarser mesh to the finer without loss of information, and then just
compute the difference between the two solutions by subtracting DoF vectors.
On the other hand, if the two meshes are not related in such a way, then
you need to go through VectorTools::integrate_difference for which you
need one continuous function. You can get a continuous function from a
FE function defined on a mesh using the FEFieldFunction class. This is
not a particularly efficient way, but you probably don't care too much
if it's only about estimating the error in the solution.
Cheers
W.
------------------------------------------------------------------------
Wolfgang Bangerth email: [email protected]
www: http://www.math.tamu.edu/~bangerth/
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii