Question 1 convergence of error with respect to grid refinement #95
-
|
In question one, when plotting the error against grid refinement, my error goes down as low as 1e-7 with a convergence rate of 2.5 from h_x=0.1 until h_x = 1e-3, however then spikes up all the way to 1e-1 at h_x = 10^-4, and then slowly goes down again with a convergence rate of 0.5. Is this expected? If so, could you offer any guidance as to why the scheme is doomed to collapse? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
The short answer is floating point errors. By default your petsc installation should be using double precision. Some of the operations of the solver do reduce the overall accuracy that can be reached (hopefully something you discussed in PSCI?) So only reaching an accuracy of 1e-7 is not unexpected. |
Beta Was this translation helpful? Give feedback.
The short answer is floating point errors. By default your petsc installation should be using double precision. Some of the operations of the solver do reduce the overall accuracy that can be reached (hopefully something you discussed in PSCI?) So only reaching an accuracy of 1e-7 is not unexpected.
I would normally expect for the convergence to plateau after reaching that error, not for the error to increase. However, occasionally you see that sort of behavior especially with iterative solvers, where certain types of round-off errors can add up in unfortunate ways. Is this running with multigrid?