25char som_r_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Non_class_members/Operators/som_r.C,v 1.11 2014/10/13 08:53:27 j_novak Exp $" ;
116 (
double*,
const int,
const int,
const int,
const double,
double*) {
117 cout <<
"Mtbl_cf::val_point: r basis not implemented yet !"
127 (
double* ti,
const int nr,
const int nt,
const int np,
const double x,
136 double* cheb =
new double [nr] ;
138 if (nr > 1) cheb[1] = x ;
139 for (i=2; i<nr; i++) {
140 cheb[i] = 2*x* cheb[i-1] - cheb[i-2] ;
144 for (j=0 ; j<nt ; j++) {
147 for (i=0 ; i<nr ; i++) {
148 *po += (*pi) * cheb[i] ;
161 for (k=2 ; k<np+1 ; k++) {
162 for (j=0 ; j<nt ; j++) {
165 for (i=0 ; i<nr ; i++) {
166 *po += (*pi) * cheb[i] ;
186 (
double* ti,
const int nr,
const int nt,
const int np,
const double x,
195 double* cheb =
new double [nr] ;
198 for (i=1; i<nr; i++) {
199 cheb[i] = 2*x* t2im1 - cheb[i-1] ;
200 t2im1 = 2*x* cheb[i] - t2im1 ;
204 for (j=0 ; j<nt ; j++) {
207 for (i=0 ; i<nr ; i++) {
208 *po += (*pi) * cheb[i] ;
221 for (k=2 ; k<np+1 ; k++) {
222 for (j=0 ; j<nt ; j++) {
225 for (i=0 ; i<nr ; i++) {
226 *po += (*pi) * cheb[i] ;
245 (
double* ti,
const int nr,
const int nt,
const int np,
const double x,
254 double* cheb =
new double [nr] ;
257 for (i=1; i<nr; i++) {
258 t2im1 = 2*x* cheb[i-1] - t2im1 ;
259 cheb[i] = 2*x* t2im1 - cheb[i-1] ;
263 for (j=0 ; j<nt ; j++) {
266 for (i=0 ; i<nr ; i++) {
267 *po += (*pi) * cheb[i] ;
280 for (k=2 ; k<np+1 ; k++) {
281 for (j=0 ; j<nt ; j++) {
284 for (i=0 ; i<nr ; i++) {
285 *po += (*pi) * cheb[i] ;
302 (
double* ti,
const int nr,
const int nt,
const int np,
const double x,
double* trtp) {
310 double* cheb =
new double [nr] ;
313 for (i=2; i<nr; i++) {
314 cheb[i] = 2*x* cheb[i-1] - cheb[i-2] ;
318 for (j=0 ; j<nt ; j++) {
321 for (i=0 ; i<nr ; i++) {
322 *po += (*pi) * cheb[i] ;
335 for (k=2 ; k<np+1 ; k++) {
336 for (j=0 ; j<nt ; j++) {
339 for (i=0 ; i<nr ; i++) {
340 *po += (*pi) * cheb[i] ;
357 (
double* ti,
const int nr,
const int nt,
const int np,
const double x,
double* trtp) {
365 double* cheb =
new double [2*nr] ;
368 for (i=2 ; i<2*nr ; i++) {
369 cheb[i] = 2*x* cheb[i-1] - cheb[i-2] ;
374 for (j=0 ; j<nt ; j++) {
377 for (i=0 ; i<nr ; i++) {
378 *po += (*pi) * cheb[2*i] ;
391 for (k=2 ; k<np+1 ; k++) {
393 for (j=0 ; j<nt ; j++) {
396 for (i=0 ; i<nr ; i++) {
397 *po += (*pi) * cheb[2*i + m] ;
415 (
double* ti,
const int nr,
const int nt,
const int np,
const double x,
double* trtp) {
423 double* cheb =
new double [2*nr] ;
426 for (i=2 ; i<2*nr ; i++) {
427 cheb[i] = 2*x* cheb[i-1] - cheb[i-2] ;
432 for (j=0 ; j<nt ; j++) {
435 for (i=0 ; i<nr ; i++) {
436 *po += (*pi) * cheb[2*i+1] ;
449 for (k=2 ; k<np+1 ; k++) {
451 for (j=0 ; j<nt ; j++) {
454 for (i=0 ; i<nr ; i++) {
455 *po += (*pi) * cheb[2*i + 1 - m] ;
473 (
double* ti,
const int nr,
const int nt,
const int np,
const double x,
double* trtp) {
481 double* cheb =
new double [2*nr] ;
484 for (i=2 ; i<2*nr ; i++) {
485 cheb[i] = 2*x* cheb[i-1] - cheb[i-2] ;
489 for (j=0 ; j<nt ; j++) {
494 for (i=0 ; i<nr ; i++) {
495 *po += (*pi) * cheb[2*i] ;
502 for (i=0 ; i<nr ; i++) {
503 *po += (*pi) * cheb[2*i+1] ;
517 for (k=2 ; k<np+1 ; k++) {
518 for (j=0 ; j<nt ; j++) {
522 for (i=0 ; i<nr ; i++) {
523 *po += (*pi) * cheb[2*i + l] ;
541 (
double* ti,
const int nr,
const int nt,
const int np,
const double x,
double* trtp) {
549 double* cheb =
new double [2*nr] ;
552 for (i=2 ; i<2*nr ; i++) {
553 cheb[i] = 2*x* cheb[i-1] - cheb[i-2] ;
557 for (j=0 ; j<nt ; j++) {
562 for (i=0 ; i<nr ; i++) {
563 *po += (*pi) * cheb[2*i] ;
570 for (i=0 ; i<nr ; i++) {
571 *po += (*pi) * cheb[2*i+1] ;
585 for (k=2 ; k<np+1 ; k++) {
586 for (j=0 ; j<nt ; j++) {
590 for (i=0 ; i<nr ; i++) {
591 *po += (*pi) * cheb[2*i + 1 - l] ;
608 (
double* ti,
const int nr,
const int nt,
const int np,
const double x,
617 double* leg =
new double [nr] ;
619 if (nr > 1) leg[1] = x ;
620 for (i=2; i<nr; i++) {
621 leg[i] = (double(2*i-1)*x* leg[i-1] - double(i-1)*leg[i-2]) /
double(i) ;
625 for (j=0 ; j<nt ; j++) {
628 for (i=0 ; i<nr ; i++) {
629 *po += (*pi) * leg[i] ;
642 for (k=2 ; k<np+1 ; k++) {
643 for (j=0 ; j<nt ; j++) {
646 for (i=0 ; i<nr ; i++) {
647 *po += (*pi) * leg[i] ;
667 (
double* ti,
const int nr,
const int nt,
const int np,
const double x,
676 double* leg =
new double [nr] ;
679 for (i=1; i<nr; i++) {
680 leg[i] = (double(4*i-1)*x* p2im1 - double(2*i-1)*leg[i-1]) /
double(2*i) ;
681 p2im1 = (double(4*i+1)*x* leg[i] - double(2*i)*p2im1) /
double(2*i+1) ;
685 for (j=0 ; j<nt ; j++) {
688 for (i=0 ; i<nr ; i++) {
689 *po += (*pi) * leg[i] ;
702 for (k=2 ; k<np+1 ; k++) {
703 for (j=0 ; j<nt ; j++) {
706 for (i=0 ; i<nr ; i++) {
707 *po += (*pi) * leg[i] ;
726 (
double* ti,
const int nr,
const int nt,
const int np,
const double x,
735 double* leg =
new double [nr] ;
738 for (i=1; i<nr; i++) {
739 p2im1 = (double(4*i-1)*x* leg[i-1] - double(2*i-1)*p2im1) /
double(2*i) ;
740 leg[i] = (double(4*i+1)*x* p2im1 - double(2*i)*leg[i-1]) /
double(2*i+1) ;
744 for (j=0 ; j<nt ; j++) {
747 for (i=0 ; i<nr ; i++) {
748 *po += (*pi) * leg[i] ;
761 for (k=2 ; k<np+1 ; k++) {
762 for (j=0 ; j<nt ; j++) {
765 for (i=0 ; i<nr ; i++) {
766 *po += (*pi) * leg[i] ;
784 (
double* ti,
const int nr,
const int nt,
const int np,
const double x,
793 double* jaco = jacobi(nr-1,x) ;
796 for (j=0 ; j<nt ; j++) {
799 for (i=0 ; i<nr ; i++) {
800 *po += (*pi) * jaco[i] ;
813 for (k=2 ; k<np+1 ; k++) {
814 for (j=0 ; j<nt ; j++) {
817 for (i=0 ; i<nr ; i++) {
818 *po += (*pi) * jaco[i] ;