Newton-GMRES method

Which case should be chosen?

Discretized version (with stepsize 1/(n+1)) of
y''(t) = γ sin(π y(t)) +t(1-t) , 0 <= t <= 1 , y(0) = 1 , y(1) = 2
(i.e. xi = y(i × h) , i=1,..,n, h=1/(n+1)
(initial value is zero)
n =
Important: n must be in {60,...,1200}
γ =

Your own testcase:
Please specify the dimension here in the range {4,..,1200}

n =

Please specify here the four components of x for which the development over the iteration will appear in a plot (must be in {1,..,n}, can be equal):
ind1 =
ind2 =
ind3 =
ind4 =

Input of a piece of code to compute F following FORTRAN rules. Your input variables are n, x and F. Your code must use but not change n, x and deliver F as a vector with components 1,..,n written as f(..)= ..).
You may use here the integers i,j,k (e.g. for counting or loops), real variables sum,x1h,x2h,x3h,x4h,x5h,x6h,x7h,x8h,x9h (e.g. for intermediate values), three vectors y,z,a each of length 1200 and the constants π , e1(=exp(1)) , sqrt2(=√ 2) and three logicals bool1, bool2, bool3 (e.g. for results of arithmetic comparisons). All these variables are initalized by zero resp. .false., but if you changed their values then these changes are preserved for later use. For example you might store some constants in a for later use if bool1=.false. then set bool1=.true. and do not repeat these initializations as long as bool1 evaluates as .true. There is also an output variable ier initialized by 0. If you set ier=1 (for example you need log(x(1)) but x(1) <- 0) then this is interpreted as ''function evaluation impossible''. If this occurs outside the computation of σ the code terminates unsuccessfully. Remember of the special role of columns 1 to 6 here!

Input of the initial guess x0:

Please specify the required final precision: eps
||F(xk)|| < = eps × ||diag(JF(xk))||

eps = Important: 1.E-8 <= eps <= 1.E-3 !

Please specify the number of steps after which GMRES should restart
restart =
Restart must be in {2,..,n}!

Please specify the maximum number of steps (k):
maxiter = Important: 50 <= maxiter <= 1000000

Please specify the minimal stepsize for the damped Newton method
The method terminates unsuccessfully if the stepsize becomes smaller than this.
sigmin =
sigmin must be in [1.0e-12,0.015625]

Please specify the factor by which GMRES should reduce the length of the residual (i.e. ||F||)
reduc =
reduc must be in [1.0e-7,1]

Please specify the parameter reorthfac which determines when a reorthogonalization is performed for the new column of the orthogonal system matrix V
reorthfac =
reorthfac must be in [1.0e-8,1]

Please select the type of numerical differentiation which will be used for computing JF(x) v.
difftype =
difftype must be 1,2 or 3 giving order 1,2,6 and using 1,2, or 6 F-values.

Please specify whether to see a printed table of the intermediate results xI and ||F|| or not
no , graphics suffices
yes, want to see it

Please specify whether to see a printed table of the final results x and ||F|| or not
no, graphics suffices
yes, print it

Please specify whether to see a plot with the development of the residual r(d) in the last GMRES run or not
no
yes, show it

Please specify the output interval for graphics as well for table output:
k-step = Important: 1 <= k-step <= n !

Click on "evaluate", in order to submit your input.

Back to the theory page

 Back to the top!

13.09.2017