23char mat_legp_cossincp_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Non_class_members/Coef/mat_legp_cossincp.C,v 1.6 2014/10/13 08:53:14 j_novak Exp $" ;
108int loch_mat_legp_cossincp = 0 ;
113double* mat_legp_cossincp(
int np,
int nt) {
116static double* tab[NMAX] ;
117static int nb_dejafait = 0 ;
118static int np_dejafait[NMAX] ;
120static int nt_dejafait[NMAX] ;
123int i, indice, j, j2, m, l ;
129 for ( i=0 ; i < nb_dejafait ; i++ ) {
130 if ( (np_dejafait[i] == np) && (nt_dejafait[i] == nt) ) indice = i ;
136 if ( nb_dejafait >= NMAX ) {
137 cout <<
"mat_legp_cossincp: nb_dejafait >= NMAX : "
138 << nb_dejafait <<
" <-> " << NMAX << endl ;
142 indice = nb_dejafait ;
144 np_dejafait[indice] = np ;
145 nt_dejafait[indice] = nt ;
147 tab[indice] =
new double [(np/2+1)*nt*nt] ;
162 double* yy =
new double[nt2];
169 for (m=0; m < np/2+1 ; m++) {
173 double* leg = legendre_norm(m, nt) ;
178 for (l=m/2; l<nt; l++) {
182 for (j2=0; j2<nt2; j2++) {
183 yy[j2] = leg[nt2* (ll-m) + j2] ;
188 cftcosp(deg, deg, yy, deg, yy) ;
191 for (j=0; j<nt; j++) {
192 tab[indice][ nt*nt* m + nt*j + l] = yy[j] ;
204 for (l=(m-1)/2; l<nt-1; l++) {
209 for (j2=0; j2<nt2; j2++) {
210 yy[j2] = leg[nt2* (ll-m) + j2] ;
215 cftsini(deg, deg, yy, deg, yy) ;
218 for (j=0; j<nt-1; j++) {
219 tab[indice][ nt*nt* m + nt*j + l] = yy[j] ;