Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-21 10:03:53

0001 /* specfunc/gsl_sf_mathieu.h
0002  * 
0003  * Copyright (C) 2002 Lowell Johnson
0004  * 
0005  * This program is free software; you can redistribute it and/or modify
0006  * it under the terms of the GNU General Public License as published by
0007  * the Free Software Foundation; either version 3 of the License, or (at
0008  * your option) any later version.
0009  * 
0010  * This program is distributed in the hope that it will be useful, but
0011  * WITHOUT ANY WARRANTY; without even the implied warranty of
0012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0013  * General Public License for more details.
0014  * 
0015  * You should have received a copy of the GNU General Public License
0016  * along with this program; if not, write to the Free Software
0017  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
0018  */
0019 
0020 /* Author:  L. Johnson */
0021 
0022 #ifndef __GSL_SF_MATHIEU_H__
0023 #define __GSL_SF_MATHIEU_H__
0024 
0025 #include <gsl/gsl_sf_result.h>
0026 #include <gsl/gsl_eigen.h>
0027 
0028 #undef __BEGIN_DECLS
0029 #undef __END_DECLS
0030 #ifdef __cplusplus
0031 # define __BEGIN_DECLS extern "C" {
0032 # define __END_DECLS }
0033 #else
0034 # define __BEGIN_DECLS /* empty */
0035 # define __END_DECLS /* empty */
0036 #endif
0037 
0038 __BEGIN_DECLS
0039 
0040 #define GSL_SF_MATHIEU_COEFF 100
0041 
0042 typedef struct 
0043 {
0044   size_t size;
0045   size_t even_order;
0046   size_t odd_order;
0047   int extra_values;
0048   double qa;   /* allow for caching of results: not implemented yet */
0049   double qb;   /* allow for caching of results: not implemented yet */
0050   double *aa;
0051   double *bb;
0052   double *dd;
0053   double *ee;
0054   double *tt;
0055   double *e2;
0056   double *zz;
0057   gsl_vector *eval;
0058   gsl_matrix *evec;
0059   gsl_eigen_symmv_workspace *wmat;
0060 } gsl_sf_mathieu_workspace;
0061 
0062 
0063 /* Compute an array of characteristic (eigen) values from the recurrence
0064    matrices for the Mathieu equations. */
0065 int gsl_sf_mathieu_a_array(int order_min, int order_max, double qq, gsl_sf_mathieu_workspace *work, double result_array[]);
0066 int gsl_sf_mathieu_b_array(int order_min, int order_max, double qq,  gsl_sf_mathieu_workspace *work, double result_array[]);
0067 
0068 /* Compute the characteristic value for a Mathieu function of order n and
0069    type ntype. */
0070 int gsl_sf_mathieu_a_e(int order, double qq, gsl_sf_result *result);
0071 double gsl_sf_mathieu_a(int order, double qq);
0072 int gsl_sf_mathieu_b_e(int order, double qq, gsl_sf_result *result);
0073 double gsl_sf_mathieu_b(int order, double qq);
0074 
0075 /* Compute the Fourier coefficients for a Mathieu function. */
0076 int gsl_sf_mathieu_a_coeff(int order, double qq, double aa, double coeff[]);
0077 int gsl_sf_mathieu_b_coeff(int order, double qq, double aa, double coeff[]);
0078 
0079 /* Allocate computational storage space for eigenvalue solution. */
0080 gsl_sf_mathieu_workspace *gsl_sf_mathieu_alloc(const size_t nn,
0081                                                const double qq);
0082 void gsl_sf_mathieu_free(gsl_sf_mathieu_workspace *workspace);
0083 
0084 /* Compute an angular Mathieu function. */
0085 int gsl_sf_mathieu_ce_e(int order, double qq, double zz, gsl_sf_result *result);
0086 double gsl_sf_mathieu_ce(int order, double qq, double zz);
0087 int gsl_sf_mathieu_se_e(int order, double qq, double zz, gsl_sf_result *result);
0088 double gsl_sf_mathieu_se(int order, double qq, double zz);
0089 int gsl_sf_mathieu_ce_array(int nmin, int nmax, double qq, double zz,
0090                             gsl_sf_mathieu_workspace *work,
0091                             double result_array[]);
0092 int gsl_sf_mathieu_se_array(int nmin, int nmax, double qq, double zz,
0093                             gsl_sf_mathieu_workspace *work,
0094                             double result_array[]);
0095 
0096 /* Compute a radial Mathieu function. */
0097 int gsl_sf_mathieu_Mc_e(int kind, int order, double qq, double zz,
0098                       gsl_sf_result *result);
0099 double gsl_sf_mathieu_Mc(int kind, int order, double qq, double zz);
0100 int gsl_sf_mathieu_Ms_e(int kind, int order, double qq, double zz,
0101                       gsl_sf_result *result);
0102 double gsl_sf_mathieu_Ms(int kind, int order, double qq, double zz);
0103 int gsl_sf_mathieu_Mc_array(int kind, int nmin, int nmax, double qq,
0104                             double zz, gsl_sf_mathieu_workspace *work,
0105                             double result_array[]);
0106 int gsl_sf_mathieu_Ms_array(int kind, int nmin, int nmax, double qq,
0107                             double zz, gsl_sf_mathieu_workspace *work,
0108                             double result_array[]);
0109 
0110 
0111 __END_DECLS
0112 
0113 #endif /* !__GSL_SF_MATHIEU_H__ */