23char cfpcossini_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Non_class_members/Coef/FFTW3/cfpcossini.C,v 1.3 2014/10/13 08:53:18 j_novak Exp $" ;
106void cfpcossini(
const int* deg,
const int* dim,
double* cf) {
119 cout <<
"cfpcossini: np+2 > n1 : np+2 = " << np+2 <<
" , n1 = "
126 int deg2[] = {np2, nt, nr} ;
127 int dim2[] = {np2+2, nt, nr} ;
129 double* cf2 =
new double[(np2+2)*nt*nr] ;
132 for (
int k=0; k<np; k++) {
133 for (
int ij = 0; ij <ntnr; ij++) {
134 cf2[k*ntnr + ij] = cf[k*ntnr + ij] ;
139 int npntnr = np * ntnr ;
140 for (
int k=0; k<np; k++) {
141 for (
int ij = 0; ij <ntnr; ij++) {
142 cf2[npntnr + k*ntnr + ij] = - cf[k*ntnr + ij] ;
147 cfpcossin(deg2, dim2, cf2) ;
152 for (
int ij = 0; ij <ntnr; ij++) {
153 cf[ij] = cf2[2*ntnr + ij] ;
157 for (
int ij = 0; ij <ntnr; ij++) {
162 for (
int ij = 0; ij <ntnr; ij++) {
163 cf[2*ntnr + ij] = cf2[3*ntnr + ij] ;
167 for (
int k=3; k<np; k+=2) {
168 int k2 = 2*(k-1) + 2 ;
170 for (
int ij = 0; ij <ntnr; ij++) {
171 cf[k*ntnr + ij] = cf2[k2*ntnr + ij] ;
176 for (
int ij = 0; ij <ntnr; ij++) {
177 cf[k1*ntnr + ij] = cf2[k2*ntnr + ij] ;
182 for (
int ij = 0; ij <ntnr; ij++) {
183 cf[(np+1)*ntnr + ij] = 0 ;