Not a number computing L2 and H1 errors

Dear FreeFem community, I hope you are well.

I am implementing a stabilized method for a reaction–diffusion model, which is

\sigma u - \epsilon \Delta u = f in \Omega, u = 0 on \partial \Omega. When I set \epsilon = 10^{-5} and \sigma = 1.0, and compute the L^2(\Omega) error, I get the following:

L2 error: -nan
H1 semi-norm error: -nan
H1 error: -nan

I get the same results for a standard Galerkin. I want to explore the error for \epsilon ranging from 10^{-3} to 10^{-6}. Do you know how to solve this?

Your vector has NaN in it, so the norms are NaN.

By vector you mean the vector of DoF’s of the solution u_h?