15SUBROUTINE surface(rc, rs, zs, zc, xm, xn, mnmax, lasym, signgs)
23 INTEGER,
intent(in) :: mnmax
24 REAL(rprec),
DIMENSION(mnmax),
intent(in) :: rc, rs, zs, zc, xm, xn
25 logical,
intent(in) :: lasym
26 real(rprec),
intent(in) :: signgs
28 INTEGER :: i, mn, m, n, n1
29 REAL(rprec) :: cosmn1, sinmn1
46 n = nint(xn(mn)/(nfper))
49 cosmn1 = cosu1(i,m)*cosv1(i,n1) + csign(n)*sinu1(i,m)*sinv1(i,n1)
50 sinmn1 = sinu1(i,m)*cosv1(i,n1) - csign(n)*cosu1(i,m)*sinv1(i,n1)
51 r1b(i) =
r1b(i) + rc(mn) * cosmn1
52 rub(i) =
rub(i) - xm(mn) * rc(mn) * sinmn1
53 rvb(i) =
rvb(i) + xn(mn) * rc(mn) * sinmn1
54 z1b(i) =
z1b(i) + zs(mn) * sinmn1
55 zub(i) =
zub(i) + xm(mn) * zs(mn) * cosmn1
56 zvb(i) =
zvb(i) - xn(mn) * zs(mn) * cosmn1
57 ruu(i) =
ruu(i) - xm(mn) * xm(mn) * rc(mn) * cosmn1
58 ruv(i) =
ruv(i) + xm(mn) * xn(mn) * rc(mn) * cosmn1
59 rvv(i) =
rvv(i) - xn(mn) * xn(mn) * rc(mn) * cosmn1
60 zuu(i) =
zuu(i) - xm(mn) * xm(mn) * zs(mn) * sinmn1
61 zuv(i) =
zuv(i) + xm(mn) * xn(mn) * zs(mn) * sinmn1
62 zvv(i) =
zvv(i) - xn(mn) * xn(mn) * zs(mn) * sinmn1
64 r1b(i) =
r1b(i) + rs(mn) * sinmn1
65 rub(i) =
rub(i) + xm(mn) * rs(mn) * cosmn1
66 rvb(i) =
rvb(i) - xn(mn) * rs(mn) * cosmn1
67 z1b(i) =
z1b(i) + zc(mn) * cosmn1
68 zub(i) =
zub(i) - xm(mn) * zc(mn) * sinmn1
69 zvb(i) =
zvb(i) + xn(mn) * zc(mn) * sinmn1
70 ruu(i) =
ruu(i) - xm(mn) * xm(mn) * rs(mn) * sinmn1
71 ruv(i) =
ruv(i) + xm(mn) * xn(mn) * rs(mn) * sinmn1
72 rvv(i) =
rvv(i) - xn(mn) * xn(mn) * rs(mn) * sinmn1
73 zuu(i) =
zuu(i) - xm(mn) * xm(mn) * zc(mn) * cosmn1
74 zuv(i) =
zuv(i) + xm(mn) * xn(mn) * zc(mn) * cosmn1
75 zvv(i) =
zvv(i) - xn(mn) * xn(mn) * zc(mn) * cosmn1
113 DO i = 1 + nv, nuv2 - nv
126 call add_real_2d(
"r1b", nv, nu,
r1b)
127 call add_real_2d(
"rub", nv, nu3,
rub)
128 call add_real_2d(
"rvb", nv, nu3,
rvb)
129 call add_real_2d(
"ruu", nv, nu3,
ruu)
130 call add_real_2d(
"ruv", nv, nu3,
ruv)
131 call add_real_2d(
"rvv", nv, nu3,
rvv)
133 call add_real_2d(
"z1b", nv, nu,
z1b)
134 call add_real_2d(
"zub", nv, nu3,
zub)
135 call add_real_2d(
"zvb", nv, nu3,
zvb)
136 call add_real_2d(
"zuu", nv, nu3,
zuu)
137 call add_real_2d(
"zuv", nv, nu3,
zuv)
138 call add_real_2d(
"zvv", nv, nu3,
zvv)
140 call add_real_2d(
"guu_b", nv, nu3,
guu_b)
141 call add_real_2d(
"guv_b", nv, nu3,
guv_b)
142 call add_real_2d(
"gvv_b", nv, nu3,
gvv_b)
144 call add_real_2d(
"rzb2", nv, nu,
rzb2)
146 call add_real_2d(
"snr", nv, nu3,
snr)
147 call add_real_2d(
"snv", nv, nu3,
snv)
148 call add_real_2d(
"snz", nv, nu3,
snz)
150 call add_real_2d(
"drv", nv, nu3,
drv)
152 call add_real_2d(
"auu", nv, nu3,
auu)
153 call add_real_2d(
"auv", nv, nu3,
auv)
154 call add_real_2d(
"avv", nv, nu3,
avv)
156 call add_real_2d(
"rcosuv", nv, nu,
rcosuv)
157 call add_real_2d(
"rsinuv", nv, nu,
rsinuv)
logical function open_dbg_context(context_name, repetition, id)
check if any output is desired for the current iteration check if the given context should be openend...
real(rprec), dimension(:), allocatable auu
real(rprec), dimension(:), allocatable zuu
real(rprec), dimension(:), allocatable zvb
real(rprec), dimension(:), allocatable r1b
real(rprec), dimension(:), allocatable ruv
real(rprec), dimension(:), allocatable zub
real(rprec), dimension(:), allocatable z1b
real(rprec), dimension(:), allocatable zvv
real(rprec), dimension(:), allocatable snz
real(rprec), dimension(:), allocatable snr
real(rprec), dimension(:), allocatable ruu
real(rprec), dimension(:), allocatable rzb2
real(rprec), dimension(:), allocatable rub
real(rprec), dimension(:), allocatable rsinuv
real(rprec), dimension(:), allocatable rvb
real(rprec), dimension(:), allocatable snv
real(rprec), dimension(:), allocatable rvv
real(rprec), dimension(:), allocatable guu_b
real(rprec), dimension(:), allocatable auv
real(rprec), dimension(:), allocatable avv
real(rprec), dimension(:), allocatable gvv_b
real(rprec), parameter p5
real(rprec), dimension(:), allocatable guv_b
real(rprec), dimension(:), allocatable zuv
real(rprec), dimension(:), allocatable rcosuv
real(rprec), dimension(:), allocatable drv
integer num_eqsolve_retries
subroutine surface(rc, rs, zs, zc, xm, xn, mnmax, lasym, signgs)
Evaluate the geometry of the LCFS and tangential derivatives.