Issue 1:
In Section "Computing the error", the function space V2 is defined using second-order polynomials (Lagrange, 2).
The problem, however, was initialized with the function space V using first-order polynomials (Lagrange, 1).
When computing the error, the result is too large relative to machine precision.
I suggest modifying the space V2 to be compatible with the function space V.
Issue 2:
In Section "Computing the error", the exact solution "uex" is defined, therefore ignoring that the variable "uD" also represents the exact solution. When stating the formula for the L2 error, denoted by E, the exact solution used is uD rather than uex.
I suggest one of the following solutions:
- Replace uD with uex in E
- Delete everything related to uex (Issue 1 no longer relevant in this case), and keep uD as it is.
Issue 1:
In Section "Computing the error", the function space V2 is defined using second-order polynomials (Lagrange, 2).
The problem, however, was initialized with the function space V using first-order polynomials (Lagrange, 1).
When computing the error, the result is too large relative to machine precision.
I suggest modifying the space V2 to be compatible with the function space V.
Issue 2:
In Section "Computing the error", the exact solution "uex" is defined, therefore ignoring that the variable "uD" also represents the exact solution. When stating the formula for the L2 error, denoted by E, the exact solution used is uD rather than uex.
I suggest one of the following solutions: