-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prelimany version of spherical Bessel functions.
- Loading branch information
1 parent
3b16555
commit 9c18651
Showing
11 changed files
with
95 additions
and
441 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
July 2014 | ||
[] Add support for real orders by carefully coding the reflection formulae. | ||
[] Add support for real arguments via a static cast | ||
June 2015 | ||
[✓] Add support for real orders by carefully coding the reflection formulae. | ||
[ ] Add support for real arguments via a static cast | ||
from double to complex<double>. | ||
[ ] Add support for spherical Bessel functions. | ||
[ ] Test for more values of order and argument. | ||
[ ] Add support for derivatives of spherical Bessel functions. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/*! \file sph_besselFunctions.h | ||
* | ||
* \author Joey Dumont <joey.dumont@gmail.com> | ||
* \author Denis Gagnon <gagnon88@gmail.com> | ||
* | ||
* \brief Functions computing the spherical Bessel functions. | ||
* | ||
* We compute the spherical Bessel functions by evaluating the | ||
* Bessel functions with half-integer order with D.E. Amos' FORTRAN | ||
* implementation. | ||
* | ||
* \copyright LGPL | ||
*/ | ||
|
||
#ifndef SPH_BESSELFUNCTIONS_H | ||
#define SPH_BESSELFUNCTIONS_H | ||
|
||
#include <iostream> | ||
#include <complex> | ||
|
||
#include "besselFunctions.h" | ||
#include "utilities.h" | ||
|
||
namespace sp_bessel { | ||
|
||
/// Near \f$z\rightarrow0\f$, the floating point division necessary would | ||
/// destroy precision. We thus use an ascending series to compute sph_besselJ. | ||
/// See \cite ABR65 Sec. 10.1.2. | ||
inline std::complex<double> sph_besselJ_asc_series(double order, std::complex<double> z) | ||
{ | ||
return 0; | ||
} | ||
|
||
/// We compute the spherical Bessel function of the first kind. | ||
inline std::complex<double> sph_besselJ(double order, std::complex<double> z) | ||
{ | ||
return std::sqrt(constants::pi/(2.0*z))*besselJ(order+0.5, z); | ||
} | ||
|
||
/// We compute the spherical Bessel function of the second kind. | ||
inline std::complex<double> sph_besselY(double order, std::complex<double> z) | ||
{ | ||
return std::sqrt(constants::pi/(2.0*z))*besselY(order+0.5,z); | ||
} | ||
|
||
/// We compute the spherical Hankel function of the first kind. | ||
inline std::complex<double> sph_hankelH1(double order, std::complex<double> z) | ||
{ | ||
return std::sqrt(constants::pi/(2.0*z))*hankelH1(order+0.5,z); | ||
} | ||
|
||
/// We compute the spherical Hankel function of the second kind. | ||
inline std::complex<double> sph_hankelH2(double order, std::complex<double> z) | ||
{ | ||
return std::sqrt(constants::pi/(2.0*z))*hankelH2(order+0.5,z); | ||
} | ||
|
||
} // namespace sp_bessel | ||
|
||
#endif // SPH_BESSELFUNCTIONS_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters