> I was wondering what to do to run a convergence analysis when you don't > know the exact solution to your problem. > 'VectorTools::integrate_difference' requires a class Function<dim> for > the exact solution. > > So what I did, so far, is to define a nested class derived from > Function<dim>, in the class for my problem, with method 'value' > returning the solution of the current problem. I export that function > for my finest grid (convergence analysis in space) that I consider as my > exact solution, then when I run on coarser grids, I use that function in > 'VectorTools::integrate_difference' as my exact solution.
Apart from the idea with SolutionTransfer, another option is to use the FEFieldFunction class that provides you with the function object you need to pass to integrate_difference. In general, the way to test your code when you there are no known simple solutions is the method of manufactured solutions: http://dealii.sourceforge.net/index.php/Deal.II_Questions_and_Answers#How_do_I_know_whether_my_finite_element_solution_is_correct.3F_.28Or:_What_is_the_.22Method_of_Manufactured_Solutions.22.3F.29 Best W. ------------------------------------------------------------------------- Wolfgang Bangerth email: [email protected] www: http://www.math.tamu.edu/~bangerth/ _______________________________________________ dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii
