Blame specfunc/gsl_sf_mathieu.h

Packit 67cb25
/* specfunc/gsl_sf_mathieu.h
Packit 67cb25
 * 
Packit 67cb25
 * Copyright (C) 2002 Lowell Johnson
Packit 67cb25
 * 
Packit 67cb25
 * This program is free software; you can redistribute it and/or modify
Packit 67cb25
 * it under the terms of the GNU General Public License as published by
Packit 67cb25
 * the Free Software Foundation; either version 3 of the License, or (at
Packit 67cb25
 * your option) any later version.
Packit 67cb25
 * 
Packit 67cb25
 * This program is distributed in the hope that it will be useful, but
Packit 67cb25
 * WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 67cb25
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 67cb25
 * General Public License for more details.
Packit 67cb25
 * 
Packit 67cb25
 * You should have received a copy of the GNU General Public License
Packit 67cb25
 * along with this program; if not, write to the Free Software
Packit 67cb25
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Packit 67cb25
 */
Packit 67cb25
Packit 67cb25
/* Author:  L. Johnson */
Packit 67cb25
Packit 67cb25
#ifndef __GSL_SF_MATHIEU_H__
Packit 67cb25
#define __GSL_SF_MATHIEU_H__
Packit 67cb25
Packit 67cb25
#include <gsl/gsl_sf_result.h>
Packit 67cb25
#include <gsl/gsl_eigen.h>
Packit 67cb25
Packit 67cb25
#undef __BEGIN_DECLS
Packit 67cb25
#undef __END_DECLS
Packit 67cb25
#ifdef __cplusplus
Packit 67cb25
# define __BEGIN_DECLS extern "C" {
Packit 67cb25
# define __END_DECLS }
Packit 67cb25
#else
Packit 67cb25
# define __BEGIN_DECLS /* empty */
Packit 67cb25
# define __END_DECLS /* empty */
Packit 67cb25
#endif
Packit 67cb25
Packit 67cb25
__BEGIN_DECLS
Packit 67cb25
Packit 67cb25
#define GSL_SF_MATHIEU_COEFF 100
Packit 67cb25
Packit 67cb25
typedef struct 
Packit 67cb25
{
Packit 67cb25
  size_t size;
Packit 67cb25
  size_t even_order;
Packit 67cb25
  size_t odd_order;
Packit 67cb25
  int extra_values;
Packit 67cb25
  double qa;   /* allow for caching of results: not implemented yet */
Packit 67cb25
  double qb;   /* allow for caching of results: not implemented yet */
Packit 67cb25
  double *aa;
Packit 67cb25
  double *bb;
Packit 67cb25
  double *dd;
Packit 67cb25
  double *ee;
Packit 67cb25
  double *tt;
Packit 67cb25
  double *e2;
Packit 67cb25
  double *zz;
Packit 67cb25
  gsl_vector *eval;
Packit 67cb25
  gsl_matrix *evec;
Packit 67cb25
  gsl_eigen_symmv_workspace *wmat;
Packit 67cb25
} gsl_sf_mathieu_workspace;
Packit 67cb25
Packit 67cb25
Packit 67cb25
/* Compute an array of characteristic (eigen) values from the recurrence
Packit 67cb25
   matrices for the Mathieu equations. */
Packit 67cb25
int gsl_sf_mathieu_a_array(int order_min, int order_max, double qq, gsl_sf_mathieu_workspace *work, double result_array[]);
Packit 67cb25
int gsl_sf_mathieu_b_array(int order_min, int order_max, double qq,  gsl_sf_mathieu_workspace *work, double result_array[]);
Packit 67cb25
Packit 67cb25
/* Compute the characteristic value for a Mathieu function of order n and
Packit 67cb25
   type ntype. */
Packit 67cb25
int gsl_sf_mathieu_a_e(int order, double qq, gsl_sf_result *result);
Packit 67cb25
double gsl_sf_mathieu_a(int order, double qq);
Packit 67cb25
int gsl_sf_mathieu_b_e(int order, double qq, gsl_sf_result *result);
Packit 67cb25
double gsl_sf_mathieu_b(int order, double qq);
Packit 67cb25
Packit 67cb25
/* Compute the Fourier coefficients for a Mathieu function. */
Packit 67cb25
int gsl_sf_mathieu_a_coeff(int order, double qq, double aa, double coeff[]);
Packit 67cb25
int gsl_sf_mathieu_b_coeff(int order, double qq, double aa, double coeff[]);
Packit 67cb25
Packit 67cb25
/* Allocate computational storage space for eigenvalue solution. */
Packit 67cb25
gsl_sf_mathieu_workspace *gsl_sf_mathieu_alloc(const size_t nn,
Packit 67cb25
                                               const double qq);
Packit 67cb25
void gsl_sf_mathieu_free(gsl_sf_mathieu_workspace *workspace);
Packit 67cb25
Packit 67cb25
/* Compute an angular Mathieu function. */
Packit 67cb25
int gsl_sf_mathieu_ce_e(int order, double qq, double zz, gsl_sf_result *result);
Packit 67cb25
double gsl_sf_mathieu_ce(int order, double qq, double zz);
Packit 67cb25
int gsl_sf_mathieu_se_e(int order, double qq, double zz, gsl_sf_result *result);
Packit 67cb25
double gsl_sf_mathieu_se(int order, double qq, double zz);
Packit 67cb25
int gsl_sf_mathieu_ce_array(int nmin, int nmax, double qq, double zz,
Packit 67cb25
                            gsl_sf_mathieu_workspace *work,
Packit 67cb25
                            double result_array[]);
Packit 67cb25
int gsl_sf_mathieu_se_array(int nmin, int nmax, double qq, double zz,
Packit 67cb25
                            gsl_sf_mathieu_workspace *work,
Packit 67cb25
                            double result_array[]);
Packit 67cb25
Packit 67cb25
/* Compute a radial Mathieu function. */
Packit 67cb25
int gsl_sf_mathieu_Mc_e(int kind, int order, double qq, double zz,
Packit 67cb25
                      gsl_sf_result *result);
Packit 67cb25
double gsl_sf_mathieu_Mc(int kind, int order, double qq, double zz);
Packit 67cb25
int gsl_sf_mathieu_Ms_e(int kind, int order, double qq, double zz,
Packit 67cb25
                      gsl_sf_result *result);
Packit 67cb25
double gsl_sf_mathieu_Ms(int kind, int order, double qq, double zz);
Packit 67cb25
int gsl_sf_mathieu_Mc_array(int kind, int nmin, int nmax, double qq,
Packit 67cb25
                            double zz, gsl_sf_mathieu_workspace *work,
Packit 67cb25
                            double result_array[]);
Packit 67cb25
int gsl_sf_mathieu_Ms_array(int kind, int nmin, int nmax, double qq,
Packit 67cb25
                            double zz, gsl_sf_mathieu_workspace *work,
Packit 67cb25
                            double result_array[]);
Packit 67cb25
Packit 67cb25
Packit 67cb25
__END_DECLS
Packit 67cb25
Packit 67cb25
#endif /* !__GSL_SF_MATHIEU_H__ */