SAF
Loading...
Searching...
No Matches
saf_utility_bessel.h
Go to the documentation of this file.
1/*
2 * Copyright 2020 Leo McCormack
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10 * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14 * PERFORMANCE OF THIS SOFTWARE.
15 */
16
29#ifndef SAF_BESSEL_H_INCLUDED
30#define SAF_BESSEL_H_INCLUDED
31
32#ifdef __cplusplus
33extern "C" {
34#endif /* __cplusplus */
35
36#include "saf_utility_complex.h"
37
38/* ========================================================================== */
39/* Cylindrical Bessel Functions */
40/* ========================================================================== */
41
55void bessel_Jn(/* Input arguments */
56 int N,
57 double* z,
58 int nZ,
59 /* Output arguments */
60 double* J_n,
61 double* dJ_n);
62
75void bessel_Jn_ALL(/* Input arguments */
76 int N,
77 double* z,
78 int nZ,
79 /* Output arguments */
80 double* J_n,
81 double* dJ_n);
82
96void bessel_Yn(/* Input arguments */
97 int N,
98 double* z,
99 int nZ,
100 /* Output arguments */
101 double* Y_n,
102 double* dY_n);
103
116void bessel_Yn_ALL(/* Input arguments */
117 int N,
118 double* z,
119 int nZ,
120 /* Output arguments */
121 double* Y_n,
122 double* dY_n);
123
135void hankel_Hn1(/* Input arguments */
136 int N,
137 double* z,
138 int nZ,
139 /* Output arguments */
140 double_complex* Hn1_n,
141 double_complex* dHn1_n);
142
155void hankel_Hn1_ALL(/* Input arguments */
156 int N,
157 double* z,
158 int nZ,
159 /* Output arguments */
160 double_complex* Hn1_n,
161 double_complex* dHn1_n);
162
174void hankel_Hn2(/* Input arguments */
175 int N,
176 double* z,
177 int nZ,
178 /* Output arguments */
179 double_complex* Hn2_n,
180 double_complex* dHn2_n);
181
194void hankel_Hn2_ALL(/* Input arguments */
195 int N,
196 double* z,
197 int nZ,
198 /* Output arguments */
199 double_complex* Hn2_n,
200 double_complex* dHn2_n);
201
202
203/* ========================================================================== */
204/* Spherical Bessel Functions */
205/* ========================================================================== */
206
224int bessel_jn(/* Input arguments */
225 int N,
226 double* z,
227 int nZ,
228 /* Output arguments */
229 double* j_n,
230 double* dj_n);
231
250void bessel_jn_ALL(/* Input arguments */
251 int N,
252 double* z,
253 int nZ,
254 /* Output arguments */
255 int* maxN,
256 double* j_n,
257 double* dj_n);
258
276int bessel_in(/* Input arguments */
277 int N,
278 double* z,
279 int nZ,
280 /* Output arguments */
281 double* i_n,
282 double* di_n);
283
302void bessel_in_ALL(/* Input arguments */
303 int N,
304 double* z,
305 int nZ,
306 /* Output arguments */
307 int* maxN,
308 double* i_n,
309 double* di_n);
310
328int bessel_yn(/* Input arguments */
329 int N,
330 double* z,
331 int nZ,
332 /* Output arguments */
333 double* y_n,
334 double* dy_n);
335
354void bessel_yn_ALL(/* Input arguments */
355 int N,
356 double* z,
357 int nZ,
358 /* Output arguments */
359 int* maxN,
360 double* y_n,
361 double* dy_n);
362
380int bessel_kn(/* Input arguments */
381 int N,
382 double* z,
383 int nZ,
384 /* Output arguments */
385 double* k_n,
386 double* dk_n);
387
406void bessel_kn_ALL(/* Input arguments */
407 int N,
408 double* z,
409 int nZ,
410 /* Output arguments */
411 int* maxN,
412 double* k_n,
413 double* dk_n);
414
431int hankel_hn1(/* Input arguments */
432 int N,
433 double* z,
434 int nZ,
435 /* Output arguments */
436 double_complex* h_n1,
437 double_complex* dh_n1);
438
457void hankel_hn1_ALL(/* Input arguments */
458 int N,
459 double* z,
460 int nZ,
461 /* Output arguments */
462 int* maxN,
463 double_complex* h_n1,
464 double_complex* dh_n1);
465
482int hankel_hn2(/* Input arguments */
483 int N,
484 double* z,
485 int nZ,
486 /* Output arguments */
487 double_complex* h_n2,
488 double_complex* dh_n2);
489
508void hankel_hn2_ALL(/* Input arguments */
509 int N,
510 double* z,
511 int nZ,
512 /* Output arguments */
513 int* maxN,
514 double_complex* h_n2,
515 double_complex* dh_n2);
516
517
518#ifdef __cplusplus
519}/* extern "C" */
520#endif /* __cplusplus */
521
522#endif /* SAF_BESSEL_H_INCLUDED */
523
524 /* doxygen addtogroup Utilities */
void bessel_jn_ALL(int N, double *z, int nZ, int *maxN, double *j_n, double *dj_n)
Computes the spherical Bessel function of the first kind (jn) and their derivatives (djn) for ALL ord...
void bessel_Yn_ALL(int N, double *z, int nZ, double *Y_n, double *dY_n)
Computes the (cylindrical) Bessel function of the second kind (Yn) and their derivatives (dYn) for AL...
int hankel_hn2(int N, double *z, int nZ, double_complex *h_n2, double_complex *dh_n2)
Computes the values of the spherical Hankel function of the second kind (hn2) and it's derivative (dh...
void hankel_hn2_ALL(int N, double *z, int nZ, int *maxN, double_complex *h_n2, double_complex *dh_n2)
Computes the spherical Hankel function of the second kind (hn2) and their derivatives (dhn2) for ALL ...
void bessel_yn_ALL(int N, double *z, int nZ, int *maxN, double *y_n, double *dy_n)
Computes the spherical Bessel function of the second kind (yn) and their derivatives (dyn) for ALL or...
void hankel_Hn1_ALL(int N, double *z, int nZ, double_complex *Hn1_n, double_complex *dHn1_n)
Computes the (cylindrical) Hankel function of the first kind (Hn1) and their derivatives (dHn1) for A...
void bessel_Jn(int N, double *z, int nZ, double *J_n, double *dJ_n)
Computes the values of the (cylindrical) Bessel function of the first kind (Jn) and it's derivative (...
int hankel_hn1(int N, double *z, int nZ, double_complex *h_n1, double_complex *dh_n1)
Computes the values of the spherical Hankel function of the first kind (hn1) and it's derivative (dhn...
void hankel_hn1_ALL(int N, double *z, int nZ, int *maxN, double_complex *h_n1, double_complex *dh_n1)
Computes the spherical Hankel function of the first kind (hn1) and their derivatives (dhn1) for ALL o...
void bessel_Jn_ALL(int N, double *z, int nZ, double *J_n, double *dJ_n)
Computes the (cylindrical) Bessel function of the first kind (Jn) and their derivatives (dJn) for ALL...
void bessel_in_ALL(int N, double *z, int nZ, int *maxN, double *i_n, double *di_n)
Computes the modified spherical Bessel function of the first kind (in) and their derivatives (din) fo...
void hankel_Hn2(int N, double *z, int nZ, double_complex *Hn2_n, double_complex *dHn2_n)
Computes the values of the (cylindrical) Hankel function of the second kind (Hn2) and it's derivative...
void hankel_Hn2_ALL(int N, double *z, int nZ, double_complex *Hn2_n, double_complex *dHn2_n)
Computes the (cylindrical) Hankel function of the second kind (Hn2) and their derivatives (dHn2) for ...
int bessel_yn(int N, double *z, int nZ, double *y_n, double *dy_n)
Computes the values of the spherical Bessel function of the second kind (yn) and it's derivative (dyn...
void hankel_Hn1(int N, double *z, int nZ, double_complex *Hn1_n, double_complex *dHn1_n)
Computes the values of the (cylindrical) Hankel function of the first kind (Hn1) and it's derivative ...
int bessel_jn(int N, double *z, int nZ, double *j_n, double *dj_n)
Computes the values of the spherical Bessel function of the first kind (jn) and it's derivative (djn)
int bessel_kn(int N, double *z, int nZ, double *k_n, double *dk_n)
Computes the values of the modified spherical Bessel function of the second kind (kn) and it's deriva...
void bessel_Yn(int N, double *z, int nZ, double *Y_n, double *dY_n)
Computes the values of the (cylindrical) Bessel function of the second kind (Yn) and it's derivative ...
void bessel_kn_ALL(int N, double *z, int nZ, int *maxN, double *k_n, double *dk_n)
Computes the modified spherical Bessel function of the second kind (kn) and their derivatives (dkn) f...
int bessel_in(int N, double *z, int nZ, double *i_n, double *di_n)
Computes the values of the modified spherical Bessel function of the first kind (in) and it's derivat...
Contains wrappers for handling complex numbers across both C99-compliant compilers and Microsoft Visu...