1 subroutine flxint2(xaxis, a, cx, cy, sumdq)
17 real(r8),
intent(in) :: xaxis, a, cx, cy
19 real(r8),
intent(out) :: sumdq
23 real(r8),
dimension(nr) :: qplin, deltaq, df2old
24 real(r8),
dimension(nr) :: qplot, xplot, df2tmp
25 real(r8),
dimension(nr) :: zps
26 real(r8),
dimension(3) :: abltg
29 real(r8) :: sumq, sumqr
30 real(r8) :: x, xr, xs, xrs, xrr, xss
31 real(r8) :: y, yr, ys, yrs, yrr, yss
32 real(r8) :: ps, psr, pss, psrs, psrr, psss
33 real(r8) :: xjac, bigr, er
34 real(r8) :: qtmp, qtmp0
35 real(r8) :: ss, dummy, df21
36 integer(itm_i4) :: i, j, ngs
37 integer(itm_i4) :: n1, n2, n3, n4
42 if (ias == 1) factas = 1._r8
45 call
profiles(dd_spline%sp1, dd_spline%sp2, dd_spline%sp3, &
61 call
interpolation(2, xx(1, n1), xx(1, n2), xx(1, n3), xx(1, n4), &
62 r, s, x, xr, xs, xrs, xrr, xss)
63 call
interpolation(2, yy(1, n1), yy(1, n2), yy(1, n3), yy(1, n4), &
64 r, s, y, yr, ys, yrs, yrr, yss)
65 call
interpolation(2, psi(4 * (n1 - 1) + 1), psi(4 * (n2 - 1) + 1), &
66 psi(4 * (n3 - 1) + 1), psi(4 * (n4 - 1) + 1), r, s, ps, &
67 psr, pss, psrs, psrr, psss)
68 xjac = xr * ys - xs * yr
69 bigr = 1._r8 + eps * x
70 sumq = sumq - ws * xjac / ( bigr * abs(psr))
71 er = xrr * ys + xr * yrs - xrs * yr - xs * yrr
72 sumqr = sumqr + psrr * xjac / ((psr**2) * bigr) * ws
73 sumqr = sumqr - er / (bigr * psr) * ws
74 sumqr = sumqr + xjac * eps * xr / ((bigr**2) * psr) * ws
78 qtmp = 0.5_r8 * factas * (sumq * alfa / pi) * dd_spline%sp2(nr - i + 1)
80 deltaq(nr - i + 1) = qplin(nr - i + 1) - qtmp
82 qplot(nr - i + 1) = qtmp
83 xplot(nr - i + 1) = sqrt(ps)
85 qtmp0 = dd_spline%sp2(1) * (alfa / (2._r8 * sqrt(cx * cy) * (1._r8 &
91 deltaq(1) = qplin(1) - qtmp0
95 df2tmp(1) = df2old(1) + 0.25_r8 * ampl * (deltaq(1) - deltaq(2))
97 df2tmp(nr) = df2old(nr)
99 df2tmp(nr - i + 1) = df2old(nr - i + 1) + ampl * (deltaq(nr - i) &
100 - deltaq(nr - i + 2)) + ampl * deltaq(nr - i + 1) / 4._r8
101 df2tmp(nr - i + 1) = df2tmp(nr - i + 1) / df2tmp(1)
105 sumdq = sumdq + abs(deltaq(nr - i + 1))
108 df2tmp(nr - 1) = df2old(nr - 1) + 0.25_r8 * ampl * (deltaq(nr - 2) &
111 sumdq = sumdq / dble(nr - 2)
120 call
spline(nr, xplot, df2tmp, 0._r8, 0._r8, 2, dd_spline)
122 ps = dble(i - 1) / dble(npts - 1)
124 dummy =
spwert(nr, ss, dd_spline, xplot, abltg, 0)
130 fdf(i) = fdf(i) / df21
subroutine profiles(p0, rbphi, dp0, drbphi, a)
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)
subroutine allocate_spline_coefficients(spline, n)
real(r8) function q_profile(flux)
subroutine spline(N, X, Y, ALFA, BETA, TYP, A, B, C, D)
REAL *8 function spwert(N, XWERT, A, B, C, D, X, ABLTG)
real(r8) function dgamma_dpsi(flux)
subroutine deallocate_spline_coefficients(spline)
subroutine flxint2(xaxis, a, cx, cy, sumdq)