87 assert(source_mat.
get_etat() != ETATNONDEF) ;
88 assert(source_quad.
get_etat() != ETATNONDEF) ;
89 assert(source_mat.
get_mp()->get_mg() == mg) ;
90 assert(source_quad.
get_mp()->get_mg() == mg) ;
91 assert(uu.
get_mp()->get_mg() == mg) ;
95 int mpsymm = uu.
get_mp()->get_mg()->get_type_t();
102 if ( (source_mat.
get_etat() == ETATZERO)
103 && (source_quad.
get_etat() == ETATZERO) ) {
115 int nz = mg->get_nzone() ;
117 int nt = mg->get_nt(0) ;
134 int* ndl =
new int[nz+4] ;
136 for (
int l=0; l<nz; l++) {
137 ndl[1+l] = mg->get_nr(l) ;
145 int* indd =
new int[nz] ;
146 for (
int l=0; l<nz; l++) {
147 switch ( mg->get_type_r(l) ) {
161 cout <<
"Map_af::poisson2d: unknown type_r !" << endl ;
171 for (
int l=0; l<nz ; l++) {
172 nrmax = ( ndl[1+l] > nrmax ) ? ndl[1+l] : nrmax ;
174 int ndr = nrmax + 5 ;
183 double* erre =
new double [ndz*ndr] ;
185 for (
int l=0; l<nz; l++) {
186 for (
int i=0; i<ndl[1+l]; i++) {
187 double xr = mg->get_grille3d(l)->x[i] ;
188 erre[ ndr*l + i ] =
alpha[l] * xr +
beta[l] ;
196 int ndrtp = ndr*ndt*ndp ;
197 int taille = ndrtp*ndz ;
199 double* tsou_m =
new double[ taille ] ;
200 double* tsou_q =
new double[ taille ] ;
201 double* tuu =
new double[ taille ] ;
204 for (
int i=0; i<taille; i++) {
212 const Valeur& va_m = source_mat.
va ;
213 assert(va_m.
get_etat() == ETATQCQ) ;
215 const Mtbl* s_m = va_m.
c ;
216 assert(s_m->
get_etat() == ETATQCQ) ;
220 for (
int l=0; l<nz; l++) {
221 int nr = mg->get_nr(l) ;
224 for (
int k=0; k<np1; k++) {
225 for (
int j=0; j<nt; j++) {
226 for (
int i=0; i<nr; i++) {
227 tsou_m[ndrtp*l + ndrt*k + ndr*j + i] = 0 ;
229 if ( mpsymm == SYM ) tsou_m[ndrtp*l + ndrt*k + ndr*(nt2-1-j) + i] = 0 ;
236 assert( s_m->
t[l]->
get_etat() == ETATQCQ ) ;
237 for (
int k=0; k<np1; k++) {
238 for (
int j=0; j<nt; j++) {
239 for (
int i=0; i<nr; i++) {
240 double xx = s_m->
t[l]->
t[nrt*k + nr*j + i] ;
241 tsou_m[ndrtp*l + ndrt*k + ndr*j + i] = xx ;
243 if ( mpsymm == SYM ) tsou_m[ndrtp*l + ndrt*k + ndr*(nt2-1-j) + i] = xx ;
253 if (source_quad.
get_etat() != ETATZERO) {
255 const Valeur& va_q = source_quad.
va ;
256 assert(va_q.
get_etat() == ETATQCQ) ;
258 const Mtbl* s_q = va_q.
c ;
260 assert( va_q.
base == base_s ) ;
262 assert(s_q->
get_etat() == ETATQCQ) ;
264 for (
int l=0; l<nz; l++) {
265 int nr = mg->get_nr(l) ;
268 for (
int k=0; k<np1; k++) {
269 for (
int j=0; j<nt; j++) {
270 for (
int i=0; i<nr; i++) {
271 tsou_q[ndrtp*l + ndrt*k + ndr*j + i] = 0 ;
273 if ( mpsymm == SYM ) tsou_q[ndrtp*l + ndrt*k + ndr*(nt2-1-j) + i] = 0 ;
280 assert( s_q->
t[l]->
get_etat() == ETATQCQ ) ;
281 for (
int k=0; k<np1; k++) {
282 for (
int j=0; j<nt; j++) {
283 for (
int i=0; i<nr; i++) {
284 double xx = s_q->
t[l]->
t[nrt*k + nr*j + i] ;
285 tsou_q[ndrtp*l + ndrt*k + ndr*j + i] = xx ;
287 if ( mpsymm == SYM ) tsou_q[ndrtp*l + ndrt*k + ndr*(nt2-1-j) + i] = xx ;
300 int base_t = (va_m.
base).get_base_t(0) ;
311 F77_poiss2d(ndl, &ndr, &ndt, &ndp, indd, erre, tsou_m, tsou_q,
322 double* tsou =
new double[taille] ;
323 for (
int i=0; i<taille; i++) {
324 tsou[i] = tsou_m[i] + tsou_q[i] ;
327 F77_poiss2di(ndl, &ndr, &ndt, &ndp, indd, erre, tsou, tuu) ;
338 cout <<
"Map_af::poisson2d : unkown theta basis !" << endl ;
339 cout <<
" basis : " << hex << base_t << endl ;
350 (uu.
va).set_etat_c_qcq() ;
353 for (
int l=0; l<nz; l++) {
354 int nr = mg->get_nr(l) ;
355 for (
int k=0; k<mg->get_np(l); k++) {
356 for (
int j=0; j<nt; j++) {
357 for (
int i=0; i<nr; i++) {
358 uu.
set(l, k, j, i) = tuu[ndrtp*l + ndr*j + i] ;
364 (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.