Samuel,

Thanks for your answer, your approach actually worked quite well. 
>
Thanks!
 

> (How would I go about submitting a patch? I have absolutely no experience 
> with these things)
>
Have a look the FAQ [1]. If you have problems doing this, we happily help.
 

> Now I have another question. I am trying to compute the L2 error over all 
> the faces. For simplicity, I tested this starting from the tutorial 
> step-51. I added another VectorTools::integrate_difference statement to the 
> postprocess routine, with arguments dof_handler and solution (these 
> correspond to the solution on the faces). However, this gives me an 
> exception saying that some number is not finite (see error log in 
> attachment). Is it even possible to compute errors on faces (and not cells) 
> using VectorTools::integrate_difference? Or is there some other way to do 
> it?
>
Well, from the documentation [2] the relevant part is "Compute the cellwise 
error of the finite element solution [...]". Indeed, 
VectorTools::integrate_difference doesn't consider face integrals. However, 
you can just write such a function with not too much effort if you already 
use face loops in your cod:
Basically, just evaluate your reference function on the respective face in 
the quadrature points using Function::[vector_]value/gradient[_list] 
depending on the number of components your solution has and the norm you 
are interested in. Then, you compute the respective values for your 
solution using FEValues::get_function_values/gradients, compute the squared 
difference (for L^2 or H^1), multiply with FEValues::JxW and add everything 
up.
 
Best,
Daniel

[1] 
https://github.com/dealii/dealii/wiki/Frequently-Asked-Questions#i-found-a-typo-or-a-bug-and-fixed-it-on-my-machine-how-do-i-get-it-included-in-dealii
 

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to