Convergence rate when the analytical solution is unknown

40 views
Skip to first unread message

Naren Vohra

unread,
Jun 4, 2021, 12:51:49 PM6/4/21
to deal.II User Group
Hello, 

How do I compute the L2 (in space and time) convergence rates when the exact solution is unknown? I plan on computing a solution using a fine grid and time step and then using that as my exact solution. How could I "save" this solution to use it when computing the L2 error in space and time? If it were only space, then I understand that I could use solution transfer, but I'm unsure how to deal with the temporal variable. 

Thank you!

Naren Vohra

Marc Fehling

unread,
Jun 4, 2021, 4:56:52 PM6/4/21
to deal.II User Group
Hello Naren!

you can use the `FEFieldFunction` class for this purpose. It will interpret your finite element solution as a continuous function via interpolation. You can use it as a representation of your fine solution.

This class needs a `DoFHandler` object, your finite element solution, and the mapping collection. If you want to store your reference solution on your file system, you would need to make use of the serialization capabilities of the `Triangulation` and `Vector` classes, and then reconstruct the dependencies for the `FEFieldFunction` representation. For parallel distributed application, you would need to make use of a `SolutionTransfer` object.

I hope this helps!
Marc

Marc Fehling

unread,
Jun 4, 2021, 5:07:52 PM6/4/21
to deal.II User Group
And for the time dependent part: I would suggest to store the solution and time for each time step in some sort of container. You could create a `FEFieldFunction` representation for these solutions, and then use linear interpolation between two time steps. Depending on how fine your resolution is, this may require lots of memory.

Marc

Naren Vohra

unread,
Jun 4, 2021, 6:07:48 PM6/4/21
to deal.II User Group
Thank you so much! I'll try doing that.
Reply all
Reply to author
Forward
0 new messages