23char chebimp_ini_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Non_class_members/Coef/chebimp_ini.C,v 1.6 2014/10/13 08:53:11 j_novak Exp $" ;
95double* chebimp_ini(
const int n )
101static double* table_x[NMAX] ;
102static int nwork = 0 ;
103static int tbn[NMAX] ;
112 for ( i=0 ; i < nwork ; i++ ) {
113 if ( tbn[i] == n ) indice = i ;
118 if ( nwork >= NMAX ) {
119 cout <<
"chebimp_ini: nwork > NMAX : "
120 << nwork <<
" <-> " << NMAX << endl ;
123 indice = nwork ; nwork++ ; tbn[indice] = n ;
125 table_x[indice] =
new double[n] ;
127 double xx = M_PI / double(2*(n-1));
128 for ( i = 0; i < n ; i++ ) {
129 table_x[indice][i] =
sin( xx * i );
136 return table_x[indice] ;
Cmp sin(const Cmp &)
Sine.