PyFishPack 0.1.0__cp313-cp313-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. PyFishPack/__init__.py +86 -0
  2. PyFishPack/__pycache__/__init__.cpython-313.pyc +0 -0
  3. PyFishPack/__pycache__/apps.cpython-313.pyc +0 -0
  4. PyFishPack/_dummy.c +23 -0
  5. PyFishPack/_dummy.cp313-win_amd64.pyd +0 -0
  6. PyFishPack/apps.py +3640 -0
  7. PyFishPack/fishpack.cp313-win_amd64.dll.a +0 -0
  8. PyFishPack/fishpack.cp313-win_amd64.pyd +0 -0
  9. PyFishPack/meson.build +213 -0
  10. PyFishPack/src/archive/f77/Makefile +19 -0
  11. PyFishPack/src/archive/f77/blktri.f +1404 -0
  12. PyFishPack/src/archive/f77/cblktri.f +1414 -0
  13. PyFishPack/src/archive/f77/cmgnbn.f +1592 -0
  14. PyFishPack/src/archive/f77/comf.f +186 -0
  15. PyFishPack/src/archive/f77/fftpack.f +2968 -0
  16. PyFishPack/src/archive/f77/genbun.f +1335 -0
  17. PyFishPack/src/archive/f77/gnbnaux.f +314 -0
  18. PyFishPack/src/archive/f77/hstcrt.f +443 -0
  19. PyFishPack/src/archive/f77/hstcsp.f +683 -0
  20. PyFishPack/src/archive/f77/hstcyl.f +485 -0
  21. PyFishPack/src/archive/f77/hstplr.f +538 -0
  22. PyFishPack/src/archive/f77/hstssp.f +634 -0
  23. PyFishPack/src/archive/f77/hw3crt.f +687 -0
  24. PyFishPack/src/archive/f77/hwscrt.f +512 -0
  25. PyFishPack/src/archive/f77/hwscsp.f +728 -0
  26. PyFishPack/src/archive/f77/hwscyl.f +538 -0
  27. PyFishPack/src/archive/f77/hwsplr.f +602 -0
  28. PyFishPack/src/archive/f77/hwsssp.f +780 -0
  29. PyFishPack/src/archive/f77/pois3d.f +550 -0
  30. PyFishPack/src/archive/f77/poistg.f +875 -0
  31. PyFishPack/src/archive/f77/sepaux.f +361 -0
  32. PyFishPack/src/archive/f77/sepeli.f +1029 -0
  33. PyFishPack/src/archive/f77/sepx4.f +958 -0
  34. PyFishPack/src/centered_axisymmetric_spherical_solver.f90 +1002 -0
  35. PyFishPack/src/centered_cartesian_helmholtz_solver_3d.f90 +819 -0
  36. PyFishPack/src/centered_cartesian_solver.f90 +583 -0
  37. PyFishPack/src/centered_cylindrical_solver.f90 +634 -0
  38. PyFishPack/src/centered_helmholtz_solvers.f90 +156 -0
  39. PyFishPack/src/centered_polar_solver.f90 +746 -0
  40. PyFishPack/src/centered_real_linear_systems_solver.f90 +280 -0
  41. PyFishPack/src/centered_spherical_solver.f90 +928 -0
  42. PyFishPack/src/complex_block_tridiagonal_linear_systems_solver.f90 +1947 -0
  43. PyFishPack/src/complex_linear_systems_solver.f90 +1787 -0
  44. PyFishPack/src/fftpack_c_api.f90 +86 -0
  45. PyFishPack/src/fishpack.f90 +191 -0
  46. PyFishPack/src/fishpack.pyf +504 -0
  47. PyFishPack/src/fishpack_c_api.f90 +365 -0
  48. PyFishPack/src/fishpack_original.pyf +2119 -0
  49. PyFishPack/src/fishpack_precision.f90 +53 -0
  50. PyFishPack/src/general_linear_systems_solver_3d.f90 +296 -0
  51. PyFishPack/src/iterative_solvers.f90 +969 -0
  52. PyFishPack/src/main.f90 +10 -0
  53. PyFishPack/src/pyfishpack_module.c +1302 -0
  54. PyFishPack/src/real_block_tridiagonal_linear_systems_solver.f90 +319 -0
  55. PyFishPack/src/sepeli.f90 +1454 -0
  56. PyFishPack/src/sepx4.f90 +1338 -0
  57. PyFishPack/src/staggered_axisymmetric_spherical_solver.f90 +908 -0
  58. PyFishPack/src/staggered_cartesian_solver.f90 +553 -0
  59. PyFishPack/src/staggered_cylindrical_solver.f90 +630 -0
  60. PyFishPack/src/staggered_helmholtz_solvers.f90 +172 -0
  61. PyFishPack/src/staggered_polar_solver.f90 +651 -0
  62. PyFishPack/src/staggered_real_linear_systems_solver.f90 +258 -0
  63. PyFishPack/src/staggered_spherical_solver.f90 +758 -0
  64. PyFishPack/src/three_dimensional_solvers.f90 +602 -0
  65. PyFishPack/src/type_CenteredCyclicReductionUtility.f90 +1714 -0
  66. PyFishPack/src/type_CyclicReductionUtility.f90 +472 -0
  67. PyFishPack/src/type_FishpackWorkspace.f90 +290 -0
  68. PyFishPack/src/type_GeneralizedCyclicReductionUtility.f90 +1980 -0
  69. PyFishPack/src/type_PeriodicFastFourierTransform.f90 +3789 -0
  70. PyFishPack/src/type_SepAux.f90 +586 -0
  71. PyFishPack/src/type_StaggeredCyclicReductionUtility.f90 +893 -0
  72. pyfishpack-0.1.0.dist-info/DELVEWHEEL +2 -0
  73. pyfishpack-0.1.0.dist-info/METADATA +81 -0
  74. pyfishpack-0.1.0.dist-info/RECORD +81 -0
  75. pyfishpack-0.1.0.dist-info/WHEEL +5 -0
  76. pyfishpack-0.1.0.dist-info/licenses/LICENSE +21 -0
  77. pyfishpack-0.1.0.dist-info/top_level.txt +1 -0
  78. pyfishpack.libs/libgcc_s_seh-1-25d59ccffa1a9009644065b069829e07.dll +0 -0
  79. pyfishpack.libs/libgfortran-5-08f2195cfa0d823e13371c5c3186a82a.dll +0 -0
  80. pyfishpack.libs/libquadmath-0-c5abb9113f1ee64b87a889958e4b7418.dll +0 -0
  81. pyfishpack.libs/libwinpthread-1-83908d14abfafb8b3bfa38cf51ecee56.dll +0 -0
@@ -0,0 +1,586 @@
1
+ !
2
+ ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
3
+ ! * *
4
+ ! * copyright (c) 2005 by UCAR *
5
+ ! * *
6
+ ! * University Corporation for Atmospheric Research *
7
+ ! * *
8
+ ! * all rights reserved *
9
+ ! * *
10
+ ! * Fishpack *
11
+ ! * *
12
+ ! * A Package of Fortran *
13
+ ! * *
14
+ ! * Subroutines and Example Programs *
15
+ ! * *
16
+ ! * for Modeling Geophysical Processes *
17
+ ! * *
18
+ ! * by *
19
+ ! * *
20
+ ! * John Adams, Paul Swarztrauber and Roland Sweet *
21
+ ! * *
22
+ ! * of *
23
+ ! * *
24
+ ! * the National Center for Atmospheric Research *
25
+ ! * *
26
+ ! * Boulder, Colorado (80307) U.S.A. *
27
+ ! * *
28
+ ! * which is sponsored by *
29
+ ! * *
30
+ ! * the National Science Foundation *
31
+ ! * *
32
+ ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
33
+ !
34
+ !
35
+ ! PACKAGE SEPAUX Contains no user entry points.
36
+ !
37
+ ! LATEST REVISION April 2016
38
+ !
39
+ ! PURPOSE This package contains auxiliary class for
40
+ ! the solvers sepeli and sepx4.
41
+ !
42
+ ! USAGE Since this package contains no user entries,
43
+ ! no usage instructions or argument descriptions
44
+ ! are given here.
45
+ !
46
+ ! HISTORY * Developed in the late 1970's by John C. Adams
47
+ ! of NCAR's scienttific computing division.
48
+ ! * Revised in June 2004 incorporating fortran 90
49
+ ! features
50
+ !
51
+ !
52
+ module type_SepAux
53
+
54
+ use fishpack_precision, only: &
55
+ wp, & ! Working precision
56
+ ip ! Integer precision
57
+
58
+ ! Explicit typing only
59
+ implicit none
60
+
61
+ ! Everything is private unless stated otherwise
62
+ private
63
+ public :: SepAux
64
+ public :: get_coefficients
65
+
66
+ type, public :: SepAux
67
+ ! Type components
68
+ integer(ip), public :: kswx, kswy, k, l, mit, nit, is, ms, js, ns
69
+ real(wp), public :: ait, bit, cit, dit
70
+ real(wp), public :: dlx, dly, tdlx3, tdly3, dlx4, dly4
71
+ contains
72
+ ! Type-bound procedures
73
+ procedure, public :: seport
74
+ procedure, public :: sepmin
75
+ procedure, public :: septri
76
+ procedure, public :: sepdx
77
+ procedure, public :: sepdy
78
+ end type SepAux
79
+
80
+ interface
81
+ pure subroutine get_coefficients(x, a, b, c)
82
+ import :: wp
83
+
84
+ ! Dummy arguments
85
+ real(wp), intent(in) :: x
86
+ real(wp), intent(out) :: a
87
+ real(wp), intent(out) :: b
88
+ real(wp), intent(out) :: c
89
+ end subroutine get_coefficients
90
+ end interface
91
+
92
+ contains
93
+
94
+ subroutine seport(this, usol, zn, zm, pertrb)
95
+ !
96
+ ! Purpose:
97
+ !
98
+ ! this subroutine orthoganalizes the array usol with respect to
99
+ ! the constant array in a weighted least squares norm
100
+ !
101
+
102
+ ! Dummy arguments
103
+
104
+ class(SepAux), intent(inout) :: this
105
+ real(wp), intent(inout) :: usol(:,:)
106
+ real(wp), intent(in) :: zn(:)
107
+ real(wp), intent(in) :: zm(:)
108
+ real(wp), intent(out) :: pertrb
109
+
110
+ ! Local variables
111
+
112
+ integer(ip) :: istr, ifnl, jstr, jfnl, i, ii
113
+ real(wp) :: ute, ete
114
+
115
+
116
+ ! Associate various quantities
117
+ associate( &
118
+ kswx => this%kswx, &
119
+ kswy => this%kswy, &
120
+ k => this%k, &
121
+ l=>this%l, &
122
+ mit=>this%mit, &
123
+ nit=> this%nit, &
124
+ is=> this%is, &
125
+ ms=> this%ms, &
126
+ js=> this%js, &
127
+ ns=> this%ns, &
128
+ ait => this%ait, &
129
+ bit => this%bit, &
130
+ cit => this%cit, &
131
+ dit => this%dit, &
132
+ dlx => this%dlx, &
133
+ dly => this%dly, &
134
+ tdlx3 => this%tdlx3, &
135
+ tdly3 => this%tdly3, &
136
+ dlx4 => this%dlx4, &
137
+ dly4 => this%dly4 &
138
+ )
139
+
140
+ istr = is
141
+ ifnl = ms
142
+ jstr = js
143
+ jfnl = ns
144
+ !
145
+ ! Compute weighted inner products
146
+ !
147
+ ute = 0.0_wp
148
+ ete = 0.0_wp
149
+
150
+ do i = is, ms
151
+ ii = i - is + 1
152
+ ete = ete + sum(zm(ii)*zn(:ns-js+1))
153
+ ute = ute + sum(usol(i, js:ns)*zm(ii)*zn(:ns-js+1))
154
+ end do
155
+ !
156
+ ! set perturbation parameter
157
+ !
158
+ pertrb = ute/ete
159
+ !
160
+ ! subtract off constant pertrb
161
+ !
162
+ usol(istr:ifnl, jstr:jfnl) = usol(istr:ifnl, jstr:jfnl) - pertrb
163
+
164
+ end associate
165
+
166
+ end subroutine seport
167
+
168
+ subroutine sepmin(this, usol, zn, zm, pertrb)
169
+ !
170
+ ! Purpose:
171
+ !
172
+ ! this subroutine orhtogonalizes the array usol with respect to
173
+ ! the constant array in a weighted least squares norm
174
+ !
175
+ !
176
+ ! entry at sepmin occurrs when the final solution is
177
+ ! to be minimized with respect to the weighted
178
+ ! least squares norm
179
+ !
180
+
181
+ ! Dummy arguments
182
+
183
+ class(SepAux), intent(inout) :: this
184
+ real(wp), intent(inout) :: usol(:,:)
185
+ real(wp), intent(in) :: zn(:)
186
+ real(wp), intent(in) :: zm(:)
187
+ real(wp), intent(out) :: pertrb
188
+
189
+ ! Local variables
190
+
191
+ integer(ip) :: istr, ifnl, jstr, jfnl, i, ii
192
+ real(wp) :: ute, ete
193
+
194
+
195
+ ! Associate various quantities
196
+ associate( &
197
+ kswx => this%kswx, &
198
+ kswy => this%kswy, &
199
+ k => this%k, &
200
+ l=>this%l, &
201
+ mit=>this%mit, &
202
+ nit=> this%nit, &
203
+ is=> this%is, &
204
+ ms=> this%ms, &
205
+ js=> this%js, &
206
+ ns=> this%ns, &
207
+ ait => this%ait, &
208
+ bit => this%bit, &
209
+ cit => this%cit, &
210
+ dit => this%dit, &
211
+ dlx => this%dlx, &
212
+ dly => this%dly, &
213
+ tdlx3 => this%tdlx3, &
214
+ tdly3 => this%tdly3, &
215
+ dlx4 => this%dlx4, &
216
+ dly4 => this%dly4 &
217
+ )
218
+
219
+ istr = 1
220
+ ifnl = k
221
+ jstr = 1
222
+ jfnl = l
223
+
224
+ ! compute weighted inner products
225
+ ute = 0.0_wp
226
+ ete = 0.0_wp
227
+ do i = is, ms
228
+ ii = i - is + 1
229
+ ete = ete + sum(zm(ii) * zn(:ns-js+1))
230
+ ute = ute + sum(usol(i, js:ns) * zm(ii) * zn(:ns-js+1))
231
+ end do
232
+
233
+ ! set perturbation parameter
234
+ pertrb = ute/ete
235
+
236
+ ! subtract off constant pertrb
237
+ usol(istr:ifnl, jstr:jfnl) = usol(istr:ifnl, jstr:jfnl) - pertrb
238
+
239
+ end associate
240
+
241
+ end subroutine sepmin
242
+
243
+
244
+ subroutine septri(this, n, a, b, c, d, u, z)
245
+ !
246
+ ! this subroutine solves for a non-zero eigenvector corresponding
247
+ ! to the zero eigenvalue of the transpose of the rank
248
+ ! deficient one matrix with subdiagonal a, diagonal b, and
249
+ ! superdiagonal c , with a(1) in the (1, n) position, with
250
+ ! c(n) in the (n, 1) position, and all other elements zero.
251
+ !
252
+
253
+ ! Dummy arguments
254
+
255
+ class(SepAux), intent(inout) :: this
256
+ integer(ip), intent(in) :: n
257
+ real(wp), intent(in) :: a(n)
258
+ real(wp), intent(in) :: b(n)
259
+ real(wp), intent(in) :: c(n)
260
+ real(wp), intent(inout) :: d(n)
261
+ real(wp), intent(inout) :: u(n)
262
+ real(wp), intent(inout) :: z(n)
263
+
264
+ ! Local variables
265
+
266
+ integer(ip) :: nm2, j, nm1
267
+ real(wp) :: bn, v, den, an
268
+
269
+
270
+ ! Associate various quantities
271
+ associate( &
272
+ kswx => this%kswx, &
273
+ kswy => this%kswy, &
274
+ k => this%k, &
275
+ l=>this%l, &
276
+ mit=>this%mit, &
277
+ nit=> this%nit, &
278
+ is=> this%is, &
279
+ ms=> this%ms, &
280
+ js=> this%js, &
281
+ ns=> this%ns, &
282
+ ait => this%ait, &
283
+ bit => this%bit, &
284
+ cit => this%cit, &
285
+ dit => this%dit, &
286
+ dlx => this%dlx, &
287
+ dly => this%dly, &
288
+ tdlx3 => this%tdlx3, &
289
+ tdly3 => this%tdly3, &
290
+ dlx4 => this%dlx4, &
291
+ dly4 => this%dly4 &
292
+ )
293
+
294
+ bn = b(n)
295
+ d(1) = a(2)/b(1)
296
+ v = a(1)
297
+ u(1) = c(n)/b(1)
298
+ nm2 = n - 2
299
+
300
+ do j = 2, nm2
301
+ den = b(j) - c(j-1)*d(j-1)
302
+ d(j) = a(j+1)/den
303
+ u(j) = -c(j-1)*u(j-1)/den
304
+ bn = bn - v*u(j-1)
305
+ v = -v*d(j-1)
306
+ end do
307
+
308
+ den = b(n-1) - c(n-2)*d(n-2)
309
+ d(n-1) = (a(n)-c(n-2)*u(n-2))/den
310
+ an = c(n-1) - v*d(n-2)
311
+ bn = bn - v*u(n-2)
312
+ den = bn - an*d(n-1)
313
+ !
314
+ ! set last component equal to one
315
+ !
316
+ z(n) = 1.0_wp
317
+ z(n-1) = -d(n-1)
318
+ nm1 = n - 1
319
+
320
+ do j = 2, nm1
321
+ k = n - j
322
+ z(k) = (-d(k)*z(k+1)) - u(k)*z(n)
323
+ end do
324
+
325
+ end associate
326
+
327
+ end subroutine septri
328
+
329
+ !
330
+ ! this program computes second order finite difference
331
+ ! approximations to the third and fourth x
332
+ ! partial derivatives of u at the (i, j) mesh point
333
+ !
334
+ !
335
+ pure subroutine sepdx(this, u, i, j, uxxx, uxxxx)
336
+
337
+ ! Local variables
338
+ class(SepAux), intent(inout) :: this
339
+ integer(ip), intent(in) :: i
340
+ integer(ip), intent(in) :: j
341
+ real(wp), intent(out) :: uxxx
342
+ real(wp), intent(out) :: uxxxx
343
+ real(wp), intent(in) :: u(:,:)
344
+
345
+ ! Associate various quantities
346
+ associate( &
347
+ kswx => this%kswx, &
348
+ kswy => this%kswy, &
349
+ k => this%k, &
350
+ l=>this%l, &
351
+ mit=>this%mit, &
352
+ nit=> this%nit, &
353
+ is=> this%is, &
354
+ ms=> this%ms, &
355
+ js=> this%js, &
356
+ ns=> this%ns, &
357
+ ait => this%ait, &
358
+ bit => this%bit, &
359
+ cit => this%cit, &
360
+ dit => this%dit, &
361
+ dlx => this%dlx, &
362
+ dly => this%dly, &
363
+ tdlx3 => this%tdlx3, &
364
+ tdly3 => this%tdly3, &
365
+ dlx4 => this%dlx4, &
366
+ dly4 => this%dly4 &
367
+ )
368
+
369
+ ! compute partial derivative approximations at x=a
370
+ !
371
+ if (i == 1) then
372
+ if (kswx /= 1) then
373
+ uxxx = ((-5.0_wp * u(1, j))+18.0_wp * u(2, j)-24.0_wp * u(3, j)+14.0_wp * u(4, j)- &
374
+ 3.0_wp * u(5, j))/tdlx3
375
+ uxxxx = (3.0_wp * u(1, j)-14.0_wp * u(2, j)+26.0_wp * u(3, j)-24.0_wp * u(4, j)+11.0 &
376
+ *u(5, j)-2.0_wp * u(6, j))/dlx4
377
+ return
378
+ else
379
+ !
380
+ ! periodic at x=a
381
+ !
382
+ uxxx = ((-u(k-2, j))+2.0_wp * u(k-1, j)-2.0_wp * u(2, j)+u(3, j))/tdlx3
383
+ uxxxx = (u(k-2, j)-4.0_wp * u(k-1, j)+6.0_wp * u(1, j)-4.0_wp * u(2, j)+u(3, j)) &
384
+ /dlx4
385
+ return
386
+ end if
387
+ !
388
+ ! compute partial derivative approximations at x=a+dlx
389
+ !
390
+ else if (i == 2) then
391
+ if (kswx /= 1) then
392
+ uxxx = ((-3.0_wp * u(1, j))+10.0_wp * u(2, j)-12.0_wp * u(3, j)+6.0_wp * u(4, j)-u(5 &
393
+ , j))/tdlx3
394
+ uxxxx = (2.0_wp * u(1, j)-9.0_wp * u(2, j)+16.0_wp * u(3, j)-14.0_wp * u(4, j)+6.0_wp * u &
395
+ (5, j)-u(6, j))/dlx4
396
+ return
397
+ else
398
+ !
399
+ ! periodic at x=a+dlx
400
+ !
401
+ uxxx = ((-u(k-1, j))+2.0_wp * u(1, j)-2.0_wp * u(3, j)+u(4, j))/tdlx3
402
+ uxxxx = (u(k-1, j)-4.0_wp * u(1, j)+6.0_wp * u(2, j)-4.0_wp * u(3, j)+u(4, j))/ &
403
+ dlx4
404
+ return
405
+ end if
406
+ else if (i > 2 .and. i < k-1) then
407
+ !
408
+ ! compute partial derivative approximations on the interior
409
+ !
410
+ uxxx = ((-u(i-2, j))+2.0_wp * u(i-1, j)-2.0_wp * u(i+1, j)+u(i+2, j))/tdlx3
411
+ uxxxx = (u(i-2, j)-4.0_wp * u(i-1, j)+6.0_wp * u(i, j)-4.0_wp * u(i+1, j)+u(i+2, j) &
412
+ )/dlx4
413
+ return
414
+ else if (i == k - 1) then
415
+ !
416
+ ! compute partial derivative approximations at x=b-dlx
417
+ !
418
+ if (kswx /= 1) then
419
+ uxxx = (u(k-4, j)-6.0_wp * u(k-3, j)+12.0_wp * u(k-2, j)-10.0_wp * u(k-1, j)+ &
420
+ 3.0_wp * u(k, j))/tdlx3
421
+ uxxxx = ((-u(k-5, j))+6.0_wp * u(k-4, j)-14.0_wp * u(k-3, j)+16.0_wp * u(k-2, j &
422
+ )-9.0_wp * u(k-1, j)+2.0_wp * u(k, j))/dlx4
423
+ return
424
+ else
425
+ !
426
+ ! periodic at x=b-dlx
427
+ !
428
+ uxxx = ((-u(k-3, j))+2.0_wp * u(k-2, j)-2.0_wp * u(1, j)+u(2, j))/tdlx3
429
+ uxxxx = (u(k-3, j)-4.0_wp * u(k-2, j)+6.0_wp * u(k-1, j)-4.0_wp * u(1, j)+u(2, j &
430
+ ))/dlx4
431
+ return
432
+ end if
433
+ else if (i == k) then
434
+ !
435
+ ! compute partial derivative approximations at x=b
436
+ !
437
+ uxxx = -(3.0_wp * u(k-4, j)-14.0_wp * u(k-3, j)+24.0_wp * u(k-2, j)&
438
+ -18.0_wp * u(k-1, j) + 5.0_wp * u(k, j))/tdlx3
439
+
440
+ uxxxx = ((-2.0_wp * u(k-5, j))+11.0_wp * u(k-4, j)-24.0_wp * u(k-3, j)&
441
+ +26.0_wp * u(k-2, j)-14.0_wp * u(k-1, j)+3.0_wp * u(k, j))/dlx4
442
+ return
443
+ end if
444
+
445
+ end associate
446
+
447
+ end subroutine sepdx
448
+
449
+ !
450
+ ! Purpose:
451
+ !
452
+ ! this program computes second order finite difference
453
+ ! approximations to the third and fourth y
454
+ ! partial derivatives of u at the (i, j) mesh point
455
+ !
456
+ pure subroutine sepdy(this, u, idmn, i, j, uyyy, uyyyy)
457
+
458
+ ! Dummy arguments
459
+ class(SepAux), intent(inout) :: this
460
+ integer(ip), intent(in) :: idmn
461
+ integer(ip), intent(in) :: i
462
+ integer(ip), intent(in) :: j
463
+ real(wp), intent(out) :: uyyy
464
+ real(wp), intent(out) :: uyyyy
465
+ real(wp), intent(in) :: u(idmn, 6)
466
+
467
+ ! Associate various quantities
468
+ associate( &
469
+ kswx => this%kswx, &
470
+ kswy => this%kswy, &
471
+ k => this%k, &
472
+ l=>this%l, &
473
+ mit=>this%mit, &
474
+ nit=> this%nit, &
475
+ is=> this%is, &
476
+ ms=> this%ms, &
477
+ js=> this%js, &
478
+ ns=> this%ns, &
479
+ ait => this%ait, &
480
+ bit => this%bit, &
481
+ cit => this%cit, &
482
+ dit => this%dit, &
483
+ dlx => this%dlx, &
484
+ dly => this%dly, &
485
+ tdlx3 => this%tdlx3, &
486
+ tdly3 => this%tdly3, &
487
+ dlx4 => this%dlx4, &
488
+ dly4 => this%dly4 &
489
+ )
490
+
491
+ ! compute partial derivative approximations at y=c
492
+ !
493
+ if (j == 1) then
494
+ if (kswy /= 1) then
495
+ uyyy = ((-5.0_wp * u(i, 1))+18.0_wp * u(i, 2) &
496
+ -24.0_wp * u(i, 3)+14.0_wp * u(i, 4)- &
497
+ 3.0_wp * u(i, 5))/tdly3
498
+ uyyyy = (3.0_wp * u(i, 1)-14.0_wp * u(i, 2) &
499
+ +26.0_wp * u(i, 3)-24.0_wp * u(i, 4)+11.0 &
500
+ *u(i, 5)-2.0_wp * u(i, 6))/dly4
501
+ return
502
+ else
503
+ !
504
+ ! periodic at x=a
505
+ !
506
+ uyyy = ((-u(i, l-2))+2.0_wp * u(i, l-1) &
507
+ -2.0_wp * u(i, 2)+u(i, 3))/tdly3
508
+ uyyyy = (u(i, l-2)-4.0_wp * u(i, l-1) &
509
+ +6.0_wp * u(i, 1)-4.0_wp * u(i, 2)+u(i, 3)) &
510
+ /dly4
511
+ return
512
+ end if
513
+ !
514
+ ! compute partial derivative approximations at y=c+dly
515
+ !
516
+ else if (j == 2) then
517
+ if (kswy /= 1) then
518
+ uyyy = ((-3.0_wp * u(i, 1))+10.0_wp * u(i, 2) &
519
+ -12.0_wp * u(i, 3)+6.0_wp * u(i, 4)-u(i &
520
+ , 5))/tdly3
521
+ uyyyy = (2.0_wp * u(i, 1)-9.0_wp * u(i, 2) &
522
+ +16.0_wp * u(i, 3)-14.0_wp * u(i, 4)+6.0_wp * u &
523
+ (i, 5)-u(i, 6))/dly4
524
+ return
525
+ else
526
+ !
527
+ ! periodic at y=c+dly
528
+ !
529
+ uyyy = ((-u(i, l-1))+2.0_wp * u(i, 1) &
530
+ -2.0_wp * u(i, 3)+u(i, 4))/tdly3
531
+ uyyyy = (u(i, l-1)-4.0_wp * u(i, 1) &
532
+ +6.0_wp * u(i, 2)-4.0_wp * u(i, 3)+u(i, 4))/ &
533
+ dly4
534
+ return
535
+ end if
536
+ !
537
+ ! compute partial derivative approximations on the interior
538
+ !
539
+ else if (j > 2 .and. j < l-1) then
540
+ uyyy = ((-u(i, j-2))+2.0_wp * u(i, j-1) &
541
+ -2.0_wp * u(i, j+1)+u(i, j+2))/tdly3
542
+ uyyyy = (u(i, j-2)-4.0_wp * u(i, j-1) &
543
+ +6.0_wp * u(i, j)-4.0_wp * u(i, j+1)+u(i, j+2) &
544
+ )/dly4
545
+ return
546
+ else if (j == l - 1) then
547
+ !
548
+ ! compute partial derivative approximations at y=d-dly
549
+ !
550
+ if (kswy /= 1) then
551
+ uyyy = (u(i, l-4)-6.0_wp * u(i, l-3) &
552
+ + 12.0_wp * u(i, l-2)-10.0_wp * u(i, l-1)+ &
553
+ 3.0_wp * u(i, l))/tdly3
554
+ uyyyy = ((-u(i, l-5))+6.0_wp * u(i, l-4) &
555
+ -14.0_wp * u(i, l-3)+16.0_wp * u(i, l-2 &
556
+ )-9.0_wp * u(i, l-1)+2.0_wp * u(i, l))/dly4
557
+ return
558
+ else
559
+ !
560
+ ! periodic at y=d-dly
561
+ !
562
+ uyyy = ((-u(i, l-3))+2.0_wp * u(i, l-2) &
563
+ -2.0_wp * u(i, 1)+u(i, 2))/tdly3
564
+ uyyyy = (u(i, l-3)-4.0_wp * u(i, l-2) &
565
+ +6.0_wp * u(i, l-1)-4.0_wp * u(i, 1)+u(i, 2 &
566
+ ))/dly4
567
+ return
568
+ end if
569
+ else if (j == l) then
570
+ !
571
+ ! compute partial derivative approximations at y=d
572
+ !
573
+ uyyy = -(3.0_wp * u(i, l-4)-14.0_wp * u(i, l-3) &
574
+ +24.0_wp * u(i, l-2)-18.0_wp * u(i, l-1) &
575
+ +5.0_wp * u(i, l))/tdly3
576
+ uyyyy = ((-2.0_wp * u(i, l-5))+11.0_wp * u(i, l-4) &
577
+ -24.0_wp * u(i, l-3)+26.0_wp * u(i, l &
578
+ -2)-14.0_wp * u(i, l-1)+3.0_wp * u(i, l))/dly4
579
+ return
580
+ end if
581
+
582
+ end associate
583
+
584
+ end subroutine sepdy
585
+
586
+ end module type_SepAux