23char cipcossini_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Non_class_members/Coef/FFTW3/cipcossini.C,v 1.3 2014/10/13 08:53:19 j_novak Exp $" ;
122void cipcossini(
const int* deg,
const int* dimc,
const int* dimf,
123 double* cf,
double* ff)
132 int deg2[] = {np2, deg[1], deg[2]} ;
133 int dimc2[] = {np2+2, dimc[1], dimc[2]} ;
134 int dimf2[] = {np2, dimf[1], dimf[2]} ;
136 double* cf2 =
new double[ dimc2[0]*dimc2[1]*dimc2[2] ] ;
137 double* ff2 =
new double[ dimf2[0]*dimf2[1]*dimf2[2] ] ;
140 int ntnrc = dimc[1] * dimc[2] ;
143 for (
int ij = 0; ij <2*ntnrc; ij++) {
148 for (
int ij = 0; ij <ntnrc; ij++) {
149 cf2[2*ntnrc + ij] = cf[ij] ;
153 for (
int ij = 0; ij <ntnrc; ij++) {
154 cf2[3*ntnrc + ij] = cf[2*ntnrc + ij] ;
157 for (
int k2=4; k2<np2; k2 +=4) {
159 for (
int ij = 0; ij <2*ntnrc; ij++) {
160 cf2[k2*ntnrc + ij] = 0 ;
165 for (
int ij = 0; ij <2*ntnrc; ij++) {
166 cf2[(k2+2)*ntnrc + ij] = cf[k*ntnrc + ij] ;
171 for (
int ij = 0; ij <2*ntnrc; ij++) {
172 cf2[np2*ntnrc + ij] = 0 ;
176 cipcossin(deg2, dimc2, dimf2, cf2, ff2) ;
179 int ntnrf = dimf[1] * dimf[2] ;
180 for (
int k=0; k<np; k++) {
181 for (
int ij = 0; ij <ntnrf; ij++) {
182 ff[k*ntnrf + ij] = ff2[k*ntnrf + ij] ;