"Fossies" - the Fresh Open Source Software Archive

Member "getdp-3.1.0-source/Numeric/Bessel.h" (26 Feb 2019, 1618 Bytes) of package /linux/privat/getdp-3.1.0-source.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "Bessel.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 3.0.4_vs_3.1.0.

    1 // GetDP - Copyright (C) 1997-2019 P. Dular and C. Geuzaine, University of Liege
    2 //
    3 // See the LICENSE.txt file for license information. Please report all
    4 // issues on https://gitlab.onelab.info/getdp/getdp/issues.
    5 
    6 #ifndef BESSEL_H
    7 #define BESSEL_H
    8 
    9 #include <math.h>
   10 #include <complex>
   11 
   12 #define BESSEL_ERROR_INPUT     1
   13 #define BESSEL_OVERFLOW        2
   14 #define BESSEL_HALF_ACCURACY   3
   15 #define BESSEL_NO_ACCURACY     4
   16 #define BESSEL_NO_CONVERGENCE  5
   17 
   18 // These routines provide a C++ interface to the Fortran Bessel
   19 // functions from Donald E. Amos (Sandia National Laboratories)
   20 
   21 int BesselJn(double n, int num, double x, double *val);
   22 int BesselSphericalJn(double n, int num, double x, double *val);
   23 int BesselAltSphericalJn(double n, int num, double x, double *val);
   24 
   25 int BesselJnComplex(double n, int num, double xr, double xi, double *valr, double *vali);
   26 int BesselKnComplex(double n, int num, double xr, double xi, double *valr, double *vali);
   27 
   28 int BesselYn(double n, int num, double x, double *val);
   29 int BesselSphericalYn(double n, int num, double x, double *val);
   30 int BesselAltSphericalYn(double n, int num, double x, double *val);
   31 
   32 int BesselHn(int type, double n, int num, double x, std::complex<double> *val);
   33 int BesselSphericalHn(int type, double n, int num, double x, std::complex<double> *val);
   34 int BesselAltSphericalHn(int type, double n, int num, double x, std::complex<double> *val);
   35 
   36 // Utilities for backward compatibility
   37 
   38 double Spherical_j_n(int n, double x);
   39 double AltSpherical_j_n(int n, double x);
   40 double Spherical_y_n(int n, double x);
   41 double AltSpherical_y_n(int n, double x);
   42 
   43 #endif