119 Mtbl* map_af_fait_r(
const Map* cvi) {
122 const Map_af* cv =
static_cast<const Map_af*
>(cvi) ;
123 const Mg3d* mg = cv->
get_mg() ;
127 Mtbl* mti =
new Mtbl(mg) ;
128 mti->set_etat_qcq() ;
131 double* alpha = cv->alpha ;
132 double* beta = cv->beta ;
135 for (
int l=0 ; l<nz ; l++) {
136 int ir = mg->get_nr(l);
137 int it = mg->get_nt(l) ;
138 int ip = mg->get_np(l) ;
139 const Grille3d* g = mg->get_grille3d(l) ;
140 Tbl* tb = (mti->t)[l] ;
142 double* p_r = tb->t ;
144 switch(mg->get_type_r(l)) {
146 for (k=0 ; k<ip ; k++) {
147 for (j=0 ; j<it ; j++) {
148 for (i=0 ; i<ir ; i++) {
149 *p_r = alpha[l] * (g->x)[i] + beta[l] ;
157 for (k=0 ; k<ip ; k++) {
158 for (j=0 ; j<it ; j++) {
159 for (i=0 ; i<ir ; i++) {
160 *p_r = 1./(alpha[l] * (g->x)[i] + beta[l]) ;
168 cout <<
"Map_af_fait_r: unknown type_r !\n" ;
183 Mtbl* map_af_fait_tet(
const Map* cvi) {
186 const Map_af* cv =
static_cast<const Map_af*
>(cvi) ;
187 const Mg3d* mg = cv->
get_mg() ;
191 Mtbl* mti =
new Mtbl(mg) ;
192 mti->set_etat_qcq() ;
195 for (
int l=0 ; l<nz ; l++) {
196 int ir = mg->get_nr(l);
197 int it = mg->get_nt(l);
198 int ip = mg->get_np(l);
199 const Grille3d* g = mg->get_grille3d(l) ;
200 Tbl* tb = (mti->t)[l] ;
202 double* p_r = tb->t ;
203 for (k=0 ; k<ip ; k++) {
204 for (j=0 ; j<it ; j++) {
205 for (i=0 ; i<ir ; i++) {
221 Mtbl* map_af_fait_phi(
const Map* cvi) {
224 const Map_af* cv =
static_cast<const Map_af*
>(cvi) ;
225 const Mg3d* mg = cv->
get_mg() ;
229 Mtbl* mti =
new Mtbl(mg) ;
230 mti->set_etat_qcq() ;
233 for (
int l=0 ; l<nz ; l++) {
234 int ir = mg->get_nr(l);
235 int it = mg->get_nt(l);
236 int ip = mg->get_np(l);
237 const Grille3d* g = mg->get_grille3d(l) ;
238 Tbl* tb = (mti->t)[l] ;
240 double* p_r = tb->t ;
241 for (k=0 ; k<ip ; k++) {
242 for (j=0 ; j<it ; j++) {
243 for (i=0 ; i<ir ; i++) {
259 Mtbl* map_af_fait_x(
const Map* cvi) {
262 const Mg3d* mg = cvi->
get_mg() ;
265 Mtbl* mti =
new Mtbl(mg) ;
267 *mti = (cvi->r) * (cvi->sint) * (cvi->cosp) ;
277 Mtbl* map_af_fait_y(
const Map* cvi) {
280 const Mg3d* mg = cvi->
get_mg() ;
283 Mtbl* mti =
new Mtbl(mg) ;
285 *mti = (cvi->r) * (cvi->sint) * (cvi->sinp) ;
295 Mtbl* map_af_fait_z(
const Map* cvi) {
298 const Mg3d* mg = cvi->
get_mg() ;
301 Mtbl* mti =
new Mtbl(mg) ;
303 *mti = (cvi->r) * (cvi->cost) ;
313 Mtbl* map_af_fait_xa(
const Map* cvi) {
316 const Mg3d* mg = cvi->
get_mg() ;
319 Mtbl* mti =
new Mtbl(mg) ;
321 double r_phi = cvi->get_rot_phi() ;
322 double t_x = cvi->get_ori_x() ;
324 if ( fabs(r_phi) < 1.e-14 ) {
325 *mti = (cvi->x) + t_x ;
327 else if ( fabs(r_phi - M_PI) < 1.e-14 ) {
328 *mti = - (cvi->x) + t_x ;
331 Mtbl phi = cvi->phi + r_phi ;
332 *mti = (cvi->r) * (cvi->sint) *
cos(phi) + t_x ;
343 Mtbl* map_af_fait_ya(
const Map* cvi) {
346 const Mg3d* mg = cvi->
get_mg() ;
349 Mtbl* mti =
new Mtbl(mg) ;
351 double r_phi = cvi->get_rot_phi() ;
352 double t_y = cvi->get_ori_y() ;
354 if ( fabs(r_phi) < 1.e-14 ) {
355 *mti = (cvi->y) + t_y ;
357 else if ( fabs(r_phi - M_PI) < 1.e-14 ) {
358 *mti = - (cvi->y) + t_y ;
361 Mtbl phi = cvi->phi + r_phi ;
362 *mti = (cvi->r) * (cvi->sint) *
sin(phi) + t_y ;
373 Mtbl* map_af_fait_za(
const Map* cvi) {
376 const Mg3d* mg = cvi->
get_mg() ;
378 double t_z = cvi->get_ori_z() ;
381 Mtbl* mti =
new Mtbl(mg) ;
383 *mti = (cvi->r) * (cvi->cost) + t_z ;
393 Mtbl* map_af_fait_sint(
const Map* cvi) {
396 const Map_af* cv =
static_cast<const Map_af*
>(cvi) ;
397 const Mg3d* mg = cv->
get_mg() ;
401 Mtbl* mti =
new Mtbl(mg) ;
402 mti->set_etat_qcq() ;
405 for (
int l=0 ; l<nz ; l++) {
406 int ir = mg->get_nr(l);
407 int it = mg->get_nt(l);
408 int ip = mg->get_np(l);
409 const Grille3d* g = mg->get_grille3d(l) ;
410 Tbl* tb = (mti->t)[l] ;
412 double* p_r = tb->t ;
413 for (k=0 ; k<ip ; k++) {
414 for (j=0 ; j<it ; j++) {
415 for (i=0 ; i<ir ; i++) {
416 *p_r =
sin(g->tet[j]) ;
427 Mtbl* map_af_fait_cost(
const Map* cvi) {
430 const Map_af* cv =
static_cast<const Map_af*
>(cvi) ;
431 const Mg3d* mg = cv->
get_mg() ;
435 Mtbl* mti =
new Mtbl(mg) ;
436 mti->set_etat_qcq() ;
439 for (
int l=0 ; l<nz ; l++) {
440 int ir = mg->get_nr(l);
441 int it = mg->get_nt(l);
442 int ip = mg->get_np(l);
443 const Grille3d* g = mg->get_grille3d(l) ;
444 Tbl* tb = (mti->t)[l] ;
446 double* p_r = tb->t ;
447 for (k=0 ; k<ip ; k++) {
448 for (j=0 ; j<it ; j++) {
449 for (i=0 ; i<ir ; i++) {
450 *p_r =
cos(g->tet[j]) ;
461 Mtbl* map_af_fait_sinp(
const Map* cvi) {
464 const Map_af* cv =
static_cast<const Map_af*
>(cvi) ;
465 const Mg3d* mg = cv->
get_mg() ;
469 Mtbl* mti =
new Mtbl(mg) ;
470 mti->set_etat_qcq() ;
473 for (
int l=0 ; l<nz ; l++) {
474 int ir = mg->get_nr(l);
475 int it = mg->get_nt(l);
476 int ip = mg->get_np(l);
477 const Grille3d* g = mg->get_grille3d(l) ;
478 Tbl* tb = (mti->t)[l] ;
480 double* p_r = tb->t ;
481 for (k=0 ; k<ip ; k++) {
482 for (j=0 ; j<it ; j++) {
483 for (i=0 ; i<ir ; i++) {
484 *p_r =
sin(g->phi[k]) ;
495 Mtbl* map_af_fait_cosp(
const Map* cvi) {
498 const Map_af* cv =
static_cast<const Map_af*
>(cvi) ;
499 const Mg3d* mg = cv->
get_mg() ;
503 Mtbl* mti =
new Mtbl(mg) ;
504 mti->set_etat_qcq() ;
507 for (
int l=0 ; l<nz ; l++) {
508 int ir = mg->get_nr(l);
509 int it = mg->get_nt(l);
510 int ip = mg->get_np(l);
511 const Grille3d* g = mg->get_grille3d(l) ;
512 Tbl* tb = (mti->t)[l] ;
514 double* p_r = tb->t ;
515 for (k=0 ; k<ip ; k++) {
516 for (j=0 ; j<it ; j++) {
517 for (i=0 ; i<ir ; i++) {
518 *p_r =
cos(g->phi[k]) ;
535 Mtbl* map_af_fait_xsr(
const Map* cvi) {
538 const Map_af* cv =
static_cast<const Map_af*
>(cvi) ;
539 const Mg3d* mg = cv->
get_mg() ;
543 Mtbl* mti =
new Mtbl(mg) ;
544 mti->set_etat_qcq() ;
547 double* alpha = cv->alpha ;
548 double* beta = cv->beta ;
551 for (
int l=0 ; l<nz ; l++) {
552 int ir = mg->get_nr(l);
553 int it = mg->get_nt(l) ;
554 int ip = mg->get_np(l) ;
555 const Grille3d* g = mg->get_grille3d(l) ;
556 Tbl* tb = (mti->t)[l] ;
558 double* p_r = tb->t ;
560 switch(mg->get_type_r(l)) {
564 for (k=0 ; k<ip ; k++) {
565 for (j=0 ; j<it ; j++) {
566 for (i=0 ; i<ir ; i++) {
567 *p_r = 1. / alpha[l] ;
575 for (k=0 ; k<ip ; k++) {
576 for (j=0 ; j<it ; j++) {
578 *p_r = 1. / beta[l] ;
582 for (i=0 ; i<ir ; i++) {
583 *p_r = 1. / ( alpha[l] * (g->x)[i] + beta[l] ) ;
591 assert(beta[l] == - alpha[l]) ;
592 for (k=0 ; k<ip ; k++) {
593 for (j=0 ; j<it ; j++) {
594 for (i=0 ; i<ir ; i++) {
595 *p_r = 1. / alpha[l] ;
603 cout <<
"map_af_fait_xsr: unknown type_r !" << endl ;
620 Mtbl* map_af_fait_dxdr(
const Map* cvi) {
623 const Map_af* cv =
static_cast<const Map_af*
>(cvi) ;
624 const Mg3d* mg = cv->
get_mg() ;
628 Mtbl* mti =
new Mtbl(mg) ;
629 mti->set_etat_qcq() ;
632 double* alpha = cv->alpha ;
635 for (
int l=0 ; l<nz ; l++) {
636 int ir = mg->get_nr(l);
637 int it = mg->get_nt(l) ;
638 int ip = mg->get_np(l) ;
639 Tbl* tb = (mti->t)[l] ;
641 double* p_r = tb->t ;
643 switch(mg->get_type_r(l)) {
646 for (k=0 ; k<ip ; k++) {
647 for (j=0 ; j<it ; j++) {
648 for (i=0 ; i<ir ; i++) {
649 *p_r = 1. / alpha[l] ;
657 for (k=0 ; k<ip ; k++) {
658 for (j=0 ; j<it ; j++) {
659 for (i=0 ; i<ir ; i++) {
660 *p_r = - 1. / alpha[l] ;
669 cout <<
"map_af_fait_dxdr: unknown type_r !" << endl ;
684 Mtbl* map_af_fait_drdt(
const Map* cvi) {
687 const Mg3d* mg = cvi->
get_mg() ;
690 Mtbl* mti =
new Mtbl(mg) ;
691 mti->set_etat_zero() ;
702 Mtbl* map_af_fait_stdrdp(
const Map* cvi) {
705 const Mg3d* mg = cvi->
get_mg() ;
708 Mtbl* mti =
new Mtbl(mg) ;
709 mti->set_etat_zero() ;
720 Mtbl* map_af_fait_srdrdt(
const Map* cvi) {
723 const Mg3d* mg = cvi->
get_mg() ;
726 Mtbl* mti =
new Mtbl(mg) ;
727 mti->set_etat_zero() ;
738 Mtbl* map_af_fait_srstdrdp(
const Map* cvi) {
741 const Mg3d* mg = cvi->
get_mg() ;
744 Mtbl* mti =
new Mtbl(mg) ;
745 mti->set_etat_zero() ;
756 Mtbl* map_af_fait_sr2drdt(
const Map* cvi) {
759 const Mg3d* mg = cvi->
get_mg() ;
762 Mtbl* mti =
new Mtbl(mg) ;
763 mti->set_etat_zero() ;
774 Mtbl* map_af_fait_sr2stdrdp(
const Map* cvi) {
777 const Mg3d* mg = cvi->
get_mg() ;
780 Mtbl* mti =
new Mtbl(mg) ;
781 mti->set_etat_zero() ;
792 Mtbl* map_af_fait_d2rdx2(
const Map* cvi) {
795 const Mg3d* mg = cvi->
get_mg() ;
798 Mtbl* mti =
new Mtbl(mg) ;
799 mti->set_etat_zero() ;
810 Mtbl* map_af_fait_lapr_tp(
const Map* cvi) {
813 const Mg3d* mg = cvi->
get_mg() ;
816 Mtbl* mti =
new Mtbl(mg) ;
817 mti->set_etat_zero() ;
828 Mtbl* map_af_fait_d2rdtdx(
const Map* cvi) {
831 const Mg3d* mg = cvi->
get_mg() ;
834 Mtbl* mti =
new Mtbl(mg) ;
835 mti->set_etat_zero() ;
846 Mtbl* map_af_fait_sstd2rdpdx(
const Map* cvi) {
849 const Mg3d* mg = cvi->
get_mg() ;
852 Mtbl* mti =
new Mtbl(mg) ;
853 mti->set_etat_zero() ;
864 Mtbl* map_af_fait_sr2d2rdt2(
const Map* cvi) {
867 const Mg3d* mg = cvi->
get_mg() ;
870 Mtbl* mti =
new Mtbl(mg) ;
871 mti->set_etat_zero() ;
Cmp cos(const Cmp &)
Cosine.
int get_nzone() const
Returns the number of domains.
Cmp sin(const Cmp &)
Sine.
const Mg3d * get_mg() const
Gives the Mg3d on which the Mtbl is defined.