I'm solving a hyperbolic PDE to steady state using an iterative method. Is there any way to fix the number of iterations which will ensure the steady state solution?
number of iteration for steady state solution of a hyperbolic equation
1 Answers
In all numerical methods there will always be some error. Each iteration usually reduces that error and there will come a point where the error is small enough that you are happy with the values you have achieved.
Suppose you are estimating a single value $X$ using a sequence of estimates $x_0, x_1, x_2, ...$.
The error is of course the difference between the estimate and the true value: $\epsilon_n = x_n - X$.
In first order iterative methods we find that $\epsilon_{n+1}=k\epsilon_{n}$, with $|k|<1$
If we know $\epsilon_n$, we can estimate how many further iterations are needed to achieve a required error $\epsilon_r$ by requiring $\epsilon_n\times k^m\le e_r \Rightarrow m \log k\ge\log \epsilon_r-\log \epsilon_n \Rightarrow m \ge \frac {\log \epsilon_r-\log \epsilon_n}{\log k}$
Of course we may not know the true value $X$, but a good proxy for $\epsilon_n$ is the difference in successive estimates $x_{n+1}-x_n$.
In your case you are not measuring the error of a single valkue but a set of values. You will need to create an error function that is a summary of all the errors. Sum of squared errors is a good choice for this.
-
0Hi, thanks a lot Tomi. This will solve my problem. – 2017-01-12