Open cgsavard opened 5 years ago
Let n
be the first iteration in which the residual norm satisfies norm(r_n) / norm(r_0) < 1e-3
.
You're certainly welcome to use DMGlobalToLocal. Depending on how you implement, DMLocalToLocal might be more convenient.
I believe "approximation error" is referring to the difference between solving with a discrete difference equation instead of a conceptual derivative (the limit as n -> inf
). This error exists for finite n
even if the residual is 0. This means getting the residual much lower than the approximation error cannot actually lower overall error much.
Thank you for the responses. I am still a bit confused on the question:
"Make a plot (actual data and/or using an analytic model) in terms that are relevant to a user who believes that approximation error scales like 1/n^2. How does cost (e.g., CPU seconds) to solve scale with increased accuracy requirements?"
How do we calculate approximation error for our algorithm? Based on Camden's response, it sounds like we need to compare the algorithm with something else, but I still don't quite understand how this works.
If a user believes that error is proportional to 1/n^2
(it's actually true for this scheme when the solution is smooth enough), then cutting error by a factor of 4 must increase n
by a factor of 2. There's no need to place units on the error, meaning that, for example, you could calculate based on error = c / n^2
for an arbitrary choice of c
.
Right. But what is this error? Hoe do you calculate it? And just to verify, is n the number of iterations or the grid size here?
n
is the grid dimension. The grid is approximating a continuous equation (partial differential equation, to be specific) and that approximation has an error. I'm not asking you to know/learn anything about those approximation methods, just to take it as given that this discretization error is proportional to 1/n^2
for large values of n
.
You can choose whether or not to discuss algebraic error, a term that refers to the size of x_k - x_*
on iteration k
, where x_*
exactly solves A x_* = b
. Note that the algebraic error is different from the residual b - A x
.
There are a few parts in the hw that have confused me and some others.
In part 1, when you say "how does the number of iterations to reduce the residual by 1e-3 change?" do you mean the norm changes by 1e-3 from the first iteration (iter 1- iter n >= 1e-3) or the norm simply drops below 1e-3? Does the "approximate error" correspond to the norm of the residual?
In part 2, we are told to use DMLocalToLocal, but wouldn't we want DMGlobalToLocal to get U into the local scope of residual?