BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
Bessel.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Base/Math/Bessel.h
6 //! @brief Defines Bessel functions in namespace Math.
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifdef SWIG
16 #error no need to expose this header to Swig
17 #endif
18 
19 #ifndef USER_API
20 #ifndef BORNAGAIN_BASE_MATH_BESSEL_H
21 #define BORNAGAIN_BASE_MATH_BESSEL_H
22 
23 #include "Base/Types/Complex.h"
24 #include <vector>
25 
26 namespace Math {
27 
28 //! Real and complex Bessel functions
29 namespace Bessel {
30 
31 //! Bessel function of the first kind and order 0
32 double J0(double x);
33 
34 //! Bessel function of the first kind and order 1
35 double J1(double x);
36 
37 //! Bessel function J1(x)/x
38 double J1c(double x);
39 
40 //! Modified Bessel function of the first kind and order 0
41 double I0(double x);
42 
43 //! Complex Bessel function of the first kind and order 0
44 complex_t J0(const complex_t z);
45 
46 //! Complex Bessel function of the first kind and order 1
47 complex_t J1(const complex_t z);
48 
49 //! Complex Bessel function J1(x)/x
50 complex_t J1c(const complex_t z);
51 
52 } // namespace Bessel
53 } // namespace Math
54 
55 #endif // BORNAGAIN_BASE_MATH_BESSEL_H
56 #endif // USER_API
Defines complex_t, and a few elementary functions.
std::complex< double > complex_t
Definition: Complex.h:20
double J0(double x)
Bessel function of the first kind and order 0.
Definition: Bessel.cpp:162
double I0(double x)
Modified Bessel function of the first kind and order 0.
Definition: Bessel.cpp:177
double J1(double x)
Bessel function of the first kind and order 1.
Definition: Bessel.cpp:167
double J1c(double x)
Bessel function J1(x)/x.
Definition: Bessel.cpp:172
Various mathematical functions.
Definition: Bessel.h:26