mathlib-fishpack.c
1 //! @file mathlib-fishpack.c
2 //
3 //! @section copyright
4 //
5 // This file is part of VIF - vintage fortran compiler.
6 // Copyright 2020-2025 J. Marcel van der Veer <algol68g@xs4all.nl>.
7 //
8 //! @section license
9 //
10 // This program is free software; you can redistribute it and/or modify it
11 // under the terms of the gnu general public license as published by the
12 // free software foundation; either version 3 of the license, or
13 // (at your option) any later version.
14 //
15 // This program is distributed in the hope that it will be useful, but
16 // without any warranty; without even the implied warranty of merchantability
17 // or fitness for a particular purpose. See the GNU general public license for
18 // more details. you should have received a copy of the GNU general public
19 // license along with this program. If not, see <http://www.gnu.org/licenses/>.
20 //
21 //! @Synopsis
22 //
23 //! 19 subprograms from FISHPACK
24
25 // Compiled from Fortran source code by VIF.
26 // Selected subprograms are:
27 //
28 // BLKTRI CMGNBN HSTCRT HSTCYL HSTSSP HWSCRT HWSCYL HWSSSP POISTG SEPX4
29 // CBLKTR GENBUN HSTCSP HSTPLR HW3CRT HWSCSP HWSPLR POIS3D SEPELI
30
31 // FISHPACK routines from SLATEC.
32 //
33 // Source: netlib.org/slatec/
34
35 // The license for FISHPACK Fortran source code is:
36 //
37 // The SLATEC Common Mathematical Library was developed at
38 // US government research laboratories and is in the public domain.
39 //
40 // Repository: http://www.netlib.org/slatec/
41 //
42 // The SLATEC common mathematical library is issued by the following
43 //
44 // Air Force Weapons Laboratory, Albuquerque
45 // Lawrence Livermore National Laboratory, Livermore
46 // Los Alamos National Laboratory, Los Alamos
47 // National Institute of Standards and Technology, Washington
48 // National Energy Research Supercomputer Center, Livermore
49 // Oak Ridge National Laboratory, Oak Ridge
50 // Sandia National Laboratories, Albuquerque
51 // Sandia National Laboratories, Livermore
52 //
53 // All questions concerning the distribution of the library should be
54 // directed to the NATIONAL ENERGY SOFTWARE CENTER, 9700 Cass Ave.,
55 // Argonne, Illinois 60439, and not to the authors of the subprograms.
56 //
57 // * * * * * Notice * * * * *
58 //
59 // This material was prepared as an account of work sponsored by the
60 // United States Government. Neither the United States, nor the
61 // Department of Energy, nor the Department of Defense, nor any of
62 // their employees, nor any of their contractors, subcontractors, or
63 // their employees, makes any warranty, expressed or implied, or
64 // assumes any legal liability or responsibility for the accuracy,
65 // completeness, or usefulness of any information, apparatus, product,
66 // or process disclosed, or represents that its use would not infringe
67 // upon privately owned rights.
68
69 /*
70 Generated by VIF - experimental VIntage Fortran compiler.
71 VIF release 1.2.17
72 */
73 #if defined (__GNUC__)
74 #pragma GCC diagnostic ignored "-Wimplicit-function-declaration"
75 #pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
76 #if (__GNUC__ >= 14)
77 #pragma GCC diagnostic ignored "-Wdeclaration-missing-parameter-type"
78 #pragma GCC diagnostic ignored "-Wimplicit-int"
79 #pragma GCC diagnostic ignored "-Wint-conversion"
80 #pragma GCC diagnostic ignored "-Wreturn-mismatch"
81 #endif
82 #else
83 #error VIF requires GCC
84 #endif
89 static CALLS __calls[__ncalls] = {
90 {"blktri", 0}, // subroutine
91 {"cblktr", 0}, // subroutine
92 {"cmgnbn", 0}, // subroutine
93 {"genbun", 0}, // subroutine
94 {"hstcrt", 0}, // subroutine
95 {"hstcsp", 0}, // subroutine
96 {"hstcyl", 0}, // subroutine
97 {"hstplr", 0}, // subroutine
98 {"hstssp", 0}, // subroutine
99 {"hw3crt", 0}, // subroutine
100 {"hwscrt", 0}, // subroutine
101 {"hwscsp", 0}, // subroutine
102 {"hwscyl", 0}, // subroutine
103 {"hwsplr", 0}, // subroutine
104 {"hwsssp", 0}, // subroutine
105 {"pois3d", 0}, // subroutine
106 {"poistg", 0}, // subroutine
107 {"sepeli", 0}, // subroutine
108 {"sepx4", 0}, // subroutine
109 {NULL, 0}
110 };
111
112 static struct {
113 int_4 npp_, k_, nm_, ncmplx_, ik_;
114 real_4 eps_, cnv_;
115 } cblkt_;
116 static struct {
117 int_4 npp_, k_, nm_, ncmplx_, ik_;
118 real_4 eps_, cnv_;
119 } ccblk_;
121 int_4 _p_ mp_, int_4 _p_ m_, real_4 _p_ am_, real_4 _p_ bm_, real_4 _p_ cm_, int_4 _p_ idimy_, real_4 _p_ y_, int_4 _p_
122 ierror_, real_4 _p_ w_);
124 int_4 _p_ mp_, int_4 _p_ m_, complex_8 _p_ am_, complex_8 _p_ bm_, complex_8 _p_ cm_, int_4 _p_ idimy_, complex_8 _p_
125 y_, int_4 _p_ ierror_, real_4 _p_ w_);
127 _p_ b_, complex_8 _p_ c_, int_4 _p_ idimy_, complex_8 _p_ y_, int_4 _p_ ierror_, complex_8 _p_ w_);
129 , real_4 _p_ c_, int_4 _p_ idimy_, real_4 _p_ y_, int_4 _p_ ierror_, real_4 _p_ w_);
131 bdb_, real_4 _p_ c_, real_4 _p_ d_, int_4 _p_ n_, int_4 _p_ nbdcnd_, real_4 _p_ bdc_, real_4 _p_ bdd_, real_4 _p_
132 elmbda_, real_4 _p_ f_, int_4 _p_ idimf_, real_4 _p_ pertrb_, int_4 _p_ ierror_, real_4 _p_ w_);
134 bda_, real_4 _p_ bdb_, real_4 _p_ c_, real_4 _p_ d_, int_4 _p_ n_, int_4 _p_ nbdcnd_, real_4 _p_ bdc_, real_4 _p_ bdd_,
135 real_4 _p_ elmbda_, real_4 _p_ f_, int_4 _p_ idimf_, real_4 _p_ pertrb_, int_4 _p_ ierror_, real_4 _p_ w_);
137 bdb_, real_4 _p_ c_, real_4 _p_ d_, int_4 _p_ n_, int_4 _p_ nbdcnd_, real_4 _p_ bdc_, real_4 _p_ bdd_, real_4 _p_
138 elmbda_, real_4 _p_ f_, int_4 _p_ idimf_, real_4 _p_ pertrb_, int_4 _p_ ierror_, real_4 _p_ w_);
140 bdb_, real_4 _p_ c_, real_4 _p_ d_, int_4 _p_ n_, int_4 _p_ nbdcnd_, real_4 _p_ bdc_, real_4 _p_ bdd_, real_4 _p_
141 elmbda_, real_4 _p_ f_, int_4 _p_ idimf_, real_4 _p_ pertrb_, int_4 _p_ ierror_, real_4 _p_ w_);
143 bdb_, real_4 _p_ c_, real_4 _p_ d_, int_4 _p_ n_, int_4 _p_ nbdcnd_, real_4 _p_ bdc_, real_4 _p_ bdd_, real_4 _p_
144 elmbda_, real_4 _p_ f_, int_4 _p_ idimf_, real_4 _p_ pertrb_, int_4 _p_ ierror_, real_4 _p_ w_);
146 bdxf_, real_4 _p_ ys_, real_4 _p_ yf_, int_4 _p_ m_, int_4 _p_ mbdcnd_, real_4 _p_ bdys_, real_4 _p_ bdyf_, real_4 _p_
147 zs_, real_4 _p_ zf_, int_4 _p_ n_, int_4 _p_ nbdcnd_, real_4 _p_ bdzs_, real_4 _p_ bdzf_, real_4 _p_ elmbda_, int_4 _p_
148 ldimf_, int_4 _p_ mdimf_, real_4 _p_ f_, real_4 _p_ pertrb_, int_4 _p_ ierror_, real_4 _p_ w_);
150 bdb_, real_4 _p_ c_, real_4 _p_ d_, int_4 _p_ n_, int_4 _p_ nbdcnd_, real_4 _p_ bdc_, real_4 _p_ bdd_, real_4 _p_
151 elmbda_, real_4 _p_ f_, int_4 _p_ idimf_, real_4 _p_ pertrb_, int_4 _p_ ierror_, real_4 _p_ w_);
153 bdts_, real_4 _p_ bdtf_, real_4 _p_ rs_, real_4 _p_ rf_, int_4 _p_ n_, int_4 _p_ nbdcnd_, real_4 _p_ bdrs_, real_4 _p_
154 bdrf_, real_4 _p_ elmbda_, real_4 _p_ f_, int_4 _p_ idimf_, real_4 _p_ pertrb_, int_4 _p_ ierror_, real_4 _p_ w_);
156 bdb_, real_4 _p_ c_, real_4 _p_ d_, int_4 _p_ n_, int_4 _p_ nbdcnd_, real_4 _p_ bdc_, real_4 _p_ bdd_, real_4 _p_
157 elmbda_, real_4 _p_ f_, int_4 _p_ idimf_, real_4 _p_ pertrb_, int_4 _p_ ierror_, real_4 _p_ w_);
159 bdb_, real_4 _p_ c_, real_4 _p_ d_, int_4 _p_ n_, int_4 _p_ nbdcnd_, real_4 _p_ bdc_, real_4 _p_ bdd_, real_4 _p_
160 elmbda_, real_4 _p_ f_, int_4 _p_ idimf_, real_4 _p_ pertrb_, int_4 _p_ ierror_, real_4 _p_ w_);
162 bdtf_, real_4 _p_ ps_, real_4 _p_ pf_, int_4 _p_ n_, int_4 _p_ nbdcnd_, real_4 _p_ bdps_, real_4 _p_ bdpf_, real_4 _p_
163 elmbda_, real_4 _p_ f_, int_4 _p_ idimf_, real_4 _p_ pertrb_, int_4 _p_ ierror_, real_4 _p_ w_);
165 c2_, int_4 _p_ nperod_, int_4 _p_ n_, real_4 _p_ a_, real_4 _p_ b_, real_4 _p_ c_, int_4 _p_ ldimf_, int_4 _p_ mdimf_,
166 real_4 _p_ f_, int_4 _p_ ierror_, real_4 _p_ w_);
168 , real_4 _p_ c_, int_4 _p_ idimy_, real_4 _p_ y_, int_4 _p_ ierror_, real_4 _p_ w_);
170 mbdcnd_, real_4 _p_ bda_, real_4 _p_ alpha_, real_4 _p_ bdb_, real_4 _p_ beta_, real_4 _p_ c_, real_4 _p_ d_, int_4 _p_
171 n_, int_4 _p_ nbdcnd_, real_4 _p_ bdc_, real_4 _p_ gama_, real_4 _p_ bdd_, real_4 _p_ xnu_, real_4 (*_cofx)(), real_4
172 (*_cofy)(), real_4 _p_ grhs_, real_4 _p_ usol_, int_4 _p_ idmn_, real_4 _p_ w_, real_4 _p_ pertrb_, int_4 _p_ ierror_);
174 bda_, real_4 _p_ alpha_, real_4 _p_ bdb_, real_4 _p_ beta_, real_4 _p_ c_, real_4 _p_ d_, int_4 _p_ n_, int_4 _p_
175 nbdcnd_, real_4 _p_ bdc_, real_4 _p_ bdd_, real_4 (*_cofx)(), real_4 _p_ grhs_, real_4 _p_ usol_, int_4 _p_ idmn_,
176 real_4 _p_ w_, real_4 _p_ pertrb_, int_4 _p_ ierror_);
177 int_4 _blktri (int_4 _p_ iflg_, int_4 _p_ np_, int_4 _p_ n_, real_4 _p_ an_, real_4 _p_ bn_, real_4 _p_ cn_, int_4 _p_
178 mp_, int_4 _p_ m_, real_4 _p_ am_, real_4 _p_ bm_, real_4 _p_ cm_, int_4 _p_ idimy_, real_4 _p_ y_, int_4 _p_ ierror_,
179 real_4 _p_ w_)
180 { // ** body not listed **
319 }
320
321 int_4 _cblktr (int_4 _p_ iflg_, int_4 _p_ np_, int_4 _p_ n_, real_4 _p_ an_, real_4 _p_ bn_, real_4 _p_ cn_, int_4 _p_
322 mp_, int_4 _p_ m_, complex_8 _p_ am_, complex_8 _p_ bm_, complex_8 _p_ cm_, int_4 _p_ idimy_, complex_8 _p_ y_, int_4
323 _p_ ierror_, real_4 _p_ w_)
324 { // ** body not listed **
464 }
465
466 int_4 _cmgnbn (int_4 _p_ nperod_, int_4 _p_ n_, int_4 _p_ mperod_, int_4 _p_ m_, complex_8 _p_ a_, complex_8 _p_ b_,
467 complex_8 _p_ c_, int_4 _p_ idimy_, complex_8 _p_ y_, int_4 _p_ ierror_, complex_8 _p_ w_)
468 { // ** body not listed **
670 }
671
672 int_4 _genbun (int_4 _p_ nperod_, int_4 _p_ n_, int_4 _p_ mperod_, int_4 _p_ m_, real_4 _p_ a_, real_4 _p_ b_, real_4
673 _p_ c_, int_4 _p_ idimy_, real_4 _p_ y_, int_4 _p_ ierror_, real_4 _p_ w_)
674 { // ** body not listed **
877 }
878
879 int_4 _hstcrt (real_4 _p_ a_, real_4 _p_ b_, int_4 _p_ m_, int_4 _p_ mbdcnd_, real_4 _p_ bda_, real_4 _p_ bdb_, real_4
880 _p_ c_, real_4 _p_ d_, int_4 _p_ n_, int_4 _p_ nbdcnd_, real_4 _p_ bdc_, real_4 _p_ bdd_, real_4 _p_ elmbda_, real_4
881 _p_ f_, int_4 _p_ idimf_, real_4 _p_ pertrb_, int_4 _p_ ierror_, real_4 _p_ w_)
882 { // ** body not listed **
1083 }
1084
1085 int_4 _hstcsp (int_4 _p_ intl_, real_4 _p_ a_, real_4 _p_ b_, int_4 _p_ m_, int_4 _p_ mbdcnd_, real_4 _p_ bda_, real_4
1086 _p_ bdb_, real_4 _p_ c_, real_4 _p_ d_, int_4 _p_ n_, int_4 _p_ nbdcnd_, real_4 _p_ bdc_, real_4 _p_ bdd_, real_4 _p_
1087 elmbda_, real_4 _p_ f_, int_4 _p_ idimf_, real_4 _p_ pertrb_, int_4 _p_ ierror_, real_4 _p_ w_)
1088 { // ** body not listed **
1163 }
1164
1165 int_4 _hstcyl (real_4 _p_ a_, real_4 _p_ b_, int_4 _p_ m_, int_4 _p_ mbdcnd_, real_4 _p_ bda_, real_4 _p_ bdb_, real_4
1166 _p_ c_, real_4 _p_ d_, int_4 _p_ n_, int_4 _p_ nbdcnd_, real_4 _p_ bdc_, real_4 _p_ bdd_, real_4 _p_ elmbda_, real_4
1167 _p_ f_, int_4 _p_ idimf_, real_4 _p_ pertrb_, int_4 _p_ ierror_, real_4 _p_ w_)
1168 { // ** body not listed **
1384 }
1385
1386 int_4 _hstplr (real_4 _p_ a_, real_4 _p_ b_, int_4 _p_ m_, int_4 _p_ mbdcnd_, real_4 _p_ bda_, real_4 _p_ bdb_, real_4
1387 _p_ c_, real_4 _p_ d_, int_4 _p_ n_, int_4 _p_ nbdcnd_, real_4 _p_ bdc_, real_4 _p_ bdd_, real_4 _p_ elmbda_, real_4
1388 _p_ f_, int_4 _p_ idimf_, real_4 _p_ pertrb_, int_4 _p_ ierror_, real_4 _p_ w_)
1389 { // ** body not listed **
1646 }
1647
1648 int_4 _hstssp (real_4 _p_ a_, real_4 _p_ b_, int_4 _p_ m_, int_4 _p_ mbdcnd_, real_4 _p_ bda_, real_4 _p_ bdb_, real_4
1649 _p_ c_, real_4 _p_ d_, int_4 _p_ n_, int_4 _p_ nbdcnd_, real_4 _p_ bdc_, real_4 _p_ bdd_, real_4 _p_ elmbda_, real_4
1650 _p_ f_, int_4 _p_ idimf_, real_4 _p_ pertrb_, int_4 _p_ ierror_, real_4 _p_ w_)
1651 { // ** body not listed **
1984 }
1985
1986 int_4 _hw3crt (real_4 _p_ xs_, real_4 _p_ xf_, int_4 _p_ l_, int_4 _p_ lbdcnd_, real_4 _p_ bdxs_, real_4 _p_ bdxf_,
1987 real_4 _p_ ys_, real_4 _p_ yf_, int_4 _p_ m_, int_4 _p_ mbdcnd_, real_4 _p_ bdys_, real_4 _p_ bdyf_, real_4 _p_ zs_,
1988 real_4 _p_ zf_, int_4 _p_ n_, int_4 _p_ nbdcnd_, real_4 _p_ bdzs_, real_4 _p_ bdzf_, real_4 _p_ elmbda_, int_4 _p_
1989 ldimf_, int_4 _p_ mdimf_, real_4 _p_ f_, real_4 _p_ pertrb_, int_4 _p_ ierror_, real_4 _p_ w_)
1990 { // ** body not listed **
2448 }
2449
2450 int_4 _hwscrt (real_4 _p_ a_, real_4 _p_ b_, int_4 _p_ m_, int_4 _p_ mbdcnd_, real_4 _p_ bda_, real_4 _p_ bdb_, real_4
2451 _p_ c_, real_4 _p_ d_, int_4 _p_ n_, int_4 _p_ nbdcnd_, real_4 _p_ bdc_, real_4 _p_ bdd_, real_4 _p_ elmbda_, real_4
2452 _p_ f_, int_4 _p_ idimf_, real_4 _p_ pertrb_, int_4 _p_ ierror_, real_4 _p_ w_)
2453 { // ** body not listed **
2718 }
2719
2720 int_4 _hwscsp (int_4 _p_ intl_, real_4 _p_ ts_, real_4 _p_ tf_, int_4 _p_ m_, int_4 _p_ mbdcnd_, real_4 _p_ bdts_,
2721 real_4 _p_ bdtf_, real_4 _p_ rs_, real_4 _p_ rf_, int_4 _p_ n_, int_4 _p_ nbdcnd_, real_4 _p_ bdrs_, real_4 _p_ bdrf_,
2722 real_4 _p_ elmbda_, real_4 _p_ f_, int_4 _p_ idimf_, real_4 _p_ pertrb_, int_4 _p_ ierror_, real_4 _p_ w_)
2723 { // ** body not listed **
2837 }
2838
2839 int_4 _hwscyl (real_4 _p_ a_, real_4 _p_ b_, int_4 _p_ m_, int_4 _p_ mbdcnd_, real_4 _p_ bda_, real_4 _p_ bdb_, real_4
2840 _p_ c_, real_4 _p_ d_, int_4 _p_ n_, int_4 _p_ nbdcnd_, real_4 _p_ bdc_, real_4 _p_ bdd_, real_4 _p_ elmbda_, real_4
2841 _p_ f_, int_4 _p_ idimf_, real_4 _p_ pertrb_, int_4 _p_ ierror_, real_4 _p_ w_)
2842 { // ** body not listed **
3158 }
3159
3160 int_4 _hwsplr (real_4 _p_ a_, real_4 _p_ b_, int_4 _p_ m_, int_4 _p_ mbdcnd_, real_4 _p_ bda_, real_4 _p_ bdb_, real_4
3161 _p_ c_, real_4 _p_ d_, int_4 _p_ n_, int_4 _p_ nbdcnd_, real_4 _p_ bdc_, real_4 _p_ bdd_, real_4 _p_ elmbda_, real_4
3162 _p_ f_, int_4 _p_ idimf_, real_4 _p_ pertrb_, int_4 _p_ ierror_, real_4 _p_ w_)
3163 { // ** body not listed **
3535 }
3536
3537 int_4 _hwsssp (real_4 _p_ ts_, real_4 _p_ tf_, int_4 _p_ m_, int_4 _p_ mbdcnd_, real_4 _p_ bdts_, real_4 _p_ bdtf_,
3538 real_4 _p_ ps_, real_4 _p_ pf_, int_4 _p_ n_, int_4 _p_ nbdcnd_, real_4 _p_ bdps_, real_4 _p_ bdpf_, real_4 _p_ elmbda_
3539 , real_4 _p_ f_, int_4 _p_ idimf_, real_4 _p_ pertrb_, int_4 _p_ ierror_, real_4 _p_ w_)
3540 { // ** body not listed **
3601 }
3602
3603 int_4 _pois3d (int_4 _p_ lperod_, int_4 _p_ l_, real_4 _p_ c1_, int_4 _p_ mperod_, int_4 _p_ m_, real_4 _p_ c2_, int_4
3604 _p_ nperod_, int_4 _p_ n_, real_4 _p_ a_, real_4 _p_ b_, real_4 _p_ c_, int_4 _p_ ldimf_, int_4 _p_ mdimf_, real_4 _p_
3605 f_, int_4 _p_ ierror_, real_4 _p_ w_)
3606 { // ** body not listed **
3767 }
3768
3769 int_4 _poistg (int_4 _p_ nperod_, int_4 _p_ n_, int_4 _p_ mperod_, int_4 _p_ m_, real_4 _p_ a_, real_4 _p_ b_, real_4
3770 _p_ c_, int_4 _p_ idimy_, real_4 _p_ y_, int_4 _p_ ierror_, real_4 _p_ w_)
3771 { // ** body not listed **
3958 }
3959
3960 int_4 _sepeli (int_4 _p_ intl_, int_4 _p_ iorder_, real_4 _p_ a_, real_4 _p_ b_, int_4 _p_ m_, int_4 _p_ mbdcnd_,
3961 real_4 _p_ bda_, real_4 _p_ alpha_, real_4 _p_ bdb_, real_4 _p_ beta_, real_4 _p_ c_, real_4 _p_ d_, int_4 _p_ n_,
3962 int_4 _p_ nbdcnd_, real_4 _p_ bdc_, real_4 _p_ gama_, real_4 _p_ bdd_, real_4 _p_ xnu_, real_4 (*_cofx)(), real_4
3963 (*_cofy)(), real_4 _p_ grhs_, real_4 _p_ usol_, int_4 _p_ idmn_, real_4 _p_ w_, real_4 _p_ pertrb_, int_4 _p_ ierror_)
3964 { // ** body not listed **
4012 }
4013
4014 int_4 _sepx4 (int_4 _p_ iorder_, real_4 _p_ a_, real_4 _p_ b_, int_4 _p_ m_, int_4 _p_ mbdcnd_, real_4 _p_ bda_, real_4
4015 _p_ alpha_, real_4 _p_ bdb_, real_4 _p_ beta_, real_4 _p_ c_, real_4 _p_ d_, int_4 _p_ n_, int_4 _p_ nbdcnd_, real_4
4016 _p_ bdc_, real_4 _p_ bdd_, real_4 (*_cofx)(), real_4 _p_ grhs_, real_4 _p_ usol_, int_4 _p_ idmn_, real_4 _p_ w_,
4017 real_4 _p_ pertrb_, int_4 _p_ ierror_)
4018 { // ** body not listed **
4061 }
4062
© 2002-2025 J.M. van der Veer (jmvdveer@xs4all.nl)
|