15 real(r8),
dimension(10, 10) :: abspsi, abspsx, abspsy, abpsxy
16 real(r8) :: errmps, errmpx, errmpy, errpxy, errps, errpsx, errpsy
18 real(r8) :: x, xr, xs, xrs, xrr, xss
19 real(r8) :: y, yr, ys, yrs, yrr, yss
20 real(r8) :: eqpsi, psir, psis, psrs, psrr, psss
21 real(r8) :: solpsi, spsix, spsiy, spsixy
23 real(r8) :: psix, psiy
24 real(r8) :: rmax, smax
25 real(r8) :: rx, ry, sx, sy
27 real(r8) :: rxy, sxy, psixy
28 integer(itm_i4) :: i, j, k, l
29 integer(itm_i4) :: node, n1, n2, n3, n4
30 integer(itm_i4) :: imax, jmax
48 s = -1._r8 + 2._r8 * (l - 1) / 10._r8
52 r = -1._r8 + 2._r8 * (k - 1) / 10._r8
53 node = (i - 1) * np + j
58 call
interpolation(2, xx(1, n1), xx(1, n2), xx(1, n3), xx(1, n4), &
59 r, s, x, xr, xs, xrs, xrr, xss)
60 call
interpolation(2, yy(1, n1), yy(1, n2), yy(1, n3), yy(1, n4), &
61 r, s, y, yr, ys, yrs, yrr, yss)
62 call
interpolation(2, psi(4 * (n1 - 1) + 1), psi(4 * (n2 - 1) &
63 + 1), psi(4 * (n3 - 1) + 1), psi(4 * (n4 - 1) + 1), r, s, &
64 eqpsi, psir, psis, psrs, psrr, psss)
65 call
soloviev(x, y, solpsi, spsix, spsiy, spsixy)
66 abspsi(k, l) = abspsi(k, l) + abs(solpsi - eqpsi)
67 ejac = xr * ys - xs * yr
68 psix = (ys * psir - yr * psis) / ejac
69 psiy = (-xs * psir + xr * psis) / ejac
70 abspsx(k, l) = abspsx(k, l) + abs(psix - spsix)
71 abspsy(k, l) = abspsy(k, l) + abs(psiy - spsiy)
72 if (abs(solpsi - eqpsi) > errmps)
then
73 errmps = abs(solpsi - eqpsi)
75 if (abs(psix - spsix) > errmpx)
then
76 errmpx = abs(psix - spsix)
78 if (abs(psiy - spsiy) > errmpy)
then
79 errmpy = abs(psiy - spsiy)
89 er = xrr * ys + xr * yrs - xrs * yr - xs * yrr
90 es = xrs * ys + xr * yss - xss * yr - xs * yrs
91 rxy = -(er * ry + es * sy) * ys / ejac**2 + (yrs * ry &
93 sxy = (er * ry + es * sy) * yr / ejac**2 - (yrr * ry &
95 psixy = psrr * rx * ry + psrs * (rx * sy + sx * ry) &
96 + psir * rxy + psss * sx * sy + psis * sxy
97 if (abs(psixy - spsixy) > errpxy)
then
98 errpxy = abs(psixy - spsixy)
100 abpsxy(k, l) = abpsxy(k, l) + abs(psixy - spsixy)
105 r = -1._r8 + 2._r8 * (k - 1) / 10._r8
106 abspsi(k, l) = abspsi(k, l) / ((nr - 1) * (np - 1))
107 abspsx(k, l) = abspsx(k, l) / ((nr - 1) * (np - 1))
108 abspsy(k, l) = abspsy(k, l) / ((nr - 1) * (np - 1))
109 errps = errps + abspsi(k, l)
110 errpsx = errpsx + abspsx(k, l)
111 errpsy = errpsy + abspsy(k, l)
114 if (standard_output)
then
115 write(out_he, *)
'max err in psi :', errmps
116 write(out_he, *)
'max err in psix:', errmpx
117 write(out_he, *)
'max err in psiy:', errmpy
118 write(out_he, *)
' at i,j : ', i, j
119 write(out_he, *)
' r,s : ', rmax, smax
120 write(out_he, *)
'max err in psixy :', errpxy
121 write(out_he, *)
'average error in psi : ', errps / 100.
122 write(out_he, *)
'average error in psix : ', errpsx / 100.
123 write(out_he, *)
'average error in psiy : ', errpsy / 100.
subroutine soloviev(x, y, solpsi, psix, psiy, psixy)
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)