84 assert(source_mat.
get_etat() != ETATNONDEF) ;
85 assert(source_quad.
get_etat() != ETATNONDEF) ;
86 assert(source_mat.
get_mp()->get_mg() == mg) ;
87 assert(source_quad.
get_mp()->get_mg() == mg) ;
88 assert(uu.
get_mp()->get_mg() == mg) ;
92 int mpsymm = uu.
get_mp()->get_mg()->get_type_t();
99 if ( (source_mat.
get_etat() == ETATZERO)
100 && (source_quad.
get_etat() == ETATZERO) ) {
112 int nz = mg->get_nzone() ;
114 int nt = mg->get_nt(0) ;
131 int* ndl =
new int[nz+4] ;
133 for (
int l=0; l<nz; l++) {
134 ndl[1+l] = mg->get_nr(l) ;
142 int* indd =
new int[nz] ;
143 for (
int l=0; l<nz; l++) {
144 switch ( mg->get_type_r(l) ) {
158 cout <<
"Map_af::poisson2d: unknown type_r !" << endl ;
168 for (
int l=0; l<nz ; l++) {
169 nrmax = ( ndl[1+l] > nrmax ) ? ndl[1+l] : nrmax ;
171 int ndr = nrmax + 5 ;
180 double* erre =
new double [ndz*ndr] ;
182 for (
int l=0; l<nz; l++) {
183 for (
int i=0; i<ndl[1+l]; i++) {
184 double xr = mg->get_grille3d(l)->x[i] ;
185 erre[ ndr*l + i ] =
alpha[l] * xr +
beta[l] ;
193 int ndrtp = ndr*ndt*ndp ;
194 int taille = ndrtp*ndz ;
196 double* tsou_m =
new double[ taille ] ;
197 double* tsou_q =
new double[ taille ] ;
198 double* tuu =
new double[ taille ] ;
201 for (
int i=0; i<taille; i++) {
209 const Valeur& va_m = source_mat.
va ;
210 assert(va_m.
get_etat() == ETATQCQ) ;
212 const Mtbl* s_m = va_m.
c ;
213 assert(s_m->
get_etat() == ETATQCQ) ;
217 for (
int l=0; l<nz; l++) {
218 int nr = mg->get_nr(l) ;
221 for (
int k=0; k<np1; k++) {
222 for (
int j=0; j<nt; j++) {
223 for (
int i=0; i<nr; i++) {
224 tsou_m[ndrtp*l + ndrt*k + ndr*j + i] = 0 ;
226 if ( mpsymm == SYM ) tsou_m[ndrtp*l + ndrt*k + ndr*(nt2-1-j) + i] = 0 ;
233 assert( s_m->
t[l]->
get_etat() == ETATQCQ ) ;
234 for (
int k=0; k<np1; k++) {
235 for (
int j=0; j<nt; j++) {
236 for (
int i=0; i<nr; i++) {
237 double xx = s_m->
t[l]->
t[nrt*k + nr*j + i] ;
238 tsou_m[ndrtp*l + ndrt*k + ndr*j + i] = xx ;
240 if ( mpsymm == SYM ) tsou_m[ndrtp*l + ndrt*k + ndr*(nt2-1-j) + i] = xx ;
250 if (source_quad.
get_etat() != ETATZERO) {
252 const Valeur& va_q = source_quad.
va ;
253 assert(va_q.
get_etat() == ETATQCQ) ;
255 const Mtbl* s_q = va_q.
c ;
257 assert( va_q.
base == base_s ) ;
259 assert(s_q->
get_etat() == ETATQCQ) ;
261 for (
int l=0; l<nz; l++) {
262 int nr = mg->get_nr(l) ;
265 for (
int k=0; k<np1; k++) {
266 for (
int j=0; j<nt; j++) {
267 for (
int i=0; i<nr; i++) {
268 tsou_q[ndrtp*l + ndrt*k + ndr*j + i] = 0 ;
270 if ( mpsymm == SYM ) tsou_q[ndrtp*l + ndrt*k + ndr*(nt2-1-j) + i] = 0 ;
277 assert( s_q->
t[l]->
get_etat() == ETATQCQ ) ;
278 for (
int k=0; k<np1; k++) {
279 for (
int j=0; j<nt; j++) {
280 for (
int i=0; i<nr; i++) {
281 double xx = s_q->
t[l]->
t[nrt*k + nr*j + i] ;
282 tsou_q[ndrtp*l + ndrt*k + ndr*j + i] = xx ;
284 if ( mpsymm == SYM ) tsou_q[ndrtp*l + ndrt*k + ndr*(nt2-1-j) + i] = xx ;
297 int base_t = (va_m.
base).get_base_t(0) ;
308 F77_poiss2d(ndl, &ndr, &ndt, &ndp, indd, erre, tsou_m, tsou_q,
319 double* tsou =
new double[taille] ;
320 for (
int i=0; i<taille; i++) {
321 tsou[i] = tsou_m[i] + tsou_q[i] ;
324 F77_poiss2di(ndl, &ndr, &ndt, &ndp, indd, erre, tsou, tuu) ;
335 cout <<
"Map_af::poisson2d : unkown theta basis !" << endl ;
336 cout <<
" basis : " << hex << base_t << endl ;
347 (uu.
va).set_etat_c_qcq() ;
350 for (
int l=0; l<nz; l++) {
351 int nr = mg->get_nr(l) ;
352 for (
int k=0; k<mg->get_np(l); k++) {
353 for (
int j=0; j<nt; j++) {
354 for (
int i=0; i<nr; i++) {
355 uu.
set(l, k, j, i) = tuu[ndrtp*l + ndr*j + i] ;
361 (uu.
va).set_base( base_uu ) ;
virtual void poisson2d(const Cmp &source_mat, const Cmp &source_quad, Param &par, Cmp &uu) const
Computes the solution of a 2-D Poisson equation.