56 const Valeur& beta = cv->get_beta() ;
59 for (
int l=0 ; l<nz ; l++) {
64 Tbl* tb = (mti->
t)[l] ;
70 for (k=0 ; k<ip ; k++) {
71 for (j=0 ; j<it ; j++) {
72 for (i=0 ; i<ir ; i++) {
73 *p_r = alpha(l,k,j,0) * (g->
x)[i] + beta(l,k,j,0) ;
87 for (k=0 ; k<ip ; k++) {
88 for (j=0 ; j<it ; j++) {
89 for (i=0 ; i<ir ; i++) {
90 cout <<
"map_eps_fait_r: Warning ! No compactified zone allowed !" << endl;
98 cout <<
"map_eps_fait_r: unknown type_r !\n" ;
113 Mtbl* map_eps_fait_tet(
const Map* cvi) {
125 for (
int l=0 ; l<nz ; l++) {
130 Tbl* tb = (mti->
t)[l] ;
132 double* p_r = tb->
t ;
133 for (k=0 ; k<ip ; k++) {
134 for (j=0 ; j<it ; j++) {
135 for (i=0 ; i<ir ; i++) {
151 Mtbl* map_eps_fait_phi(
const Map* cvi) {
154 const Map_eps* cv =
static_cast<const Map_eps*
>(cvi) ;
155 const Mg3d* mg = cv->get_mg() ;
159 Mtbl* mti =
new Mtbl(mg) ;
160 mti->set_etat_qcq() ;
163 for (
int l=0 ; l<nz ; l++) {
164 int ir = mg->get_nr(l);
165 int it = mg->get_nt(l);
166 int ip = mg->get_np(l);
167 const Grille3d* g = mg->get_grille3d(l) ;
168 Tbl* tb = (mti->t)[l] ;
170 double* p_r = tb->t ;
171 for (k=0 ; k<ip ; k++) {
172 for (j=0 ; j<it ; j++) {
173 for (i=0 ; i<ir ; i++) {
189 Mtbl* map_eps_fait_x(
const Map* cvi) {
192 const Mg3d* mg = cvi->
get_mg() ;
195 Mtbl* mti =
new Mtbl(mg) ;
197 *mti = (cvi->r) * (cvi->sint) * (cvi->cosp) ;
207 Mtbl* map_eps_fait_y(
const Map* cvi) {
210 const Mg3d* mg = cvi->
get_mg() ;
213 Mtbl* mti =
new Mtbl(mg) ;
215 *mti = (cvi->r) * (cvi->sint) * (cvi->sinp) ;
225 Mtbl* map_eps_fait_z(
const Map* cvi) {
228 const Mg3d* mg = cvi->
get_mg() ;
231 Mtbl* mti =
new Mtbl(mg) ;
233 *mti = (cvi->r) * (cvi->cost) ;
243 Mtbl* map_eps_fait_xa(
const Map* cvi) {
246 const Mg3d* mg = cvi->
get_mg() ;
249 Mtbl* mti =
new Mtbl(mg) ;
251 double r_phi = cvi->get_rot_phi() ;
252 double t_x = cvi->get_ori_x() ;
254 if ( fabs(r_phi) < 1.e-14 ) {
255 *mti = (cvi->x) + t_x ;
257 else if ( fabs(r_phi - M_PI) < 1.e-14 ) {
258 *mti = - (cvi->x) + t_x ;
261 Mtbl phi = cvi->phi + r_phi ;
262 *mti = (cvi->r) * (cvi->sint) *
cos(phi) + t_x ;
273 Mtbl* map_eps_fait_ya(
const Map* cvi) {
276 const Mg3d* mg = cvi->
get_mg() ;
279 Mtbl* mti =
new Mtbl(mg) ;
281 double r_phi = cvi->get_rot_phi() ;
282 double t_y = cvi->get_ori_y() ;
284 if ( fabs(r_phi) < 1.e-14 ) {
285 *mti = (cvi->y) + t_y ;
287 else if ( fabs(r_phi - M_PI) < 1.e-14 ) {
288 *mti = - (cvi->y) + t_y ;
291 Mtbl phi = cvi->phi + r_phi ;
292 *mti = (cvi->r) * (cvi->sint) *
sin(phi) + t_y ;
303 Mtbl* map_eps_fait_za(
const Map* cvi) {
306 const Mg3d* mg = cvi->
get_mg() ;
308 double t_z = cvi->get_ori_z() ;
311 Mtbl* mti =
new Mtbl(mg) ;
313 *mti = (cvi->r) * (cvi->cost) + t_z ;
323 Mtbl* map_eps_fait_sint(
const Map* cvi) {
326 const Map_eps* cv =
static_cast<const Map_eps*
>(cvi) ;
327 const Mg3d* mg = cv->
get_mg() ;
331 Mtbl* mti =
new Mtbl(mg) ;
332 mti->set_etat_qcq() ;
335 for (
int l=0 ; l<nz ; l++) {
336 int ir = mg->get_nr(l);
337 int it = mg->get_nt(l);
338 int ip = mg->get_np(l);
339 const Grille3d* g = mg->get_grille3d(l) ;
340 Tbl* tb = (mti->t)[l] ;
342 double* p_r = tb->t ;
343 for (k=0 ; k<ip ; k++) {
344 for (j=0 ; j<it ; j++) {
345 for (i=0 ; i<ir ; i++) {
346 *p_r =
sin(g->tet[j]) ;
357 Mtbl* map_eps_fait_cost(
const Map* cvi) {
360 const Map_eps* cv =
static_cast<const Map_eps*
>(cvi) ;
361 const Mg3d* mg = cv->
get_mg() ;
365 Mtbl* mti =
new Mtbl(mg) ;
366 mti->set_etat_qcq() ;
369 for (
int l=0 ; l<nz ; l++) {
370 int ir = mg->get_nr(l);
371 int it = mg->get_nt(l);
372 int ip = mg->get_np(l);
373 const Grille3d* g = mg->get_grille3d(l) ;
374 Tbl* tb = (mti->t)[l] ;
376 double* p_r = tb->t ;
377 for (k=0 ; k<ip ; k++) {
378 for (j=0 ; j<it ; j++) {
379 for (i=0 ; i<ir ; i++) {
380 *p_r =
cos(g->tet[j]) ;
391 Mtbl* map_eps_fait_sinp(
const Map* cvi) {
394 const Map_eps* cv =
static_cast<const Map_eps*
>(cvi) ;
395 const Mg3d* mg = cv->
get_mg() ;
399 Mtbl* mti =
new Mtbl(mg) ;
400 mti->set_etat_qcq() ;
403 for (
int l=0 ; l<nz ; l++) {
404 int ir = mg->get_nr(l);
405 int it = mg->get_nt(l);
406 int ip = mg->get_np(l);
407 const Grille3d* g = mg->get_grille3d(l) ;
408 Tbl* tb = (mti->t)[l] ;
410 double* p_r = tb->t ;
411 for (k=0 ; k<ip ; k++) {
412 for (j=0 ; j<it ; j++) {
413 for (i=0 ; i<ir ; i++) {
414 *p_r =
sin(g->phi[k]) ;
425 Mtbl* map_eps_fait_cosp(
const Map* cvi) {
428 const Map_eps* cv =
static_cast<const Map_eps*
>(cvi) ;
429 const Mg3d* mg = cv->
get_mg() ;
433 Mtbl* mti =
new Mtbl(mg) ;
434 mti->set_etat_qcq() ;
437 for (
int l=0 ; l<nz ; l++) {
438 int ir = mg->get_nr(l);
439 int it = mg->get_nt(l);
440 int ip = mg->get_np(l);
441 const Grille3d* g = mg->get_grille3d(l) ;
442 Tbl* tb = (mti->t)[l] ;
444 double* p_r = tb->t ;
445 for (k=0 ; k<ip ; k++) {
446 for (j=0 ; j<it ; j++) {
447 for (i=0 ; i<ir ; i++) {
448 *p_r =
cos(g->phi[k]) ;
465 Mtbl* map_eps_fait_xsr(
const Map* cvi) {
468 const Map_eps* cv =
static_cast<const Map_eps*
>(cvi) ;
469 const Mg3d* mg = cv->
get_mg() ;
473 Mtbl* mti =
new Mtbl(mg) ;
474 mti->set_etat_qcq() ;
477 const Valeur& alpha = cv->get_alpha() ;
478 const Valeur& beta = cv->get_beta() ;
481 for (
int l=0 ; l<nz ; l++) {
482 int ir = mg->get_nr(l);
483 int it = mg->get_nt(l) ;
484 int ip = mg->get_np(l) ;
485 const Grille3d* g = mg->get_grille3d(l) ;
486 Tbl* tb = (mti->t)[l] ;
488 double* p_r = tb->t ;
490 switch(mg->get_type_r(l)) {
493 assert(beta(l).get_etat()==ETATZERO) ;
494 for (k=0 ; k<ip ; k++) {
495 for (j=0 ; j<it ; j++) {
496 for (i=0 ; i<ir ; i++) {
497 *p_r = 1. / alpha(l,k,j,0) ;
505 for (k=0 ; k<ip ; k++) {
506 for (j=0 ; j<it ; j++) {
508 *p_r = 1. / beta(l,k,j,0) ;
512 for (i=0 ; i<ir ; i++) {
513 *p_r = 1. / ( alpha(l,k,j,0) * (g->x)[i] + beta(l,k,j,0) ) ;
521 cout <<
"map_eps_fait_xsr: Compactified domain not allowed !" << endl;
526 cout <<
"map_eps_fait_xsr: unknown type_r !" << endl ;
543 Mtbl* map_eps_fait_dxdr(
const Map* cvi) {
546 const Map_eps* cv =
static_cast<const Map_eps*
>(cvi) ;
547 const Mg3d* mg = cv->
get_mg() ;
551 Mtbl* mti =
new Mtbl(mg) ;
552 mti->set_etat_qcq() ;
555 const Valeur& alpha = cv->get_alpha() ;
558 for (
int l=0 ; l<nz ; l++) {
559 int ir = mg->get_nr(l);
560 int it = mg->get_nt(l) ;
561 int ip = mg->get_np(l) ;
562 Tbl* tb = (mti->t)[l] ;
564 double* p_r = tb->t ;
566 switch(mg->get_type_r(l)) {
569 for (k=0 ; k<ip ; k++) {
570 for (j=0 ; j<it ; j++) {
571 for (i=0 ; i<ir ; i++) {
572 *p_r = 1. / alpha(l,k,j,0) ;
586 cout <<
"map_eps_fait_dxdr: Compactified domain not allowed !" << endl;
592 cout <<
"map_eps_fait_dxdr: unknown type_r !" << endl ;
607 Mtbl* map_eps_fait_drdt(
const Map* cvi) {
610 const Map_eps* cv =
static_cast<const Map_eps*
>(cvi) ;
611 const Mg3d* mg = cv->
get_mg() ;
615 Mtbl* mti =
new Mtbl(mg) ;
616 mti->set_etat_qcq() ;
619 const Valeur& alpha = cv->get_alpha() ;
620 Valeur dalphadt(alpha.get_mg()) ; dalphadt.annule_hard() ;
621 for (
int k=0; k<mg->get_np(0); k++)
622 for (
int j=0; j<mg->get_nt(0); j++){
623 const Grille3d* g = mg->get_grille3d(0) ;
624 double theta = (g->tet)[j] ;
625 double pphi = (g->phi)[k] ;
626 double sint =
sin(theta) ;
627 double cost =
cos(theta) ;
628 double sinp =
sin(pphi) ;
629 double cosp =
cos(pphi) ;
630 double aa = cv->get_aa() ;
631 double bb = cv->get_bb() ;
632 double cc = cv->get_cc() ;
633 double alpha2 = alpha(0, k, j, 0)*alpha(0, k, j, 0) ;
634 double alpha3 = alpha2 * alpha(0, k, j, 0) ;
635 dalphadt.set(0, k, j, 0) = alpha3 * sint * cost * (1./(cc*cc) - sinp*sinp / (bb*bb) - cosp*cosp / (aa*aa)) ;
637 const Valeur& beta = cv->get_beta() ;
638 const Valeur& dbetadt = beta.dsdt() ;
641 for (
int l=0 ; l<nz ; l++) {
643 int nr = mg->get_nr(l);
644 int nt = mg->get_nt(l) ;
645 int np = mg->get_np(l) ;
646 const Grille3d* g = mg->get_grille3d(l) ;
647 Tbl* tb = (mti->t)[l] ;
649 double* p_r = tb->t ;
651 switch(mg->get_type_r(l)) {
654 case RARE:
case FIN: {
655 for (
int k=0 ; k<np ; k++) {
656 for (
int j=0 ; j<nt ; j++) {
657 for (
int i=0 ; i<nr ; i++) {
658 *p_r = dalphadt(l,k,j,0) * (g->x)[i] + dbetadt(l,k,j,0) ;
672 cout <<
"map_eps_fait_drdt: Compactified domain not allowed !" << endl;
678 cout <<
"map_eps_fait_drdt: unknown type_r !" << endl ;
695 Mtbl* map_eps_fait_stdrdp(
const Map* cvi) {
698 const Map_eps* cv =
static_cast<const Map_eps*
>(cvi) ;
699 const Mg3d* mg = cv->
get_mg() ;
703 Mtbl* mti =
new Mtbl(mg) ;
704 mti->set_etat_qcq() ;
707 const Valeur& alpha = cv->get_alpha() ;
708 Valeur stalphadp(alpha.get_mg()) ; stalphadp.annule_hard() ;
709 for (
int k=0; k<mg->get_np(0); k++)
710 for (
int j=0; j<mg->get_nt(0); j++){
711 const Grille3d* g = mg->get_grille3d(0) ;
712 double theta = (g->tet)[j] ;
713 double pphi = (g->phi)[k] ;
714 double sint =
sin(theta) ;
716 double sinp =
sin(pphi) ;
717 double cosp =
cos(pphi) ;
718 double aa = cv->get_aa() ;
719 double bb = cv->get_bb() ;
721 double alpha2 = alpha(0, k, j, 0)*alpha(0, k, j, 0) ;
722 double alpha3 = alpha2 * alpha(0, k, j, 0) ;
723 stalphadp.set(0, k, j, 0) = alpha3 * sint * cosp * sinp * (1./(aa*aa) - 1./(bb*bb)) ;
726 const Valeur& beta = cv->get_beta() ;
727 const Valeur& stbetadp = beta.stdsdp() ;
730 for (
int l=0 ; l<nz ; l++) {
732 int nr = mg->get_nr(l);
733 int nt = mg->get_nt(l) ;
734 int np = mg->get_np(l) ;
735 const Grille3d* g = mg->get_grille3d(l) ;
736 Tbl* tb = (mti->t)[l] ;
738 double* p_r = tb->t ;
740 switch(mg->get_type_r(l)) {
743 case RARE:
case FIN: {
744 for (
int k=0 ; k<np ; k++) {
745 for (
int j=0 ; j<nt ; j++) {
746 for (
int i=0 ; i<nr ; i++) {
747 *p_r = stalphadp(l,k,j,0) * (g->x)[i] + stbetadp(l,k,j,0) ;
762 cout <<
"map_eps_fait_stdrdp: Compactified domain not allowed !" << endl;
768 cout <<
"map_eps_fait_stdrdp: unknown type_r !" << endl ;
785 Mtbl* map_eps_fait_srdrdt(
const Map* cvi) {
788 const Map_eps* cv =
static_cast<const Map_eps*
>(cvi) ;
789 const Mg3d* mg = cv->
get_mg() ;
793 Mtbl* mti =
new Mtbl(mg) ;
794 mti->set_etat_qcq() ;
797 const Valeur& alpha = cv->get_alpha() ;
798 Valeur dalphadt(alpha.get_mg()) ; dalphadt.annule_hard() ;
799 for (
int k=0; k<mg->get_np(0); k++)
800 for (
int j=0; j<mg->get_nt(0); j++){
801 const Grille3d* g = mg->get_grille3d(0) ;
802 double theta = (g->tet)[j] ;
803 double pphi = (g->phi)[k] ;
804 double sint =
sin(theta) ;
805 double cost =
cos(theta) ;
806 double sinp =
sin(pphi) ;
807 double cosp =
cos(pphi) ;
808 double aa = cv->get_aa() ;
809 double bb = cv->get_bb() ;
810 double cc = cv->get_cc() ;
811 double alpha2 = alpha(0, k, j, 0)*alpha(0, k, j, 0) ;
812 double alpha3 = alpha2 * alpha(0, k, j, 0) ;
813 dalphadt.set(0, k, j, 0) = alpha3 * sint * cost * (1./(cc*cc) - sinp*sinp / (bb*bb) - cosp*cosp / (aa*aa)) ;
815 const Valeur& beta = cv->get_beta() ;
816 const Valeur& dbetadt = beta.dsdt() ;
819 for (
int l=0 ; l<nz ; l++) {
821 int nr = mg->get_nr(l);
822 int nt = mg->get_nt(l) ;
823 int np = mg->get_np(l) ;
824 const Grille3d* g = mg->get_grille3d(l) ;
825 Tbl* tb = (mti->t)[l] ;
827 double* p_r = tb->t ;
829 switch(mg->get_type_r(l)) {
833 for (
int k=0 ; k<np ; k++) {
834 for (
int j=0 ; j<nt ; j++) {
835 for (
int i=0 ; i<nr ; i++) {
836 *p_r = dalphadt(l,k,j,0) / alpha(l,k,j,0) ;
845 for (
int k=0 ; k<np ; k++) {
846 for (
int j=0 ; j<nt ; j++) {
847 for (
int i=0 ; i<nr ; i++) {
848 *p_r = (dalphadt(l,k,j,0)*(g->x)[i] + dbetadt(l,k,j,0)) / (alpha(l,k,j,0)*(g->x)[i] + beta(l,k,j,0)) ;
857 cout <<
"map_eps_fait_srdrdt: Compactified domain not allowed !" << endl;
863 cout <<
"map_eps_fait_srdrdt: unknown type_r !" << endl ;
880 Mtbl* map_eps_fait_srstdrdp(
const Map* cvi) {
883 const Map_eps* cv =
static_cast<const Map_eps*
>(cvi) ;
884 const Mg3d* mg = cv->
get_mg() ;
888 Mtbl* mti =
new Mtbl(mg) ;
889 mti->set_etat_qcq() ;
892 const Valeur& alpha = cv->get_alpha() ;
893 Valeur stalphadp(alpha.get_mg()) ; stalphadp.annule_hard() ;
894 for (
int k=0; k<mg->get_np(0); k++)
895 for (
int j=0; j<mg->get_nt(0); j++){
896 const Grille3d* g = mg->get_grille3d(0) ;
897 double theta = (g->tet)[j] ;
898 double pphi = (g->phi)[k] ;
899 double sint =
sin(theta) ;
901 double sinp =
sin(pphi) ;
902 double cosp =
cos(pphi) ;
903 double aa = cv->get_aa() ;
904 double bb = cv->get_bb() ;
906 double alpha2 = alpha(0, k, j, 0)*alpha(0, k, j, 0) ;
907 double alpha3 = alpha2 * alpha(0, k, j, 0) ;
908 stalphadp.set(0, k, j, 0) = alpha3 * sint * cosp * sinp * (1./(aa*aa) - 1./(bb*bb)) ;
911 const Valeur& beta = cv->get_beta() ;
912 const Valeur& stbetadp = beta.stdsdp() ;
915 for (
int l=0 ; l<nz ; l++) {
917 int nr = mg->get_nr(l);
918 int nt = mg->get_nt(l) ;
919 int np = mg->get_np(l) ;
920 const Grille3d* g = mg->get_grille3d(l) ;
921 Tbl* tb = (mti->t)[l] ;
923 double* p_r = tb->t ;
925 switch(mg->get_type_r(l)) {
929 for (
int k=0 ; k<np ; k++) {
930 for (
int j=0 ; j<nt ; j++) {
931 for (
int i=0 ; i<nr ; i++) {
932 *p_r = stalphadp(l,k,j,0) / alpha(l,k,j,0) ;
941 for (
int k=0 ; k<np ; k++) {
942 for (
int j=0 ; j<nt ; j++) {
943 for (
int i=0 ; i<nr ; i++) {
944 *p_r = (stalphadp(l,k,j,0)*(g->x)[i] + stbetadp(l,k,j,0)) / (alpha(l,k,j,0)*(g->x)[i] + beta(l,k,j,0)) ;
953 cout <<
"map_eps_fait_srstdrdp: Compactified domain not allowed !" << endl;
959 cout <<
"map_eps_fait_srstdrdp: unknown type_r !" << endl ;
976 Mtbl* map_eps_fait_sr2drdt(
const Map* cvi) {
979 const Map_eps* cv =
static_cast<const Map_eps*
>(cvi) ;
980 const Mg3d* mg = cv->
get_mg() ;
984 Mtbl* mti =
new Mtbl(mg) ;
985 mti->set_etat_qcq() ;
988 const Valeur& alpha = cv->get_alpha() ;
989 Valeur dalphadt(alpha.get_mg()) ; dalphadt.annule_hard() ;
990 for (
int k=0; k<mg->get_np(0); k++)
991 for (
int j=0; j<mg->get_nt(0); j++){
992 const Grille3d* g = mg->get_grille3d(0) ;
993 double theta = (g->tet)[j] ;
994 double pphi = (g->phi)[k] ;
995 double sint =
sin(theta) ;
996 double cost =
cos(theta) ;
997 double sinp =
sin(pphi) ;
998 double cosp =
cos(pphi) ;
999 double aa = cv->get_aa() ;
1000 double bb = cv->get_bb() ;
1001 double cc = cv->get_cc() ;
1002 double alpha2 = alpha(0, k, j, 0)*alpha(0, k, j, 0) ;
1003 double alpha3 = alpha2 * alpha(0, k, j, 0) ;
1004 dalphadt.set(0, k, j, 0) = alpha3 * sint * cost * (1./(cc*cc) - sinp*sinp / (bb*bb) - cosp*cosp / (aa*aa)) ;
1008 for (
int l=0 ; l<nz ; l++) {
1010 int nr = mg->get_nr(l);
1011 int nt = mg->get_nt(l) ;
1012 int np = mg->get_np(l) ;
1013 const Grille3d* g = mg->get_grille3d(l) ;
1014 Tbl* tb = (mti->t)[l] ;
1015 tb->set_etat_qcq() ;
1016 double* p_r = tb->t ;
1018 switch(mg->get_type_r(l)) {
1022 for (
int k=0 ; k<np ; k++) {
1023 for (
int j=0 ; j<nt ; j++) {
1024 for (
int i=0 ; i<nr ; i++) {
1025 double ww = alpha(l,k,j,0) ;
1026 *p_r = dalphadt(l,k,j,0) / (ww*ww * (g->x)[i]) ;
1035 cout <<
"map_eps_fait_sr2drdt: Shells not implemented yet..." << endl;
1041 cout <<
"map_eps_fait_sr2drdt: Compactified domain not allowed !" << endl;
1047 cout <<
"map_eps_fait_sr2drdt: unknown type_r !" << endl ;
1064 Mtbl* map_eps_fait_sr2stdrdp(
const Map* cvi) {
1067 const Map_eps* cv =
static_cast<const Map_eps*
>(cvi) ;
1068 const Mg3d* mg = cv->
get_mg() ;
1072 Mtbl* mti =
new Mtbl(mg) ;
1073 mti->set_etat_qcq() ;
1076 const Valeur& alpha = cv->get_alpha() ;
1077 Valeur stalphadp(alpha.get_mg()) ; stalphadp.annule_hard() ;
1078 for (
int k=0; k<mg->get_np(0); k++)
1079 for (
int j=0; j<mg->get_nt(0); j++){
1080 const Grille3d* g = mg->get_grille3d(0) ;
1081 double theta = (g->tet)[j] ;
1082 double pphi = (g->phi)[k] ;
1083 double sint =
sin(theta) ;
1085 double sinp =
sin(pphi) ;
1086 double cosp =
cos(pphi) ;
1087 double aa = cv->get_aa() ;
1088 double bb = cv->get_bb() ;
1090 double alpha2 = alpha(0, k, j, 0)*alpha(0, k, j, 0) ;
1091 double alpha3 = alpha2 * alpha(0, k, j, 0) ;
1092 stalphadp.set(0, k, j, 0) = alpha3 * sint * cosp * sinp * (1./(aa*aa) - 1./(bb*bb)) ;
1097 for (
int l=0 ; l<nz ; l++) {
1099 int nr = mg->get_nr(l);
1100 int nt = mg->get_nt(l) ;
1101 int np = mg->get_np(l) ;
1102 const Grille3d* g = mg->get_grille3d(l) ;
1103 Tbl* tb = (mti->t)[l] ;
1104 tb->set_etat_qcq() ;
1105 double* p_r = tb->t ;
1107 switch(mg->get_type_r(l)) {
1111 for (
int k=0 ; k<np ; k++) {
1112 for (
int j=0 ; j<nt ; j++) {
1113 for (
int i=0 ; i<nr ; i++) {
1114 double ww = alpha(l,k,j,0) ;
1115 *p_r = stalphadp(l,k,j,0) / (ww*ww * (g->x)[i]) ;
1124 cout <<
"map_eps_fait_sr2stdrdp: Shells not implemented yet..." << endl;
1130 cout <<
"map_eps_fait_sr2stdrdp: Compactified domain not allowed !" << endl;
1136 cout <<
"map_eps_fait_sr2stdrdp: unknown type_r !" << endl ;
1153 Mtbl* map_eps_fait_d2rdx2(
const Map* cvi) {
1156 const Mg3d* mg = cvi->
get_mg() ;
1159 Mtbl* mti =
new Mtbl(mg) ;
1160 mti->set_etat_zero() ;
1171 Mtbl* map_eps_fait_lapr_tp(
const Map* cvi) {
1174 const Map_eps* cv =
static_cast<const Map_eps*
>(cvi) ;
1175 const Mg3d* mg = cv->
get_mg() ;
1179 Mtbl* mti =
new Mtbl(mg) ;
1180 mti->set_etat_qcq() ;
1183 const Valeur& alpha = cv->get_alpha() ;
1185 Valeur alpha_tmp = alpha ;
1187 const Valeur& lapalpha = alpha_tmp.lapang() ;
1190 for (
int l=0 ; l<nz ; l++) {
1192 const Grille3d* g = mg->get_grille3d(l) ;
1194 int nr = mg->get_nr(l);
1195 int nt = mg->get_nt(l) ;
1196 int np = mg->get_np(l) ;
1198 Tbl* tb = (mti->t)[l] ;
1199 tb->set_etat_qcq() ;
1200 double* p_r = tb->t ;
1202 switch(mg->get_type_r(l)) {
1206 for (
int k=0 ; k<np ; k++) {
1207 for (
int j=0 ; j<nt ; j++) {
1208 for (
int i=0 ; i<nr ; i++) {
1209 *p_r = (g->x)[i]*lapalpha(l,k,j,0) ;
1218 cout <<
"map_eps_fait_lapr_tp: Shells not implemented yet..." << endl;
1224 cout <<
"map_eps_fait_lapr_tp: Compactified domain not allowed !" << endl;
1230 cout <<
"map_eps_fait_lapr_tp: unknown type_r !" << endl ;
1247 Mtbl* map_eps_fait_d2rdtdx(
const Map* cvi) {
1248 cerr <<
"Map_eps::map_eps_fait_d2rdtdx pas fait" << endl;
1251 const Map_eps* cv =
static_cast<const Map_eps*
>(cvi) ;
1252 const Mg3d* mg = cv->get_mg() ;
1253 int nz = mg->get_nzone() ;
1256 Mtbl* mti =
new Mtbl(mg) ;
1257 mti->set_etat_qcq() ;
1260 const Valeur& alpha = cv->get_alpha() ;
1261 const Valeur& d2alphadxdt = alpha.dsdt().dsdx() ;
1264 for (
int l=0 ; l<nz ; l++) {
1266 int nr = mg->get_nr(l);
1267 int nt = mg->get_nt(l) ;
1268 int np = mg->get_np(l) ;
1270 Tbl* tb = (mti->t)[l] ;
1271 tb->set_etat_qcq() ;
1272 double* p_r = tb->t ;
1274 switch(mg->get_type_r(l)) {
1278 for (
int k=0 ; k<np ; k++) {
1279 for (
int j=0 ; j<nt ; j++) {
1280 for (
int i=0 ; i<nr ; i++) {
1281 *p_r = d2alphadxdt(l,k,j,0)/alpha(l,k,j,0) ;
1289 cout <<
"map_eps_fait_d2rdtdx: Shells not implemented yet..." << endl;
1295 cout <<
"map_eps_fait_d2rdtdx: Compactified domain not allowed !" << endl;
1301 cout <<
"map_eps_fait_d2rdtdx: unknown type_r !" << endl ;
1318 Mtbl* map_eps_fait_sstd2rdpdx(
const Map* cvi) {
1319 cerr <<
"map_eps_fait_sstd2rdpdx pas fait" << endl;
1322 const Map_eps* cv =
static_cast<const Map_eps*
>(cvi) ;
1323 const Mg3d* mg = cv->get_mg() ;
1324 int nz = mg->get_nzone() ;
1327 Mtbl* mti =
new Mtbl(mg) ;
1328 mti->set_etat_qcq() ;
1331 const Valeur& alpha = cv->get_alpha() ;
1332 Valeur stalphadp(alpha.get_mg()) ; stalphadp.annule_hard() ;
1333 for (
int k=0; k<mg->get_np(0); k++)
1334 for (
int j=0; j<mg->get_nt(0); j++){
1335 const Grille3d* g = mg->get_grille3d(0) ;
1336 double theta = (g->tet)[j] ;
1337 double pphi = (g->phi)[k] ;
1338 double sint =
sin(theta) ;
1340 double sinp =
sin(pphi) ;
1341 double cosp =
cos(pphi) ;
1342 double aa = cv->get_aa() ;
1343 double bb = cv->get_bb() ;
1345 double alpha2 = alpha(0, k, j, 0)*alpha(0, k, j, 0) ;
1346 double alpha3 = alpha2 * alpha(0, k, j, 0) ;
1347 stalphadp.set(0, k, j, 0) = alpha3 * sint * cosp * sinp * (1./(aa*aa) - 1./(bb*bb)) ;
1352 for (
int l=0 ; l<nz ; l++) {
1354 int nr = mg->get_nr(l);
1355 int nt = mg->get_nt(l) ;
1356 int np = mg->get_np(l) ;
1358 Tbl* tb = (mti->t)[l] ;
1359 tb->set_etat_qcq() ;
1360 double* p_r = tb->t ;
1362 switch(mg->get_type_r(l)) {
1366 for (
int k=0 ; k<np ; k++) {
1367 for (
int j=0 ; j<nt ; j++) {
1368 for (
int i=0 ; i<nr ; i++) {
1369 *p_r = stalphadp(l,k,j,0) ;
1378 cout <<
"map_eps_fait_sstd2rdpdx: Shells not implemented yet..." << endl;
1384 cout <<
"map_eps_fait_sstd2rdpdx: Compactified domain not allowed !" << endl;
1390 cout <<
"map_eps_fait_sstd2rdpdx: unknown type_r !" << endl ;
1408 Mtbl* map_eps_fait_sr2d2rdt2(
const Map* cvi) {
1409 cerr <<
"map_eps_fait_sr2d2rdt2 pas fait" << endl;
1412 const Map_eps* cv =
static_cast<const Map_eps*
>(cvi) ;
1413 const Mg3d* mg = cv->get_mg() ;
1414 int nz = mg->get_nzone() ;
1417 Mtbl* mti =
new Mtbl(mg) ;
1418 mti->set_etat_qcq() ;
1421 const Valeur& alpha = cv->get_alpha() ;
1422 const Valeur& d2alphadt2 = alpha.d2sdt2() ;
1425 for (
int l=0 ; l<nz ; l++) {
1427 int nr = mg->get_nr(l);
1428 int nt = mg->get_nt(l) ;
1429 int np = mg->get_np(l) ;
1430 const Grille3d* g = mg->get_grille3d(l) ;
1431 Tbl* tb = (mti->t)[l] ;
1432 tb->set_etat_qcq() ;
1433 double* p_r = tb->t ;
1435 switch(mg->get_type_r(l)) {
1439 for (
int k=0 ; k<np ; k++) {
1440 for (
int j=0 ; j<nt ; j++) {
1441 for (
int i=0 ; i<nr ; i++) {
1442 double ww = alpha(l,k,j,0) ;
1443 *p_r = d2alphadt2(l,k,j,0) / (ww*ww * (g->x)[i]) ;
1451 cout <<
"map_eps_fait_drdt: Shells not implemented yet..." << endl;
1457 cout <<
"map_eps_fait_drdt: Compactified domain not allowed !" << endl;
1463 cout <<
"map_eps_fait_drdt: unknown type_r !" << endl ;
const Grille3d * get_grille3d(int l) const
Returns a pointer on the 3D mono-grid for domain no. l.
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
Base class for coordinate mappings.
Values and coefficients of a (real-value) function.
double * x
Array of values of at the nr collocation points.
Cmp cos(const Cmp &)
Cosine.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
const Valeur & get_alpha() const
Returns the reference on the Tbl alpha.
double * t
The array of double.
double * tet
Array of values of at the nt collocation points.
int get_nzone() const
Returns the number of domains.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
Cmp sin(const Cmp &)
Sine.
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
int get_type_r(int l) const
Returns the type of sampling in the radial direction in domain no.
Tbl ** t
Array (size nzone ) of pointers on the Tbl 's.
const Mg3d * get_mg() const
Gives the Mg3d on which the Mtbl is defined.
3D grid class in one domain.