60 #include "utilitaires.h" 66 void cirleg(
const int* deg,
const int* dimc,
double* cf,
const int* dimf,
84 cout <<
"cirleg: nr > n3c : nr = " << nr <<
" , n3c = " 90 cout <<
"cirleg: nr > n3f : nr = " << nr <<
" , n3f = " 96 cout <<
"cirleg: n1c > n1f : n1c = " << n1c <<
" , n1f = " 102 cout <<
"cirleg: n2c > n2f : n2c = " << n2c <<
" , n2f = " 110 int n2n3f = n2f * n3f ;
111 int n2n3c = n2c * n3c ;
119 int borne_phi = ( n1c > 1 ) ? n1c-1 : 1 ;
121 double* colloc =
new double[nr] ;
122 legendre_collocation_points(nr, colloc) ;
124 for (
int j=0; j< borne_phi; j++) {
128 for (
int k=0; k<n2c; k++) {
130 int i0 = n2n3c * j + n3c * k ;
131 double* cf0 = cf + i0 ;
133 i0 = n2n3f * j + n3f * k ;
134 double* ff0 = ff + i0 ;
136 for (
int i = 0; i<nr; i++) {
137 double x0 = colloc[i] ;
140 double som = cf0[0] + cf0[1]*x0 ;
141 for (
int h=2; h<nr; h++) {
142 double Pip2 = (2. - 1./double(h))*x0*Pip1
143 - (1. - 1./
double(h))*Pi ;
157 void cirlegp(
const int* deg,
const int* dimc,
double* cf,
158 const int* dimf,
double* ff)
175 cout <<
"cirlegp: nr > n3c : nr = " << nr <<
" , n3c = " 181 cout <<
"cirlegp: nr > n3f : nr = " << nr <<
" , n3f = " 187 cout <<
"cirlegp: n1c > n1f : n1c = " << n1c <<
" , n1f = " 193 cout <<
"cirlegp: n2c > n2f : n2c = " << n2c <<
" , n2f = " 201 int dnm1 = 2*nr - 1 ;
205 int n2n3f = n2f * n3f ;
206 int n2n3c = n2c * n3c ;
214 int borne_phi = ( n1c > 1 ) ? n1c-1 : 1 ;
216 double* colloc =
new double[dnm1] ;
217 legendre_collocation_points(dnm1, colloc) ;
219 for (
int j=0; j< borne_phi; j++) {
223 for (
int k=0; k<n2c; k++) {
225 int i0 = n2n3c * j + n3c * k ;
226 double* cf0 = cf + i0 ;
228 i0 = n2n3f * j + n3f * k ;
229 double* ff0 = ff + i0 ;
231 for (
int i = 0; i<nr; i++) {
232 double x0 = colloc[nm1+i] ;
235 double som = cf0[0] ;
236 for (
int h=2; h<dnm1; h++) {
237 double Pip2 = (2. - 1./double(h))*x0*Pip1
238 - (1. - 1./
double(h))*Pi ;
239 if (h%2 == 0) som += cf0[h/2]*Pip2 ;
255 void cirlegi(
const int* deg,
const int* dimc,
double* cf,
256 const int* dimf,
double* ff)
273 cout <<
"cirlegi: nr > n3c : nr = " << nr <<
" , n3c = " 279 cout <<
"cirlegi: nr > n3f : nr = " << nr <<
" , n3f = " 285 cout <<
"cirlegi: n1c > n1f : n1c = " << n1c <<
" , n1f = " 291 cout <<
"cirlegi: n2c > n2f : n2c = " << n2c <<
" , n2f = " 299 int dnm1 = 2*nr - 1 ;
303 int n2n3f = n2f * n3f ;
304 int n2n3c = n2c * n3c ;
312 int borne_phi = ( n1c > 1 ) ? n1c-1 : 1 ;
314 double* colloc =
new double[dnm1] ;
315 legendre_collocation_points(dnm1, colloc) ;
317 for (
int j=0; j< borne_phi; j++) {
321 for (
int k=0; k<n2c; k++) {
323 int i0 = n2n3c * j + n3c * k ;
324 double* cf0 = cf + i0 ;
326 i0 = n2n3f * j + n3f * k ;
327 double* ff0 = ff + i0 ;
329 for (
int i = 0; i<nr; i++) {
330 double x0 = colloc[nm1+i] ;
333 double som = cf0[0]*x0 ;
334 for (
int h=2; h<dnm1; h++) {
335 double Pip2 = (2. - 1./double(h))*x0*Pip1
336 - (1. - 1./
double(h))*Pi ;
337 if (h%2 == 1) som += cf0[h/2]*Pip2 ;