1 subroutine mnewtax(ntrial, naxis, x, n, tolx, tolf, errx, errf)
15 real(r8),
intent(in) :: tolx, tolf
16 real(r8),
intent(out) :: errx, errf
17 integer(itm_i4),
intent(in) :: ntrial, naxis, n
18 real(r8),
intent(inout) :: x(2)
20 real(r8) :: fvec(2),
p(2), fjac(2,2)
22 real(r8) :: zpsi, zpsir, zpsis, zpsirs, zpsirr, zpsiss
24 integer(itm_i4) :: i, k
25 integer(itm_i4) :: n1, n2, n3, n4
30 if (abs(x(i)) > 2.0_r8)
then
43 call
interpolation(2, psi(4 * (n1 - 1) + 1 : 4 * n1), psi(4 * (n2 - 1) &
44 + 1 : 4 * n2), psi(4 * (n3 - 1) + 1 : 4 * n3), psi(4 * (n4 - 1) + 1 &
45 : 4 * n4), r, s, zpsi, zpsir, zpsis, zpsirs, zpsirr, zpsiss)
55 errf = errf + abs(fvec(i))
57 if (errf <= tolf)
return
62 dis = fjac(2, 2) * fjac(1, 1) - fjac(1, 2) * fjac(2, 1)
63 p(1) = (fjac(2, 2) *
p(1) - fjac(1, 2) *
p(2)) / dis
64 p(2) = (fjac(1, 1) *
p(2) - fjac(2, 1) * temp) / dis
71 errx = errx + abs(
p(i))
74 if (errx <= tolx)
return
subroutine interpolation(type_interp, xn1, xn2, xn3, xn4, r, s, x, xr, xs, xrs, xrr, xss, yn1, yn2, yn3, yn4, pn1, pn2, pn3, pn4, yr, ys, ps)
real(r8) function p(a, x, xr, xs, yr, ys, psi, psir, F_dia)
subroutine mnewtax(ntrial, naxis, x, n, tolx, tolf, errx, errf)