23char cheb_ini_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Non_class_members/Coef/cheb_ini.C,v 1.6 2014/10/13 08:53:11 j_novak Exp $" ;
83double* cheb_ini(
const int n )
89static double* table_sin[NMAX] ;
101 for ( i=0 ; i < nwork ; i++ ) {
102 if ( tbn[i] == n ) indice = i ;
107 if ( nwork >= NMAX ) {
108 cout <<
"cheb_ini : nwork >= NMAX !" << endl ;
111 indice = nwork ; nwork++ ; tbn[indice] = n ;
113 int nm1s2 = (n-1) / 2 ;
114 table_sin[indice] =
new double[nm1s2] ;
116 double xx = M_PI / double(n-1);
117 for ( i = 0; i < nm1s2 ; i++ ) {
118 table_sin[indice][i] =
sin( xx * i );
124 return table_sin[indice] ;
Cmp sin(const Cmp &)
Sine.