23char mat_sinp_legii_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Non_class_members/Coef/mat_sinp_legii.C,v 1.4 2014/10/13 08:53:14 j_novak Exp $" ;
94int loch_mat_sinp_legii = 0 ;
99double* mat_sinp_legii(
int np,
int nt) {
102static double* tab[NMAX] ;
103static int nb_dejafait = 0 ;
104static int np_dejafait[NMAX] ;
106static int nt_dejafait[NMAX] ;
109int i, indice, j, j2, m, l ;
116 for ( i=0 ; i < nb_dejafait ; i++ ) {
117 if ( (np_dejafait[i] == np) && (nt_dejafait[i] == nt) ) indice = i ;
123 if ( nb_dejafait >= NMAX ) {
124 cout <<
"mat_sinp_legii: nb_dejafait >= NMAX : "
125 << nb_dejafait <<
" <-> " << NMAX << endl ;
129 indice = nb_dejafait ;
131 np_dejafait[indice] = np ;
132 nt_dejafait[indice] = nt ;
134 tab[indice] =
new double[(np/2+1)*nt*nt] ;
142 int nt2m1 = nt2 - 1 ;
150 double* yy =
new double[nt2] ;
151 double* sint =
new double[nt*nt2];
156 double dt = M_PI / double(2*(nt2-1)) ;
157 for (j=0; j<nt-1; j++) {
158 for (j2=0; j2<nt2; j2++) {
159 double theta = j2*dt ;
160 sint[nt2*j + j2] =
sin( 2*j * theta ) ;
169 int m_max = (np == 1) ? 1 : np-1 ;
171 for (m=1; m <= m_max ; m+=2) {
175 double* leg = legendre_norm(m, nt) ;
177 for (l=(m+1)/2; l<nt-1; l++) {
181 for (j=0; j<nt-1; j++) {
186 for (j2=0; j2<nt2; j2++) {
187 yy[nt2m1-j2] = sint[nt2*j + j2]
188 * leg[nt2* (ll-m) + j2] ;
193 cfrchebp(deg, deg, yy, deg, yy) ;
194 tab[indice][ nt*nt* ((m-1)/2) + nt*l + j] =
195 2.*int1d_chebp(nt2, yy) ;
Cmp sin(const Cmp &)
Sine.