77 for (
int l=0 ; l<nz ; l++) {
82 Tbl* tb = (mti->
t)[l] ;
86 switch (type_var(l)) {
91 for (k=0 ; k<ip ; k++) {
92 for (j=0 ; j<it ; j++) {
93 for (i=0 ; i<ir ; i++) {
94 *p_r = alpha(l) * (g->
x)[i] + beta(l) ;
102 for (k=0 ; k<ip ; k++) {
103 for (j=0 ; j<it ; j++) {
104 for (i=0 ; i<ir ; i++) {
105 *p_r = 1./(alpha(l) * (g->
x)[i] + beta(l)) ;
113 cout <<
"Map_log_fait_r: unknown type_r !\n" ;
124 for (k=0 ; k<ip ; k++) {
125 for (j=0 ; j<it ; j++) {
126 for (i=0 ; i<ir ; i++) {
127 *p_r =
exp(alpha(l) * (g->
x)[i] + beta(l)) ;
134 cout <<
"Map_log_fait_r: unknown type_r !\n" ;
142 cout <<
"Map_log_fait_r: unknown type_r !\n" ;
158 Mtbl* map_log_fait_tet(
const Map* cvi) {
170 for (
int l=0 ; l<nz ; l++) {
175 Tbl* tb = (mti->
t)[l] ;
177 double* p_r = tb->
t ;
178 for (k=0 ; k<ip ; k++) {
179 for (j=0 ; j<it ; j++) {
180 for (i=0 ; i<ir ; i++) {
196 Mtbl* map_log_fait_phi(
const Map* cvi) {
199 const Map_log* cv =
static_cast<const Map_log*
>(cvi) ;
200 const Mg3d* mg = cv->get_mg() ;
204 Mtbl* mti =
new Mtbl(mg) ;
205 mti->set_etat_qcq() ;
208 for (
int l=0 ; l<nz ; l++) {
209 int ir = mg->get_nr(l);
210 int it = mg->get_nt(l);
211 int ip = mg->get_np(l);
212 const Grille3d* g = mg->get_grille3d(l) ;
213 Tbl* tb = (mti->t)[l] ;
215 double* p_r = tb->t ;
216 for (k=0 ; k<ip ; k++) {
217 for (j=0 ; j<it ; j++) {
218 for (i=0 ; i<ir ; i++) {
234 Mtbl* map_log_fait_x(
const Map* cvi) {
237 const Mg3d* mg = cvi->
get_mg() ;
240 Mtbl* mti =
new Mtbl(mg) ;
242 *mti = (cvi->r) * (cvi->sint) * (cvi->cosp) ;
252 Mtbl* map_log_fait_y(
const Map* cvi) {
255 const Mg3d* mg = cvi->
get_mg() ;
258 Mtbl* mti =
new Mtbl(mg) ;
260 *mti = (cvi->r) * (cvi->sint) * (cvi->sinp) ;
270 Mtbl* map_log_fait_z(
const Map* cvi) {
273 const Mg3d* mg = cvi->
get_mg() ;
276 Mtbl* mti =
new Mtbl(mg) ;
278 *mti = (cvi->r) * (cvi->cost) ;
288 Mtbl* map_log_fait_xa(
const Map* cvi) {
291 const Mg3d* mg = cvi->
get_mg() ;
294 Mtbl* mti =
new Mtbl(mg) ;
296 double r_phi = cvi->get_rot_phi() ;
297 double t_x = cvi->get_ori_x() ;
299 if ( fabs(r_phi) < 1.e-14 ) {
300 *mti = (cvi->x) + t_x ;
302 else if ( fabs(r_phi - M_PI) < 1.e-14 ) {
303 *mti = - (cvi->x) + t_x ;
306 Mtbl phi = cvi->phi + r_phi ;
307 *mti = (cvi->r) * (cvi->sint) *
cos(phi) + t_x ;
318 Mtbl* map_log_fait_ya(
const Map* cvi) {
321 const Mg3d* mg = cvi->
get_mg() ;
324 Mtbl* mti =
new Mtbl(mg) ;
326 double r_phi = cvi->get_rot_phi() ;
327 double t_y = cvi->get_ori_y() ;
329 if ( fabs(r_phi) < 1.e-14 ) {
330 *mti = (cvi->y) + t_y ;
332 else if ( fabs(r_phi - M_PI) < 1.e-14 ) {
333 *mti = - (cvi->y) + t_y ;
336 Mtbl phi = cvi->phi + r_phi ;
337 *mti = (cvi->r) * (cvi->sint) *
sin(phi) + t_y ;
348 Mtbl* map_log_fait_za(
const Map* cvi) {
351 const Mg3d* mg = cvi->
get_mg() ;
353 double t_z = cvi->get_ori_z() ;
356 Mtbl* mti =
new Mtbl(mg) ;
358 *mti = (cvi->r) * (cvi->cost) + t_z ;
368 Mtbl* map_log_fait_sint(
const Map* cvi) {
371 const Map_log* cv =
static_cast<const Map_log*
>(cvi) ;
372 const Mg3d* mg = cv->
get_mg() ;
376 Mtbl* mti =
new Mtbl(mg) ;
377 mti->set_etat_qcq() ;
380 for (
int l=0 ; l<nz ; l++) {
381 int ir = mg->get_nr(l);
382 int it = mg->get_nt(l);
383 int ip = mg->get_np(l);
384 const Grille3d* g = mg->get_grille3d(l) ;
385 Tbl* tb = (mti->t)[l] ;
387 double* p_r = tb->t ;
388 for (k=0 ; k<ip ; k++) {
389 for (j=0 ; j<it ; j++) {
390 for (i=0 ; i<ir ; i++) {
391 *p_r =
sin(g->tet[j]) ;
402 Mtbl* map_log_fait_cost(
const Map* cvi) {
405 const Map_log* cv =
static_cast<const Map_log*
>(cvi) ;
406 const Mg3d* mg = cv->
get_mg() ;
410 Mtbl* mti =
new Mtbl(mg) ;
411 mti->set_etat_qcq() ;
414 for (
int l=0 ; l<nz ; l++) {
415 int ir = mg->get_nr(l);
416 int it = mg->get_nt(l);
417 int ip = mg->get_np(l);
418 const Grille3d* g = mg->get_grille3d(l) ;
419 Tbl* tb = (mti->t)[l] ;
421 double* p_r = tb->t ;
422 for (k=0 ; k<ip ; k++) {
423 for (j=0 ; j<it ; j++) {
424 for (i=0 ; i<ir ; i++) {
425 *p_r =
cos(g->tet[j]) ;
436 Mtbl* map_log_fait_sinp(
const Map* cvi) {
439 const Map_log* cv =
static_cast<const Map_log*
>(cvi) ;
440 const Mg3d* mg = cv->
get_mg() ;
444 Mtbl* mti =
new Mtbl(mg) ;
445 mti->set_etat_qcq() ;
448 for (
int l=0 ; l<nz ; l++) {
449 int ir = mg->get_nr(l);
450 int it = mg->get_nt(l);
451 int ip = mg->get_np(l);
452 const Grille3d* g = mg->get_grille3d(l) ;
453 Tbl* tb = (mti->t)[l] ;
455 double* p_r = tb->t ;
456 for (k=0 ; k<ip ; k++) {
457 for (j=0 ; j<it ; j++) {
458 for (i=0 ; i<ir ; i++) {
459 *p_r =
sin(g->phi[k]) ;
470 Mtbl* map_log_fait_cosp(
const Map* cvi) {
473 const Map_log* cv =
static_cast<const Map_log*
>(cvi) ;
474 const Mg3d* mg = cv->
get_mg() ;
478 Mtbl* mti =
new Mtbl(mg) ;
479 mti->set_etat_qcq() ;
482 for (
int l=0 ; l<nz ; l++) {
483 int ir = mg->get_nr(l);
484 int it = mg->get_nt(l);
485 int ip = mg->get_np(l);
486 const Grille3d* g = mg->get_grille3d(l) ;
487 Tbl* tb = (mti->t)[l] ;
489 double* p_r = tb->t ;
490 for (k=0 ; k<ip ; k++) {
491 for (j=0 ; j<it ; j++) {
492 for (i=0 ; i<ir ; i++) {
493 *p_r =
cos(g->phi[k]) ;
510 Mtbl* map_log_fait_xsr(
const Map* cvi) {
513 const Map_log* cv =
static_cast<const Map_log*
>(cvi) ;
514 const Mg3d* mg = cv->
get_mg() ;
518 Mtbl* mti =
new Mtbl(mg) ;
519 mti->set_etat_qcq() ;
522 Tbl alpha = cv->alpha ;
523 Tbl beta = cv->beta ;
524 Itbl type_var = cv->type_var ;
527 for (
int l=0 ; l<nz ; l++) {
528 int ir = mg->get_nr(l);
529 int it = mg->get_nt(l) ;
530 int ip = mg->get_np(l) ;
531 const Grille3d* g = mg->get_grille3d(l) ;
532 Tbl* tb = (mti->t)[l] ;
534 double* p_r = tb->t ;
536 switch (type_var(l)) {
539 switch(mg->get_type_r(l)) {
542 for (k=0 ; k<ip ; k++) {
543 for (j=0 ; j<it ; j++) {
544 for (i=0 ; i<ir ; i++) {
545 *p_r = 1. / alpha(l) ;
553 for (k=0 ; k<ip ; k++) {
554 for (j=0 ; j<it ; j++) {
555 for (i=0 ; i<ir ; i++) {
556 *p_r = 1. / ( alpha(l) * (g->x)[i] + beta(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 cout <<
"map_log_fait_xsr: unknown type_r !" << endl ;
583 switch (mg->get_type_r(l)) {
585 for (k=0 ; k<ip ; k++) {
586 for (j=0 ; j<it ; j++) {
587 for (i=0 ; i<ir ; i++) {
588 *p_r = 1. /
exp( alpha(l) * (g->x)[i] + beta(l) ) ;
596 cout <<
"map_log_fait_xsr: unknown type_r !" << endl ;
604 cout <<
"map_log_fait_xsr: unknown type_r !" << endl ;
619 Mtbl* map_log_fait_dxdr(
const Map* cvi) {
622 const Map_log* cv =
static_cast<const Map_log*
>(cvi) ;
623 const Mg3d* mg = cv->
get_mg() ;
627 Mtbl* mti =
new Mtbl(mg) ;
628 mti->set_etat_qcq() ;
631 Tbl alpha = cv->alpha ;
632 Tbl beta = cv->beta ;
633 Itbl type_var = cv->type_var ;
636 for (
int l=0 ; l<nz ; l++) {
637 int ir = mg->get_nr(l);
638 int it = mg->get_nt(l) ;
639 int ip = mg->get_np(l) ;
640 const Grille3d* g = mg->get_grille3d(l) ;
641 Tbl* tb = (mti->t)[l] ;
643 double* p_r = tb->t ;
645 switch (type_var(l)) {
647 switch(mg->get_type_r(l)) {
650 for (k=0 ; k<ip ; k++) {
651 for (j=0 ; j<it ; j++) {
652 for (i=0 ; i<ir ; i++) {
653 *p_r = 1. / alpha(l) ;
662 for (k=0 ; k<ip ; k++) {
663 for (j=0 ; j<it ; j++) {
664 for (i=0 ; i<ir ; i++) {
665 *p_r = - 1. / alpha(l) ;
673 cout <<
"map_log_fait_dxdr: unknown type_r !" << endl ;
680 switch(mg->get_type_r(l)) {
682 for (k=0 ; k<ip ; k++) {
683 for (j=0 ; j<it ; j++) {
684 for (i=0 ; i<ir ; i++) {
685 *p_r = 1./ (alpha(l) *
exp(alpha(l) * (g->x)[i] + beta(l))) ;
693 cout <<
"map_log_fait_dxdr: unknown type_r !" << endl ;
700 cout <<
"map_log_fait_dxdr: unknown type_r !" << endl ;
717 Mtbl* map_log_fait_drdt(
const Map* cvi) {
720 const Mg3d* mg = cvi->
get_mg() ;
723 Mtbl* mti =
new Mtbl(mg) ;
724 mti->set_etat_zero() ;
735 Mtbl* map_log_fait_stdrdp(
const Map* cvi) {
738 const Mg3d* mg = cvi->
get_mg() ;
741 Mtbl* mti =
new Mtbl(mg) ;
742 mti->set_etat_zero() ;
753 Mtbl* map_log_fait_srdrdt(
const Map* cvi) {
756 const Mg3d* mg = cvi->
get_mg() ;
759 Mtbl* mti =
new Mtbl(mg) ;
760 mti->set_etat_zero() ;
771 Mtbl* map_log_fait_srstdrdp(
const Map* cvi) {
774 const Mg3d* mg = cvi->
get_mg() ;
777 Mtbl* mti =
new Mtbl(mg) ;
778 mti->set_etat_zero() ;
789 Mtbl* map_log_fait_sr2drdt(
const Map* cvi) {
792 const Mg3d* mg = cvi->
get_mg() ;
795 Mtbl* mti =
new Mtbl(mg) ;
796 mti->set_etat_zero() ;
807 Mtbl* map_log_fait_sr2stdrdp(
const Map* cvi) {
810 const Mg3d* mg = cvi->
get_mg() ;
813 Mtbl* mti =
new Mtbl(mg) ;
814 mti->set_etat_zero() ;
825 Mtbl* map_log_fait_d2rdx2(
const Map* cvi) {
827 const Map_log* cv =
static_cast<const Map_log*
>(cvi) ;
828 const Mg3d* mg = cv->
get_mg() ;
832 Mtbl* mti =
new Mtbl(mg) ;
833 mti->set_etat_qcq() ;
836 Tbl alpha = cv->alpha ;
837 Tbl beta = cv->beta ;
838 Itbl type_var = cv->type_var ;
841 for (
int l=0 ; l<nz ; l++) {
842 int ir = mg->get_nr(l);
843 int it = mg->get_nt(l) ;
844 int ip = mg->get_np(l) ;
845 const Grille3d* g = mg->get_grille3d(l) ;
846 Tbl* tb = (mti->t)[l] ;
848 double* p_r = tb->t ;
850 switch (type_var(l)) {
852 switch(mg->get_type_r(l)) {
854 case RARE:
case FIN :
case UNSURR:
855 for (k=0 ; k<ip ; k++) {
856 for (j=0 ; j<it ; j++) {
857 for (i=0 ; i<ir ; i++) {
866 cout <<
"map_log_fait_d2rdx2: unknown type_r !" << endl ;
873 switch(mg->get_type_r(l)) {
875 for (k=0 ; k<ip ; k++) {
876 for (j=0 ; j<it ; j++) {
877 for (i=0 ; i<ir ; i++) {
878 *p_r =
exp (alpha(l) * (g->x)[i] + beta(l)) *
887 cout <<
"map_log_fait_d2rdx2: unknown type_r !" << endl ;
893 cout <<
"map_log_fait_d2rdx2: unknown type_r !" << endl ;
908 Mtbl* map_log_fait_lapr_tp(
const Map* cvi) {
911 const Mg3d* mg = cvi->
get_mg() ;
914 Mtbl* mti =
new Mtbl(mg) ;
915 mti->set_etat_zero() ;
926 Mtbl* map_log_fait_d2rdtdx(
const Map* cvi) {
929 const Mg3d* mg = cvi->
get_mg() ;
932 Mtbl* mti =
new Mtbl(mg) ;
933 mti->set_etat_zero() ;
944 Mtbl* map_log_fait_sstd2rdpdx(
const Map* cvi) {
947 const Mg3d* mg = cvi->
get_mg() ;
950 Mtbl* mti =
new Mtbl(mg) ;
951 mti->set_etat_zero() ;
962 Mtbl* map_log_fait_sr2d2rdt2(
const Map* cvi) {
965 const Mg3d* mg = cvi->
get_mg() ;
968 Mtbl* mti =
new Mtbl(mg) ;
969 mti->set_etat_zero() ;
980 Mtbl* map_log_fait_dxdlnr(
const Map* cvi) {
983 const Map_log* cv =
static_cast<const Map_log*
>(cvi) ;
984 const Mg3d* mg = cv->
get_mg() ;
988 Mtbl* mti =
new Mtbl(mg) ;
989 mti->set_etat_qcq() ;
992 Tbl alpha = cv->alpha ;
993 Tbl beta = cv->beta ;
994 Itbl type_var = cv->type_var ;
997 for (
int l=0 ; l<nz ; l++) {
998 int ir = mg->get_nr(l);
999 int it = mg->get_nt(l) ;
1000 int ip = mg->get_np(l) ;
1001 Tbl* tb = (mti->t)[l] ;
1002 tb->set_etat_qcq() ;
1003 double* p_r = tb->t ;
1005 switch (type_var(l)) {
1007 switch(mg->get_type_r(l)) {
1009 case RARE:
case FIN:
1010 for (k=0 ; k<ip ; k++) {
1011 for (j=0 ; j<it ; j++) {
1012 for (i=0 ; i<ir ; i++) {
1013 *p_r = 1. / alpha(l) ;
1022 for (k=0 ; k<ip ; k++) {
1023 for (j=0 ; j<it ; j++) {
1024 for (i=0 ; i<ir ; i++) {
1025 *p_r = - 1. / alpha(l) ;
1033 cout <<
"map_log_fait_dxdr: unknown type_r !" << endl ;
1040 switch(mg->get_type_r(l)) {
1042 for (k=0 ; k<ip ; k++) {
1043 for (j=0 ; j<it ; j++) {
1044 for (i=0 ; i<ir ; i++) {
1045 *p_r = 1./ alpha(l) ;
1053 cout <<
"map_log_fait_dxdr: unknown type_r !" << endl ;
1060 cout <<
"map_log_fait_dxdr: unknown type_r !" << endl ;
Tbl beta
Array (size: mg->nzone ) of the values of in each domain.
const Grille3d * get_grille3d(int l) const
Returns a pointer on the 3D mono-grid for domain no. l.
Cmp exp(const Cmp &)
Exponential.
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.
Basic integer array class.
double * x
Array of values of at the nr collocation points.
Itbl type_var
Array (size: mg->nzone ) of the type of variable in each domain.
Cmp cos(const Cmp &)
Cosine.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Logarithmic radial mapping.
double * t
The array of double.
double * tet
Array of values of at the nt collocation points.
Tbl alpha
Array (size: mg->nzone ) of the values of in each domain.
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.