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.
- PyFishPack/__init__.py +86 -0
- PyFishPack/__pycache__/__init__.cpython-313.pyc +0 -0
- PyFishPack/__pycache__/apps.cpython-313.pyc +0 -0
- PyFishPack/_dummy.c +23 -0
- PyFishPack/_dummy.cp313-win_amd64.pyd +0 -0
- PyFishPack/apps.py +3640 -0
- PyFishPack/fishpack.cp313-win_amd64.dll.a +0 -0
- PyFishPack/fishpack.cp313-win_amd64.pyd +0 -0
- PyFishPack/meson.build +213 -0
- PyFishPack/src/archive/f77/Makefile +19 -0
- PyFishPack/src/archive/f77/blktri.f +1404 -0
- PyFishPack/src/archive/f77/cblktri.f +1414 -0
- PyFishPack/src/archive/f77/cmgnbn.f +1592 -0
- PyFishPack/src/archive/f77/comf.f +186 -0
- PyFishPack/src/archive/f77/fftpack.f +2968 -0
- PyFishPack/src/archive/f77/genbun.f +1335 -0
- PyFishPack/src/archive/f77/gnbnaux.f +314 -0
- PyFishPack/src/archive/f77/hstcrt.f +443 -0
- PyFishPack/src/archive/f77/hstcsp.f +683 -0
- PyFishPack/src/archive/f77/hstcyl.f +485 -0
- PyFishPack/src/archive/f77/hstplr.f +538 -0
- PyFishPack/src/archive/f77/hstssp.f +634 -0
- PyFishPack/src/archive/f77/hw3crt.f +687 -0
- PyFishPack/src/archive/f77/hwscrt.f +512 -0
- PyFishPack/src/archive/f77/hwscsp.f +728 -0
- PyFishPack/src/archive/f77/hwscyl.f +538 -0
- PyFishPack/src/archive/f77/hwsplr.f +602 -0
- PyFishPack/src/archive/f77/hwsssp.f +780 -0
- PyFishPack/src/archive/f77/pois3d.f +550 -0
- PyFishPack/src/archive/f77/poistg.f +875 -0
- PyFishPack/src/archive/f77/sepaux.f +361 -0
- PyFishPack/src/archive/f77/sepeli.f +1029 -0
- PyFishPack/src/archive/f77/sepx4.f +958 -0
- PyFishPack/src/centered_axisymmetric_spherical_solver.f90 +1002 -0
- PyFishPack/src/centered_cartesian_helmholtz_solver_3d.f90 +819 -0
- PyFishPack/src/centered_cartesian_solver.f90 +583 -0
- PyFishPack/src/centered_cylindrical_solver.f90 +634 -0
- PyFishPack/src/centered_helmholtz_solvers.f90 +156 -0
- PyFishPack/src/centered_polar_solver.f90 +746 -0
- PyFishPack/src/centered_real_linear_systems_solver.f90 +280 -0
- PyFishPack/src/centered_spherical_solver.f90 +928 -0
- PyFishPack/src/complex_block_tridiagonal_linear_systems_solver.f90 +1947 -0
- PyFishPack/src/complex_linear_systems_solver.f90 +1787 -0
- PyFishPack/src/fftpack_c_api.f90 +86 -0
- PyFishPack/src/fishpack.f90 +191 -0
- PyFishPack/src/fishpack.pyf +504 -0
- PyFishPack/src/fishpack_c_api.f90 +365 -0
- PyFishPack/src/fishpack_original.pyf +2119 -0
- PyFishPack/src/fishpack_precision.f90 +53 -0
- PyFishPack/src/general_linear_systems_solver_3d.f90 +296 -0
- PyFishPack/src/iterative_solvers.f90 +969 -0
- PyFishPack/src/main.f90 +10 -0
- PyFishPack/src/pyfishpack_module.c +1302 -0
- PyFishPack/src/real_block_tridiagonal_linear_systems_solver.f90 +319 -0
- PyFishPack/src/sepeli.f90 +1454 -0
- PyFishPack/src/sepx4.f90 +1338 -0
- PyFishPack/src/staggered_axisymmetric_spherical_solver.f90 +908 -0
- PyFishPack/src/staggered_cartesian_solver.f90 +553 -0
- PyFishPack/src/staggered_cylindrical_solver.f90 +630 -0
- PyFishPack/src/staggered_helmholtz_solvers.f90 +172 -0
- PyFishPack/src/staggered_polar_solver.f90 +651 -0
- PyFishPack/src/staggered_real_linear_systems_solver.f90 +258 -0
- PyFishPack/src/staggered_spherical_solver.f90 +758 -0
- PyFishPack/src/three_dimensional_solvers.f90 +602 -0
- PyFishPack/src/type_CenteredCyclicReductionUtility.f90 +1714 -0
- PyFishPack/src/type_CyclicReductionUtility.f90 +472 -0
- PyFishPack/src/type_FishpackWorkspace.f90 +290 -0
- PyFishPack/src/type_GeneralizedCyclicReductionUtility.f90 +1980 -0
- PyFishPack/src/type_PeriodicFastFourierTransform.f90 +3789 -0
- PyFishPack/src/type_SepAux.f90 +586 -0
- PyFishPack/src/type_StaggeredCyclicReductionUtility.f90 +893 -0
- pyfishpack-0.1.0.dist-info/DELVEWHEEL +2 -0
- pyfishpack-0.1.0.dist-info/METADATA +81 -0
- pyfishpack-0.1.0.dist-info/RECORD +81 -0
- pyfishpack-0.1.0.dist-info/WHEEL +5 -0
- pyfishpack-0.1.0.dist-info/licenses/LICENSE +21 -0
- pyfishpack-0.1.0.dist-info/top_level.txt +1 -0
- pyfishpack.libs/libgcc_s_seh-1-25d59ccffa1a9009644065b069829e07.dll +0 -0
- pyfishpack.libs/libgfortran-5-08f2195cfa0d823e13371c5c3186a82a.dll +0 -0
- pyfishpack.libs/libquadmath-0-c5abb9113f1ee64b87a889958e4b7418.dll +0 -0
- pyfishpack.libs/libwinpthread-1-83908d14abfafb8b3bfa38cf51ecee56.dll +0 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
module fishpack_precision
|
|
2
|
+
|
|
3
|
+
use, intrinsic :: ISO_C_binding, only: &
|
|
4
|
+
C_INT, &
|
|
5
|
+
C_DOUBLE, &
|
|
6
|
+
C_DOUBLE_COMPLEX
|
|
7
|
+
|
|
8
|
+
! Explicit typing only
|
|
9
|
+
implicit none
|
|
10
|
+
|
|
11
|
+
! Everything is private unless stated otherwise
|
|
12
|
+
private
|
|
13
|
+
public :: wp ! Working precision
|
|
14
|
+
public :: ip ! Integer precision
|
|
15
|
+
public :: PI, TWO_PI, HALF_PI, EPS, MACHINE_EPSILON
|
|
16
|
+
public :: get_pi
|
|
17
|
+
|
|
18
|
+
! Floating point precision constants
|
|
19
|
+
integer, parameter :: FLOAT128 = selected_real_kind(p=33, r=4931) ! 33 digits, range [10^(-4931), 10^(+4931) - 1], 128 bits
|
|
20
|
+
integer, parameter :: FLOAT64 = selected_real_kind(p=15, r=307) ! 15 digits, range [10^(-307) , 10^(+307) - 1], 64 bits
|
|
21
|
+
integer, parameter :: FLOAT32 = selected_real_kind(p=6, r=37) ! 6 digits, range [10^(-37) , 10^(+37) - 1], 32 bits
|
|
22
|
+
integer, parameter :: wp = C_DOUBLE ! Default floating point precision
|
|
23
|
+
integer, parameter :: cwp = C_DOUBLE_COMPLEX
|
|
24
|
+
|
|
25
|
+
! Integer precision constants
|
|
26
|
+
integer, parameter :: INT64 = selected_int_kind(r=18) ! 19 digits plus sign, range [-2^(63),+2^(63) - 1], 64 bits
|
|
27
|
+
integer, parameter :: INT32 = selected_int_kind(r=9) ! 10 digits plus sign, range [-2^(31),+2^(31) - 1], 32 bits
|
|
28
|
+
integer, parameter :: INT16 = selected_int_kind(r=4) ! 5 digits plus sign, range [-2^(15),+2^(15) - 1], 16 bits
|
|
29
|
+
integer, parameter :: INT8 = selected_int_kind(r=2) ! 3 digits plus sign, range [-2^(7) ,+2^(7) - 1], 8 bits
|
|
30
|
+
integer, parameter :: ip = C_INT ! Default integer precision
|
|
31
|
+
|
|
32
|
+
! Calculation constants
|
|
33
|
+
real(wp), parameter :: ONE = 1.0_wp
|
|
34
|
+
real(wp), parameter :: TWO = 2.0_wp
|
|
35
|
+
real(wp), parameter :: PI = acos(-ONE)
|
|
36
|
+
real(wp), parameter :: HALF_PI = PI/TWO
|
|
37
|
+
real(wp), parameter :: TWO_PI = TWO * PI
|
|
38
|
+
real(wp), parameter :: MACHINE_EPSILON = epsilon(ONE)
|
|
39
|
+
real(wp), parameter :: EPS = MACHINE_EPSILON
|
|
40
|
+
|
|
41
|
+
contains
|
|
42
|
+
|
|
43
|
+
pure function get_pi() &
|
|
44
|
+
result (return_value)
|
|
45
|
+
|
|
46
|
+
! Dummy arguments
|
|
47
|
+
real(wp) :: return_value
|
|
48
|
+
|
|
49
|
+
return_value = 3.141592653589793238462643383279502884197169399375105820974_wp
|
|
50
|
+
|
|
51
|
+
end function get_pi
|
|
52
|
+
|
|
53
|
+
end module fishpack_precision
|
|
@@ -0,0 +1,296 @@
|
|
|
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
|
+
submodule(three_dimensional_solvers) general_linear_systems_solver_3d
|
|
35
|
+
|
|
36
|
+
contains
|
|
37
|
+
|
|
38
|
+
! SUBROUTINE pois3d(lperod, l, c1, mperod, m, c2, nperod, n, &
|
|
39
|
+
! a, b, c, ldimf, mdimf, f, ierror)
|
|
40
|
+
!
|
|
41
|
+
!
|
|
42
|
+
! DIMENSION OF a(n), b(n), c(n), f(ldimf, mdimf, n)
|
|
43
|
+
! ARGUMENTS
|
|
44
|
+
!
|
|
45
|
+
! PURPOSE Solves the linear system of equations
|
|
46
|
+
! for unknown x values, where i=1, 2, ..., l,
|
|
47
|
+
! j=1, 2, ..., m, and k=1, 2, ..., n
|
|
48
|
+
!
|
|
49
|
+
! c1*(x(i-1, j, k) -TWO *x(i, j, k) +x(i+1, j, k)) +
|
|
50
|
+
! c2*(x(i, j-1, k) -TWO *x(i, j, k) +x(i, j+1, k)) +
|
|
51
|
+
! a(k)*x(i, j, k-1) +b(k)*x(i, j, k)+ c(k)*x(i, j, k+1)
|
|
52
|
+
! = f(i, j, k)
|
|
53
|
+
!
|
|
54
|
+
! the indices k-1 and k+1 are evaluated modulo n,
|
|
55
|
+
! i.e. x(i, j, 0)=x(i, j, n) and x(i, j, n+1)=x(i, j, 1).
|
|
56
|
+
! the unknowns
|
|
57
|
+
! x(0, j, k), x(l+1, j, k), x(i, 0, k), and x(i, m+1, k)
|
|
58
|
+
! are assumed to take on certain prescribed
|
|
59
|
+
! values described below.
|
|
60
|
+
!
|
|
61
|
+
! USAGE call pois3d (lperod, l, c1, mperod, m, c2, nperod,
|
|
62
|
+
! n, a, b, c, ldimf, mdimf, f, ierror)
|
|
63
|
+
!
|
|
64
|
+
! ARGUMENTS
|
|
65
|
+
!
|
|
66
|
+
! ON INPUT
|
|
67
|
+
! lperod
|
|
68
|
+
! indicates the values that x(0, j, k) and
|
|
69
|
+
! x(l+1, j, k) are assumed to have.
|
|
70
|
+
! = 0 x(0, j, k)=x(l, j, k), x(l+1, j, k)=x(1, j, k)
|
|
71
|
+
! = 1 x(0, j, k) = 0, x(l+1, j, k) = 0
|
|
72
|
+
! = 2 x(0, j, k)=0, x(l+1, j, k)=x(l-1, j, k)
|
|
73
|
+
! = 3 x(0, j, k)=x(2, j, k), x(l+1, j, k)=x(l-1, j, k)
|
|
74
|
+
! = 4 x(0, j, k)=x(2, j, k), x(l+1, j, k) = 0.
|
|
75
|
+
!
|
|
76
|
+
! l
|
|
77
|
+
! the number of unknowns in the i-direction.
|
|
78
|
+
! l must be at least 3.
|
|
79
|
+
!
|
|
80
|
+
! c1
|
|
81
|
+
! real constant in the above linear system
|
|
82
|
+
! of equations to be solved.
|
|
83
|
+
!
|
|
84
|
+
! mperod
|
|
85
|
+
! indicates the values that x(i, 0, k) and
|
|
86
|
+
! x(i, m+1, k) are assumed to have.
|
|
87
|
+
! = 0 x(i, 0, k)=x(i, m, k), x(i, m+1, k)=x(i, 1, k)
|
|
88
|
+
! = 1 x(i, 0, k)=0, x(i, m+1, k)=0
|
|
89
|
+
! = 2 x(i, 0, k)=0, x(i, m+1, k)=x(i, m-1, k)
|
|
90
|
+
! = 3 x(i, 0, k)=x(i, 2, k) x(i, m+1, k)=x(i, m-1, k)
|
|
91
|
+
! = 4 x(i, 0, k)=x(i, 2, k) x(i, m+1, k)=0
|
|
92
|
+
!
|
|
93
|
+
! m
|
|
94
|
+
! the number of unknowns in the j-direction.
|
|
95
|
+
! m must be at least 3.
|
|
96
|
+
!
|
|
97
|
+
! c2
|
|
98
|
+
! real constant in the above linear system
|
|
99
|
+
! of equations to be solved.
|
|
100
|
+
!
|
|
101
|
+
! nperod
|
|
102
|
+
! = 0 if a(1) and c(n) are not zero.
|
|
103
|
+
! = 1 if a(1) = c(n) = 0.
|
|
104
|
+
!
|
|
105
|
+
! n
|
|
106
|
+
! the number of unknowns in the k-direction.
|
|
107
|
+
! n must be at least 3.
|
|
108
|
+
!
|
|
109
|
+
! a, b, c
|
|
110
|
+
! one-dimensional arrays of length n that
|
|
111
|
+
! specify the coefficients in the linear
|
|
112
|
+
! equations given above.
|
|
113
|
+
!
|
|
114
|
+
! if nperod = 0 the array elements must not
|
|
115
|
+
! depend upon index k, but must be constant.
|
|
116
|
+
! specifically, the subroutine checks the
|
|
117
|
+
! following condition
|
|
118
|
+
! a(k) = c(1)
|
|
119
|
+
! c(k) = c(1)
|
|
120
|
+
! b(k) = b(1)
|
|
121
|
+
! for k=1, 2, ..., n.
|
|
122
|
+
!
|
|
123
|
+
! ldimf
|
|
124
|
+
! The row (or first) dimension of the three-
|
|
125
|
+
! dimensional array f as it appears in the
|
|
126
|
+
! program calling pois3d. this parameter is
|
|
127
|
+
! used to specify the variable dimension
|
|
128
|
+
! of f. ldimf must be at least l.
|
|
129
|
+
!
|
|
130
|
+
! mdimf
|
|
131
|
+
! The column (or second) dimension of the three
|
|
132
|
+
! dimensional array f as it appears in the
|
|
133
|
+
! program calling pois3d. this parameter is
|
|
134
|
+
! used to specify the variable dimension
|
|
135
|
+
! of f. mdimf must be at least m.
|
|
136
|
+
!
|
|
137
|
+
! f
|
|
138
|
+
! A three-dimensional array that specifies the
|
|
139
|
+
! values of the right side of the linear system
|
|
140
|
+
! of equations given above. f must be
|
|
141
|
+
! dimensioned at least l x m x n.
|
|
142
|
+
!
|
|
143
|
+
! ON OUTPUT
|
|
144
|
+
!
|
|
145
|
+
! f
|
|
146
|
+
! Contains the solution x.
|
|
147
|
+
!
|
|
148
|
+
! ierror
|
|
149
|
+
! An error flag that indicates invalid input
|
|
150
|
+
! parameters. except for number zero, a
|
|
151
|
+
! solution is not attempted.
|
|
152
|
+
! = 0 no error
|
|
153
|
+
! = 1 if lperod < 0 or > 4
|
|
154
|
+
! = 2 if l < 3
|
|
155
|
+
! = 3 if mperod < 0 or > 4
|
|
156
|
+
! = 4 if m < 3
|
|
157
|
+
! = 5 if nperod < 0 or > 1
|
|
158
|
+
! = 6 if n < 3
|
|
159
|
+
! = 7 if ldimf < l
|
|
160
|
+
! = 8 if mdimf < m
|
|
161
|
+
! = 9 if a(k) /= c(1) or c(k) /= c(1)
|
|
162
|
+
! or b(i) /=b(1) for some k=1, 2, ..., n.
|
|
163
|
+
! = 10 if nperod = 1 and a(1) /= 0
|
|
164
|
+
! or c(n) /= 0
|
|
165
|
+
! = 20 If the dynamic allocation of real and
|
|
166
|
+
! complex workspace required for solution
|
|
167
|
+
! fails (for example if n, m are too large
|
|
168
|
+
! for your computer)
|
|
169
|
+
!
|
|
170
|
+
! Since this is the only means of indicating a
|
|
171
|
+
! possibly incorrect call to pois3d, the user
|
|
172
|
+
! should test ierror after the call.
|
|
173
|
+
!
|
|
174
|
+
! HISTORY * Written by Roland Sweet at NCAR in the late
|
|
175
|
+
! 1970's. released on NCAR's public software
|
|
176
|
+
! libraries in January, 1980.
|
|
177
|
+
! * Revised in June 2004 by John Adams using
|
|
178
|
+
! Fortran 90 dynamically allocated workspace.
|
|
179
|
+
!
|
|
180
|
+
! ALGORITHM This subroutine solves three-dimensional block
|
|
181
|
+
! tridiagonal linear systems arising from finite
|
|
182
|
+
! difference approximations to three-dimensional
|
|
183
|
+
! poisson equations using the FFT package
|
|
184
|
+
! fftpack written by Paul Swarztrauber.
|
|
185
|
+
!
|
|
186
|
+
! TIMING For large l, m and n, the operation count
|
|
187
|
+
! is roughly proportional to
|
|
188
|
+
! l*m*n*(log2(l)+log2(m)+5)
|
|
189
|
+
! but also depends on input parameters lperod
|
|
190
|
+
! and mperod.
|
|
191
|
+
!
|
|
192
|
+
! ACCURACY To measure the accuracy of the algorithm a
|
|
193
|
+
! uniform random number generator was used to
|
|
194
|
+
! create a solution array x for the system given
|
|
195
|
+
! in the 'purpose' section with
|
|
196
|
+
! a(k) = c(k) = -HALF *b(k) = 1, k=1, 2, ..., n
|
|
197
|
+
! and, when nperod = 1
|
|
198
|
+
! a(1) = c(n) = 0
|
|
199
|
+
! a(n) = c(1) = 2.
|
|
200
|
+
!
|
|
201
|
+
! The solution x was substituted into the given
|
|
202
|
+
! system and, using double precision, a right
|
|
203
|
+
! side y was computed. using this array y
|
|
204
|
+
! subroutine pois3d was called to produce an
|
|
205
|
+
! approximate solution z. Relative error
|
|
206
|
+
!
|
|
207
|
+
! = max(abs(z(i, j, k)-x(i, j, k)))/max(abs(x(i, j, k
|
|
208
|
+
!
|
|
209
|
+
! was computed, where the two maxima are taken
|
|
210
|
+
! over i=1, 2, ..., l, j=1, 2, ..., m and k=1, 2, ..., n.
|
|
211
|
+
! values of e are given in the table below for
|
|
212
|
+
! some typical values of l, m and n.
|
|
213
|
+
!
|
|
214
|
+
! l(=m=n) lperod mperod e
|
|
215
|
+
! ------ ------ ------ ------
|
|
216
|
+
!
|
|
217
|
+
! 16 0 0 1.e-13
|
|
218
|
+
! 15 1 1 4.e-13
|
|
219
|
+
! 17 3 3 2.e-13
|
|
220
|
+
! 32 0 0 2.e-13
|
|
221
|
+
! 31 1 1 2.e-12
|
|
222
|
+
! 33 3 3 7.e-13
|
|
223
|
+
!
|
|
224
|
+
module subroutine pois3d(lperod, l, c1, mperod, m, c2, nperod, n, a, b, c, &
|
|
225
|
+
ldimf, mdimf, f, ierror)
|
|
226
|
+
|
|
227
|
+
! Dummy arguments
|
|
228
|
+
integer(ip), intent(in) :: lperod
|
|
229
|
+
integer(ip), intent(in) :: l
|
|
230
|
+
integer(ip), intent(in) :: mperod
|
|
231
|
+
integer(ip), intent(in) :: m
|
|
232
|
+
integer(ip), intent(in) :: nperod
|
|
233
|
+
integer(ip), intent(in) :: n
|
|
234
|
+
integer(ip), intent(in) :: ldimf
|
|
235
|
+
integer(ip), intent(in) :: mdimf
|
|
236
|
+
integer(ip), intent(out) :: ierror
|
|
237
|
+
real(wp), intent(in) :: c1
|
|
238
|
+
real(wp), intent(in) :: c2
|
|
239
|
+
real(wp), intent(inout) :: a(:)
|
|
240
|
+
real(wp), intent(inout) :: b(:)
|
|
241
|
+
real(wp), intent(inout) :: c(:)
|
|
242
|
+
real(wp), intent(inout) :: f(:,:,:)
|
|
243
|
+
|
|
244
|
+
! Local variables
|
|
245
|
+
type(FishpackWorkspace) :: workspace
|
|
246
|
+
type(SolverUtility3D) :: util3d
|
|
247
|
+
|
|
248
|
+
! Check input arguments
|
|
249
|
+
call util3d%check_input_arguments(lperod, l, mperod, m, nperod, n, &
|
|
250
|
+
a, b, c, ldimf, mdimf, ierror)
|
|
251
|
+
|
|
252
|
+
! Check error flag
|
|
253
|
+
if (ierror /= 0) return
|
|
254
|
+
|
|
255
|
+
! Allocate memory
|
|
256
|
+
call initialize_workspace(n, m, l, workspace)
|
|
257
|
+
|
|
258
|
+
! Solve system
|
|
259
|
+
associate( &
|
|
260
|
+
rew => workspace%real_workspace, &
|
|
261
|
+
indx => workspace%workspace_indices &
|
|
262
|
+
)
|
|
263
|
+
call util3d%pois3dd(lperod, l, c1, mperod, m, c2, nperod, n, &
|
|
264
|
+
a, b, c, ldimf, mdimf, f, ierror, rew, indx)
|
|
265
|
+
end associate
|
|
266
|
+
|
|
267
|
+
! Release memory
|
|
268
|
+
call workspace%destroy()
|
|
269
|
+
|
|
270
|
+
end subroutine pois3d
|
|
271
|
+
|
|
272
|
+
subroutine initialize_workspace(n, m, l, workspace)
|
|
273
|
+
|
|
274
|
+
! Dummy arguments
|
|
275
|
+
integer(ip), intent(in) :: n
|
|
276
|
+
integer(ip), intent(in) :: m
|
|
277
|
+
integer(ip), intent(in) :: l
|
|
278
|
+
class(FishpackWorkspace), intent(out) :: workspace
|
|
279
|
+
|
|
280
|
+
! Local variables
|
|
281
|
+
integer(ip) :: irwk, icwk
|
|
282
|
+
type(SolverUtility3D) :: aux
|
|
283
|
+
|
|
284
|
+
! Adjust workspace for pois3d
|
|
285
|
+
irwk = 30 + l + m + (2 * n) + max(l, m, n) + 7 * ( (l + 1)/2 + (m + 1)/2)
|
|
286
|
+
icwk = 0
|
|
287
|
+
|
|
288
|
+
! Allocate memory
|
|
289
|
+
call workspace%create(irwk, icwk, aux%IIWK)
|
|
290
|
+
|
|
291
|
+
! Set workspace indices
|
|
292
|
+
workspace%workspace_indices = aux%get_workspace_indices(l, m, n)
|
|
293
|
+
|
|
294
|
+
end subroutine initialize_workspace
|
|
295
|
+
|
|
296
|
+
end submodule general_linear_systems_solver_3d
|