21 char ope_vorton_solh_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Ope_elementary/Ope_vorton/ope_vorton_solh.C,v 1.5 2014/10/13 08:53:37 j_novak Exp $" ;
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 ;