LifeV
bessel.hpp
Go to the documentation of this file.
1 /*! Bessel function by CRBond, http://www.crbond.com/
2  Algorithms and coefficient values from
3  "Computation of Special Functions", Zhang and Jin, John
4  Wiley and Sons, 1996.
5 */
6 #include <complex>
7 #include <cmath>
8 #include <cstdlib>
9 
10 #ifndef bessH
11 #define bessH
12 
13 
14 #define eps 1e-15
15 #define el 0.5772156649015329
16 namespace bessel
17 {
18 int msta1 (double x, int mp);
19 int msta2 (double x, int n, int mp);
20 int bessjy01a (double x, double& j0, double& j1, double& y0, double& y1,
21  double& j0p, double& j1p, double& y0p, double& y1p);
22 int bessjy01b (double x, double& j0, double& j1, double& y0, double& y1,
23  double& j0p, double& j1p, double& y0p, double& y1p);
24 int bessjyna (int n, double x, int& nm, double* jn, double* yn,
25  double* jnp, double* ynp);
26 int bessjynb (int n, double x, int& nm, double* jn, double* yn,
27  double* jnp, double* ynp);
28 int bessjyv (double v, double x, double& vm, double* jv, double* yv,
29  double* jvp, double* yvp);
30 int bessik01a (double x, double& i0, double& i1, double& k0, double& k1,
31  double& i0p, double& i1p, double& k0p, double& k1p);
32 int bessik01b (double x, double& i0, double& i1, double& k0, double& k1,
33  double& i0p, double& i1p, double& k0p, double& k1p);
34 int bessikna (int n, double x, int& nm, double* in, double* kn,
35  double* inp, double* knp);
36 int bessiknb (int n, double x, int& nm, double* in, double* kn,
37  double* inp, double* knp);
38 int bessikv (double v, double x, double& vm, double* iv, double* kv,
39  double* ivp, double* kvp);
40 int cbessjy01 (std::complex<double> z, std::complex<double>& cj0, std::complex<double>& cj1,
41  std::complex<double>& cy0, std::complex<double>& cy1, std::complex<double>& cj0p,
42  std::complex<double>& cj1p, std::complex<double>& cy0p, std::complex<double>& cy1p);
43 int cbessjyna (int n, std::complex<double> z, int& nm, std::complex<double>* cj,
44  std::complex<double>* cy, std::complex<double>* cjp, std::complex<double>* cyp);
45 int cbessjynb (int n, std::complex<double> z, int& nm, std::complex<double>* cj,
46  std::complex<double>* cy, std::complex<double>* cjp, std::complex<double>* cyp);
47 int cbessik01 (std::complex<double>z, std::complex<double>& ci0, std::complex<double>& ci1,
48  std::complex<double>& ck0, std::complex<double>& ck1, std::complex<double>& ci0p,
49  std::complex<double>& ci1p, std::complex<double>& ck0p, std::complex<double>& ck1p);
50 int cbessikna (int n, std::complex<double> z, int& nm, std::complex<double>* ci,
51  std::complex<double>* ck, std::complex<double>* cip, std::complex<double>* ckp);
52 int cbessiknb (int n, std::complex<double> z, int& nm, std::complex<double>* ci,
53  std::complex<double>* ck, std::complex<double>* cip, std::complex<double>* ckp);
54 int cbessjyva (double v, std::complex<double> z, double& vm, std::complex<double>* cjv,
55  std::complex<double>* cyv, std::complex<double>* cjvp, std::complex<double>* cyvp);
56 int cbessikv (double v, std::complex<double>z, double& vm, std::complex<double>* civ,
57  std::complex<double>* ckv, std::complex<double>* civp, std::complex<double>* ckvp);
58 }
59 #endif
int msta1(double x, int mp)
Definition: bessjy.cpp:312
int cbessikna(int n, std::complex< double > z, int &nm, std::complex< double > *ci, std::complex< double > *ck, std::complex< double > *cip, std::complex< double > *ckp)
Definition: cbessik.cpp:195
int bessik01b(double x, double &i0, double &i1, double &k0, double &k1, double &i0p, double &i1p, double &k0p, double &k1p)
Definition: bessik.cpp:171
int msta2(double x, int n, int mp)
Definition: bessjy.cpp:337
Definition: bessik.cpp:9
int cbessjyva(double v, std::complex< double > z, double &vm, std::complex< double > *cjv, std::complex< double > *cyv, std::complex< double > *cjvp, std::complex< double > *cyvp)
Definition: cbessjy.cpp:600
int bessjynb(int n, double x, int &nm, double *jn, double *yn, double *jnp, double *ynp)
Definition: bessjy.cpp:494
int bessikna(int n, double x, int &nm, double *in, double *kn, double *inp, double *knp)
Definition: bessik.cpp:240
int bessiknb(int n, double x, int &nm, double *in, double *kn, double *inp, double *knp)
Definition: bessik.cpp:330
int cbessiknb(int n, std::complex< double > z, int &nm, std::complex< double > *ci, std::complex< double > *ck, std::complex< double > *cip, std::complex< double > *ckp)
Definition: cbessik.cpp:270
int bessjyv(double v, double x, double &vm, double *jv, double *yv, double *jvp, double *yvp)
Definition: bessjy.cpp:661
int bessik01a(double x, double &i0, double &i1, double &k0, double &k1, double &i0p, double &i1p, double &k0p, double &k1p)
Definition: bessik.cpp:13
int cbessikv(double v, std::complex< double >z, double &vm, std::complex< double > *civ, std::complex< double > *ckv, std::complex< double > *civp, std::complex< double > *ckvp)
Definition: cbessik.cpp:407
int cbessjy01(std::complex< double > z, std::complex< double > &cj0, std::complex< double > &cj1, std::complex< double > &cy0, std::complex< double > &cy1, std::complex< double > &cj0p, std::complex< double > &cj1p, std::complex< double > &cy0p, std::complex< double > &cy1p)
Definition: cbessjy.cpp:18
int cbessik01(std::complex< double >z, std::complex< double > &ci0, std::complex< double > &ci1, std::complex< double > &ck0, std::complex< double > &ck1, std::complex< double > &ci0p, std::complex< double > &ci1p, std::complex< double > &ck0p, std::complex< double > &ck1p)
Definition: cbessik.cpp:19
int cbessjynb(int n, std::complex< double > z, int &nm, std::complex< double > *cj, std::complex< double > *cy, std::complex< double > *cjp, std::complex< double > *cyp)
Definition: cbessjy.cpp:414
int cbessjyna(int n, std::complex< double > z, int &nm, std::complex< double > *cj, std::complex< double > *cy, std::complex< double > *cjp, std::complex< double > *cyp)
Definition: cbessjy.cpp:233
int bessjy01b(double x, double &j0, double &j1, double &y0, double &y1, double &j0p, double &j1p, double &y0p, double &y1p)
Definition: bessjy.cpp:247
int bessjyna(int n, double x, int &nm, double *jn, double *yn, double *jnp, double *ynp)
Definition: bessjy.cpp:395
int bessikv(double v, double x, double &vm, double *iv, double *kv, double *ivp, double *kvp)
Definition: bessik.cpp:454
int bessjy01a(double x, double &j0, double &j1, double &y0, double &y1, double &j0p, double &j1p, double &y0p, double &y1p)
Definition: bessjy.cpp:37