30 #include <gsl/gsl_sf_bessel.h> 33 #include "ope_elementary.h" 39 Tbl _solh_helmholtz_minus_2d_pas_prevu (
int,
int,
double,
double,
double) {
41 cout <<
" Solution homogene pas prevue ..... : "<< endl ;
52 Tbl _solh_helmholtz_minus_2d_r_cheb (
int n,
int l,
double masse,
double alpha,
double beta) {
55 double echelle = beta / alpha ;
59 double* coloc =
new double[n] ;
61 int * deg =
new int[3] ;
67 for (
int i=0 ; i<n ; i++)
68 coloc[i] = gsl_sf_bessel_In (l, masse*alpha*(echelle-
cos(M_PI*i/(n-1)))) ;
70 cfrcheb(deg, deg, coloc, deg, coloc) ;
71 for (
int i=0 ; i<n ;i++)
72 res.set(0, i) = coloc[i] ;
75 for (
int i=0 ; i<n ; i++)
76 coloc[i] = gsl_sf_bessel_Kn (l, masse*alpha*(echelle-
cos(M_PI*i/(n-1)))) ;
78 cfrcheb(deg, deg, coloc, deg, coloc) ;
79 for (
int i=0 ; i<n ;i++)
80 res.set(1, i) = coloc[i] ;
92 Tbl _solh_helmholtz_minus_2d_r_chebu (
int n,
int l,
double masse,
93 double alpha,
double) {
98 double* coloc =
new double[n] ;
100 int * deg =
new int[3] ;
105 for (
int i=0 ; i<n-1 ; i++)
106 coloc[i] = gsl_sf_bessel_Kn (l, masse/alpha/(-1-
cos(M_PI*i/(n-1)))) ;
109 cfrcheb(deg, deg, coloc, deg, coloc) ;
110 for (
int i=0 ; i<n ;i++)
111 res.set(i) = coloc[i] ;
123 static Tbl (*solh_helmholtz_minus_2d[
MAX_BASE]) (int, int, double, double, double) ;
130 solh_helmholtz_minus_2d[i] = _solh_helmholtz_minus_2d_pas_prevu ;
133 solh_helmholtz_minus_2d[
R_CHEB >>
TRA_R] = _solh_helmholtz_minus_2d_r_cheb ;
134 solh_helmholtz_minus_2d[
R_CHEBU >>
TRA_R] = _solh_helmholtz_minus_2d_r_chebu ;
143 val_lim *=
sqrt(
double(2)) ;
154 for (
int i=0 ; i<
nr ; i++)
155 auxi.
set(i) = res(0,i) ;
158 val_one *=
sqrt(
double(2)) ;
165 for (
int i=0 ; i<
nr ; i++)
166 auxi.
set(i) = res(1,i) ;
169 val_two *=
sqrt(
double(2)) ;
double alpha
Parameter of the associated mapping.
double s_one_minus
Value of the first homogeneous solution at the inner boundary.
Cmp sqrt(const Cmp &)
Square root.
double ds_two_minus
Value of the derivative of the second homogeneous solution at the inner boundary. ...
double beta
Parameter of the associated mapping.
double & set(int i)
Read/write of a particular element (index i) (1D case)
double ds_two_plus
Value of the derivative of the second homogeneous solution at the outer boundary. ...
virtual Tbl get_solh() const
Computes the homogeneous solutions(s).
Cmp cos(const Cmp &)
Cosine.
int base_r
Radial basis of decomposition.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
double masse
The mass term.
#define TRA_R
Translation en R, used for a bitwise shift (in hex)
double ds_one_plus
Value of the derivative of the first homogeneous solution at the outer boundary.
int get_ndim() const
Gives the number of dimensions (ie dim.ndim)
double s_two_minus
Value of the second homogeneous solution at the inner boundary.
double s_one_plus
Value of the first homogeneous solution at the outer boundary.
int l_quant
quantum number
int nr
Number of radial points.
double ds_one_minus
Value of the derivative of the first homogeneous solution at the inner boundary.
#define R_CHEBU
base de Chebychev ordinaire (fin), dev. en 1/r
double s_two_plus
Value of the second homogeneous solution at the outer boundary.
#define MAX_BASE
Nombre max. de bases differentes.
#define R_CHEB
base de Chebychev ordinaire (fin)