23char mat_legii_sinp_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Non_class_members/Coef/mat_legii_sinp.C,v 1.4 2014/10/13 08:53:13 j_novak Exp $" ;
93int loch_mat_legii_sinp = 0 ;
98double* mat_legii_sinp(
int np,
int nt) {
101static double* tab[NMAX] ;
102static int nb_dejafait = 0 ;
103static int np_dejafait[NMAX] ;
105static int nt_dejafait[NMAX] ;
108int i, indice, j, j2, m, l ;
115 for ( i=0 ; i < nb_dejafait ; i++ ) {
116 if ( (np_dejafait[i] == np) && (nt_dejafait[i] == nt) ) indice = i ;
122 if ( nb_dejafait >= NMAX ) {
123 cout <<
"mat_legii_sinp: nb_dejafait >= NMAX : "
124 << nb_dejafait <<
" <-> " << NMAX << endl ;
128 indice = nb_dejafait ;
130 np_dejafait[indice] = np ;
131 nt_dejafait[indice] = nt ;
133 tab[indice] =
new double[(np/2+1)*nt*nt] ;
148 double* yy =
new double[nt2] ;
155 int m_max = (np == 1) ? 1 : np-1 ;
157 for (m=1; m <= m_max ; m+=2) {
161 double* leg = legendre_norm(m, nt) ;
164 for (l=(m+1)/2; l<nt-1; l++) {
168 for (j2=0; j2<nt2; j2++) {
169 yy[j2] = leg[nt2* (ll-m) + j2] ;
174 cftsinp(deg, deg, yy, deg, yy) ;
177 for (j=0; j<nt-1; j++) {
178 tab[indice][ nt*nt* ((m-1)/2) + nt*j + l] = yy[j] ;