33 INTEGER,
DIMENSION(:),
POINTER :: irz11_bi => null()
35 INTEGER,
DIMENSION(:),
POINTER :: irz12_bi => null()
37 INTEGER,
DIMENSION(:),
POINTER :: irz21_bi => null()
39 INTEGER,
DIMENSION(:),
POINTER :: irz22_bi => null()
41 REAL(rprec),
DIMENSION(:),
POINTER :: w11_bi => null()
43 REAL(rprec),
DIMENSION(:),
POINTER :: w12_bi => null()
45 REAL(rprec),
DIMENSION(:),
POINTER :: w21_bi => null()
47 REAL(rprec),
DIMENSION(:),
POINTER :: w22_bi => null()
81 INTEGER,
INTENT(in) :: ns
82 INTEGER,
INTENT(in) :: nu
85 REAL (rprec) :: start_time
122 TYPE (bivariate_type),
POINTER :: this
125 IF (
ASSOCIATED(this%irz11_bi))
THEN
126 DEALLOCATE (this%irz11_bi)
127 this%irz11_bi => null()
130 IF (
ASSOCIATED(this%irz12_bi))
THEN
131 DEALLOCATE (this%irz12_bi)
132 this%irz12_bi => null()
135 IF (
ASSOCIATED(this%irz21_bi))
THEN
136 DEALLOCATE (this%irz21_bi)
137 this%irz21_bi => null()
140 IF (
ASSOCIATED(this%irz22_bi))
THEN
141 DEALLOCATE (this%irz22_bi)
142 this%irz22_bi => null()
145 IF (
ASSOCIATED(this%w11_bi))
THEN
146 DEALLOCATE (this%w11_bi)
147 this%w11_bi => null()
150 IF (
ASSOCIATED(this%w12_bi))
THEN
151 DEALLOCATE (this%w12_bi)
152 this%w12_bi => null()
155 IF (
ASSOCIATED(this%w21_bi))
THEN
156 DEALLOCATE (this%w21_bi)
157 this%w21_bi => null()
160 IF (
ASSOCIATED(this%w22_bi))
THEN
161 DEALLOCATE (this%w22_bi)
162 this%w22_bi => null()
191 TYPE (bivariate_type),
INTENT(inout) :: this
192 REAL(rprec),
DIMENSION(:,:),
INTENT(in) :: rsu
193 REAL(rprec),
DIMENSION(:,:),
INTENT(in) :: zsu
194 REAL(rprec),
DIMENSION(:),
INTENT(in) :: rgrid
195 REAL(rprec),
DIMENSION(:),
INTENT(in) :: zgrid
204 REAL(rprec) :: rad0, zee0
205 REAL(rprec) :: ri, zj
206 REAL(rprec) :: pr, qz
208 REAL(rprec) :: delr, delz
209 REAL (rprec) :: start_time
220 delr = rgrid(2) - rgrid(1)
221 delz = zgrid(2) - zgrid(1)
228 index1d = index1d + 1
235 IF (rad0.lt.rgrid(1) .or. rad0.gt.rgrid(nr) .or.
236 & zee0.lt.zgrid(1) .or. zee0.gt.zgrid(nz))
THEN
237 stop
'Plasma point outside response function grid!'
242 ir = int((rad0 - rgrid(1))/delr) + 1
243 jz = int((zee0 - zgrid(1))/delz) + 1
244 ir1 = min(nr, ir + 1)
245 jz1 = min(nz, jz + 1)
250 this%irz11_bi(index1d) = ir + nr*(jz - 1)
251 this%irz22_bi(index1d) = ir1 + nr*(jz1 - 1)
252 this%irz12_bi(index1d) = ir + nr*(jz1 - 1)
253 this%irz21_bi(index1d) = ir1 + nr*(jz - 1)
260 pr = (rad0 - ri)/delr
261 qz = (zee0 - zj)/delz
263 this%w22_bi(index1d) = temp
264 this%w21_bi(index1d) = pr - temp
265 this%w12_bi(index1d) = qz - temp
266 this%w11_bi(index1d) = 1 + temp - (pr + qz)
294 TYPE (bivariate_type),
INTENT(inout) :: this
295 REAL(rprec),
DIMENSION(:),
INTENT(in) :: rsu
296 REAL(rprec),
DIMENSION(:),
INTENT(in) :: zsu
297 REAL(rprec),
DIMENSION(:),
INTENT(in) :: rgrid
298 REAL(rprec),
DIMENSION(:),
INTENT(in) :: zgrid
307 REAL(rprec) :: rad0, zee0
308 REAL(rprec) :: ri, zj
309 REAL(rprec) :: pr, qz
311 REAL(rprec) :: delr, delz
312 REAL (rprec) :: start_time
323 delr = rgrid(2) - rgrid(1)
324 delz = zgrid(2) - zgrid(1)
329 index1d = index1d + 1
336 IF (rad0.lt.rgrid(1) .or. rad0.gt.rgrid(nr) .or.
337 & zee0.lt.zgrid(1) .or. zee0.gt.zgrid(nz))
THEN
338 stop
'Plasma point outside response function grid!'
343 ir = int((rad0 - rgrid(1))/delr) + 1
344 jz = int((zee0 - zgrid(1))/delz) + 1
345 ir1 = min(nr, ir + 1)
346 jz1 = min(nz, jz + 1)
351 this%irz11_bi(index1d) = ir + nr*(jz - 1)
352 this%irz22_bi(index1d) = ir1 + nr*(jz1 - 1)
353 this%irz12_bi(index1d) = ir + nr*(jz1 - 1)
354 this%irz21_bi(index1d) = ir1 + nr*(jz - 1)
361 pr = (rad0 - ri)/delr
362 qz = (zee0 - zj)/delz
364 this%w22_bi(index1d) = temp
365 this%w21_bi(index1d) = pr - temp
366 this%w12_bi(index1d) = qz - temp
367 this%w11_bi(index1d) = 1 + temp - (pr + qz)
392 TYPE (bivariate_type),
INTENT(inout) :: this
393 REAL(rprec),
DIMENSION(this%nrz),
INTENT(in) :: resp_rz
394 REAL(rprec),
DIMENSION(this%nsu),
INTENT(out) :: resp_su
398 REAL (rprec) :: start_time
407 resp_su(jsu) = this%w11_bi(jsu)*resp_rz(this%irz11_bi(jsu))
408 & + this%w22_bi(jsu)*resp_rz(this%irz22_bi(jsu))
409 & + this%w21_bi(jsu)*resp_rz(this%irz21_bi(jsu))
410 & + this%w12_bi(jsu)*resp_rz(this%irz12_bi(jsu))