32 #include "ope_elementary.h" 38 Tbl _solh_vorton_pas_prevu (
int,
int,
double,
double, Tbl&) {
40 cout <<
" Solution homogene pas prevue ..... : "<< endl ;
50 Tbl _solh_vorton_r_chebu (
int n,
int l,
double alpha,
double, Tbl& val_lim) {
52 double l_one = -double(l) ;
53 double rminus = -0.5/alpha ;
57 double* coloc =
new double[n] ;
59 int * deg =
new int[3] ;
65 for (
int i=0 ; i<n ; i++)
66 coloc[i] =
pow(1./alpha/(-
cos(M_PI*i/(n-1))-1) , l_one) ;
68 cfrcheb(deg, deg, coloc, deg, coloc) ;
69 for (
int i=0 ; i<n ;i++)
70 res.set(i) = coloc[i] ;
75 val_lim.set(0,0) =
pow(rminus, l_one) ;
76 val_lim.set(0,1) = l_one*
pow(rminus, l_one-1.) ;
77 val_lim.set(0,2) = 0. ;
78 val_lim.set(0,3) = 0. ;
79 val_lim /=
sqrt(
double(2)) ;
89 Tbl _solh_vorton_r_cheb (
int n,
int l,
double alpha,
double beta, Tbl& val_lim) {
92 double l_one = double(l+1) ;
93 double l_two = double(-l) ;
94 double rminus = beta - alpha ;
95 double rplus = beta + alpha ;
99 double* coloc =
new double[n] ;
101 int * deg =
new int[3] ;
107 for (
int i=0 ; i<n ; i++)
108 coloc[i] =
pow(alpha*(-
cos(M_PI*i/(n-1))) + beta, l_one) ;
110 cfrcheb(deg, deg, coloc, deg, coloc) ;
111 for (
int i=0 ; i<n ;i++)
112 res.set(0, i) = coloc[i] ;
115 for (
int i=0 ; i<n ; i++)
116 coloc[i] =
pow(alpha*(-
cos(M_PI*i/(n-1))) + beta, l_two) ;
118 cfrcheb(deg, deg, coloc, deg, coloc) ;
119 for (
int i=0 ; i<n ;i++)
120 res.set(1, i) = coloc[i] ;
125 val_lim.set(0,0) =
pow(rminus, l_one) ;
126 val_lim.set(0,1) = l_one*
pow(rminus, l_one-1) ;
127 val_lim.set(0,2) =
pow(rplus, l_one) ;
128 val_lim.set(0,3) = l_one*
pow(rplus, l_one-1) ;
130 val_lim.set(1,0) =
pow(rminus, l_two) ;
131 val_lim.set(1,1) = l_two*
pow(rminus, l_two-1) ;
132 val_lim.set(1,2) =
pow(rplus, l_two) ;
133 val_lim.set(1,3) = l_two*
pow(rplus, l_two-1) ;
134 val_lim /=
sqrt(
double(2)) ;
143 static Tbl (*solh_vorton[
MAX_BASE]) (int, int, double, double,
Tbl&) ;
150 solh_vorton[i] = _solh_vorton_pas_prevu ;
153 solh_vorton[
R_CHEB >>
TRA_R] = _solh_vorton_r_cheb ;
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. ...
int l_quant
quantum number
double beta
Parameter of the associated mapping.
double ds_two_plus
Value of the derivative of the second homogeneous solution at the outer boundary. ...
Cmp cos(const Cmp &)
Cosine.
int base_r
Radial basis of decomposition.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
#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.
Cmp pow(const Cmp &, int)
Power .
double s_one_plus
Value of the first homogeneous solution at the outer boundary.
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.
virtual Tbl get_solh() const
Computes the homogeneous solutions(s).
#define R_CHEB
base de Chebychev ordinaire (fin)