24char op_dsdphi_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Non_class_members/Operators/op_dsdphi.C,v 1.6 2014/10/13 08:53:25 j_novak Exp $" ;
99void _dsdphi_pas_prevu(Tbl* ,
int & b) {
100 cout <<
"Unknown phi basis in Mtbl_cf::dsdp() !" << endl ;
101 cout <<
" basis: " << hex << b << endl ;
109void _dsdphi_p_cossin(Tbl* tb,
int & )
113 if (tb->get_etat() == ETATZERO) {
118 assert(tb->get_etat() == ETATQCQ) ;
121 int nr = (tb->dim).dim[0] ;
122 int nt = (tb->dim).dim[1] ;
123 int np = (tb->dim).dim[2] ;
128 tb->set_etat_zero() ;
133 static double* cx = 0 ;
134 static int np_pre =0 ;
141 cx =
reinterpret_cast<double*
>(realloc(cx, (np+2) *
sizeof(
double))) ;
142 for (
int i=0 ; i<np+2 ; i += 2) {
150 double* xo =
new double[(tb->dim).taille] ;
153 for (
int i=0; i<(tb->dim).taille; i++) {
168 for (j=0 ; j<nr*nt ; j++) {
175 for (k=2 ; k<np ; k++) {
176 for (j=0 ; j<nr*nt ; j++) {
177 xco[j] = cx[k] * xci[j] ;
188 for (j=0 ; j<nr*nt ; j++) {
196 double* p2 = p1 + nr*nt ;
197 for (k=0 ; k<np+1 ; k +=2, p1 += 2*nr*nt, p2 += 2*nr*nt) {
198 F77_dswap(&nbr, p1, &inc, p2, &inc) ;
213void _dsdphi_p_cossin_p(Tbl* tb,
int & )
217 if (tb->get_etat() == ETATZERO) {
222 assert(tb->get_etat() == ETATQCQ) ;
225 int nr = (tb->dim).dim[0] ;
226 int nt = (tb->dim).dim[1] ;
227 int np = (tb->dim).dim[2] ;
232 tb->set_etat_zero() ;
237 static double* cx = 0 ;
238 static int np_pre =0 ;
245 cx =
reinterpret_cast<double*
>(realloc(cx, (np+2) *
sizeof(
double))) ;
247 for (i=0 ; i<np+2 ; i += 2) {
251 for (i=0 ; i<np+2 ; i++) {
258 double* xo =
new double[(tb->dim).taille] ;
261 for (
int i=0; i<(tb->dim).taille; i++) {
276 for (j=0 ; j<nr*nt ; j++) {
283 for (k=2 ; k<np ; k++) {
284 for (j=0 ; j<nr*nt ; j++) {
285 xco[j] = cx[k] * xci[j] ;
296 for (j=0 ; j<nr*nt ; j++) {
304 double* p2 = p1 + nr*nt ;
305 for (k=0 ; k<np+1 ; k +=2, p1 += 2*nr*nt, p2 += 2*nr*nt) {
306 F77_dswap(&nbr, p1, &inc, p2, &inc) ;
321void _dsdphi_p_cossin_i(Tbl* tb,
int & )
325 if (tb->get_etat() == ETATZERO) {
330 assert(tb->get_etat() == ETATQCQ) ;
333 int nr = (tb->dim).dim[0] ;
334 int nt = (tb->dim).dim[1] ;
335 int np = (tb->dim).dim[2] ;
342 tb->set_etat_zero() ;
347 double* xo =
new double[(tb->dim).taille] ;
350 const double* xi = tb->t ;
356 const double* xci = xi + 2*ntnr ;
357 for (
int i=0; i<ntnr; i++) {
365 for (
int i=0; i<ntnr; i++) {
374 for (
int i=0; i<ntnr; i++) {
381 for (
int k=3; k<np; k+=2) {
387 xci = xi + (k+1)*ntnr ;
389 for (
int i=0; i<ntnr; i++) {
390 xco[i] = k * xci[i] ;
396 xco = xo + (k+1)*ntnr ;
399 for (
int i=0; i<ntnr; i++) {
400 xco[i] = - k * xci[i] ;
408 xco = xo + (np+1)*ntnr ;
409 for (
int i=0; i<ntnr; i++) {