LORENE
map_af_fait.C
1 /*
2  * Copyright (c) 1999-2000 Jean-Alain Marck
3  * Copyright (c) 1999-2003 Eric Gourgoulhon
4  *
5  * This file is part of LORENE.
6  *
7  * LORENE is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * LORENE is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with LORENE; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20  *
21  */
22 
23 
24 
25 
26 /*
27  * $Id: map_af_fait.C,v 1.14 2016/12/05 16:17:56 j_novak Exp $
28  * $Log: map_af_fait.C,v $
29  * Revision 1.14 2016/12/05 16:17:56 j_novak
30  * Suppression of some global variables (file names, loch, ...) to prevent redefinitions
31  *
32  * Revision 1.13 2014/10/13 08:53:02 j_novak
33  * Lorene classes and functions now belong to the namespace Lorene.
34  *
35  * Revision 1.12 2014/10/06 15:13:12 j_novak
36  * Modified #include directives to use c++ syntax.
37  *
38  * Revision 1.11 2013/06/05 15:10:42 j_novak
39  * Suppression of FINJAC sampling in r. This Jacobi(0,2) base is now
40  * available by setting colloc_r to BASE_JAC02 in the Mg3d constructor.
41  *
42  * Revision 1.10 2012/01/24 14:59:12 j_novak
43  * Removed functions XXX_fait_xi()
44  *
45  * Revision 1.9 2012/01/17 10:33:02 j_penner
46  * added a routine to construct the computational coordinate xi
47  *
48  * Revision 1.8 2008/10/03 09:05:29 j_novak
49  * Improved the treatment of angular mapping in the computation of xsr
50  *
51  * Revision 1.7 2007/12/20 09:11:04 jl_cornou
52  * Correction of an error in op_sxpun about Jacobi(0,2) polynomials
53  *
54  * Revision 1.6 2007/12/14 10:19:30 jl_cornou
55  * *** empty log message ***
56  *
57  * Revision 1.5 2007/12/11 15:28:14 jl_cornou
58  * Jacobi(0,2) polynomials partially implemented
59  *
60  * Revision 1.4 2006/06/09 14:58:48 j_novak
61  * Added a hack in the case of pure angular grid for the Coord xsr in the shells.
62  *
63  * Revision 1.3 2003/10/15 10:34:46 e_gourgoulhon
64  * Added new Coord's: drdt and stdrdp.
65  *
66  * Revision 1.2 2002/10/16 14:36:41 j_novak
67  * Reorganization of #include instructions of standard C++, in order to
68  * use experimental version 3 of gcc.
69  *
70  * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
71  * LORENE
72  *
73  * Revision 2.6 1999/10/15 09:16:38 eric
74  * Changement prototypes: const.
75  *
76  * Revision 2.5 1999/10/14 14:27:26 eric
77  * const.
78  *
79  * Revision 2.4 1999/09/30 12:56:10 eric
80  * const Grille3d*
81  *
82  * Revision 2.3 1999/04/09 12:59:21 phil
83  * correction de map_af_fait_dxdr
84  *
85  * Revision 2.2 1999/03/04 15:22:53 eric
86  * *** empty log message ***
87  *
88  * Revision 2.1 1999/03/04 13:12:03 eric
89  * Ajout des derivees du changement de variable
90  *
91  * Revision 2.0 1999/02/15 10:42:45 hyc
92  * *** empty log message ***
93  *
94  * Revision 2.1 1999/02/15 09:59:50 hyc
95  * *** empty log message ***
96  *
97  * Revision 2.0 1999/01/15 09:10:39 hyc
98  * *** empty log message ***
99  *
100  *
101  * $Header: /cvsroot/Lorene/C++/Source/Map/map_af_fait.C,v 1.14 2016/12/05 16:17:56 j_novak Exp $
102  *
103  */
104 
105 // Includes
106 #include <cassert>
107 #include <cstdlib>
108 #include <cmath>
109 
110 #include "mtbl.h"
111 #include "map.h"
112 #include "proto.h"
113 
114  //----------------//
115  // Coord. radiale //
116  //----------------//
117 
118 namespace Lorene {
119 Mtbl* map_af_fait_r(const Map* cvi) {
120 
121  // recup du changement de variable
122  const Map_af* cv = static_cast<const Map_af*>(cvi) ;
123  const Mg3d* mg = cv->get_mg() ;
124  int nz = mg->get_nzone() ;
125 
126  // Le resultat
127  Mtbl* mti = new Mtbl(mg) ;
128  mti->set_etat_qcq() ;
129 
130  // Pour le confort
131  double* alpha = cv->alpha ;
132  double* beta = cv->beta ;
133 
134  int i, j, k ;
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] ;
141  tb->set_etat_qcq() ;
142  double* p_r = tb->t ;
143 
144  switch(mg->get_type_r(l)) {
145  case FIN: case RARE:
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] ;
150  p_r++ ;
151  } // Fin de boucle sur r
152  } // Fin de boucle sur theta
153  } // Fin de boucle sur phi
154  break ;
155 
156  case UNSURR:
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]) ;
161  p_r++ ;
162  } // Fin de boucle sur r
163  } // Fin de boucle sur theta
164  } // Fin de boucle sur phi
165  break ;
166 
167  default:
168  cout << "Map_af_fait_r: unknown type_r !\n" ;
169  abort () ;
170  exit(-1) ;
171 
172  } // Fin du switch
173  } // Fin de boucle sur zone
174 
175  // Termine
176  return mti ;
177 }
178 
179  //--------------//
180  // Coord. Theta //
181  //--------------//
182 
183 Mtbl* map_af_fait_tet(const Map* cvi) {
184 
185  // recup du changement de variable
186  const Map_af* cv = static_cast<const Map_af*>(cvi) ;
187  const Mg3d* mg = cv->get_mg() ;
188  int nz = mg->get_nzone() ;
189 
190  // Le resultat
191  Mtbl* mti = new Mtbl(mg) ;
192  mti->set_etat_qcq() ;
193 
194  int i, j, k ;
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] ;
201  tb->set_etat_qcq() ;
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++) {
206  *p_r = (g->tet)[j] ;
207  p_r++ ;
208  } // Fin de boucle sur r
209  } // Fin de boucle sur theta
210  } // Fin de boucle sur phi
211  } // Fin de boucle sur zone
212 
213  // Termine
214  return mti ;
215 }
216 
217  //------------//
218  // Coord. Phi //
219  //------------//
220 
221 Mtbl* map_af_fait_phi(const Map* cvi) {
222 
223  // recup du changement de variable
224  const Map_af* cv = static_cast<const Map_af*>(cvi) ;
225  const Mg3d* mg = cv->get_mg() ;
226  int nz = mg->get_nzone() ;
227 
228  // Le resultat
229  Mtbl* mti = new Mtbl(mg) ;
230  mti->set_etat_qcq() ;
231 
232  int i, j, k ;
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] ;
239  tb->set_etat_qcq() ;
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++) {
244  *p_r = (g->phi)[k] ;
245  p_r++ ;
246  } // Fin de boucle sur r
247  } // Fin de boucle sur theta
248  } // Fin de boucle sur phi
249  } // Fin de boucle sur zone
250 
251  // Termine
252  return mti ;
253 }
254 
255  //----------//
256  // Coord. X //
257  //----------//
258 
259 Mtbl* map_af_fait_x(const Map* cvi) {
260 
261  // recup de la grille
262  const Mg3d* mg = cvi->get_mg() ;
263 
264  // Le resultat
265  Mtbl* mti = new Mtbl(mg) ;
266 
267  *mti = (cvi->r) * (cvi->sint) * (cvi->cosp) ;
268 
269  // Termine
270  return mti ;
271 }
272 
273  //----------//
274  // Coord. Y //
275  //----------//
276 
277 Mtbl* map_af_fait_y(const Map* cvi) {
278 
279  // recup de la grille
280  const Mg3d* mg = cvi->get_mg() ;
281 
282  // Le resultat
283  Mtbl* mti = new Mtbl(mg) ;
284 
285  *mti = (cvi->r) * (cvi->sint) * (cvi->sinp) ;
286 
287  // Termine
288  return mti ;
289 }
290 
291  //----------//
292  // Coord. Z //
293  //----------//
294 
295 Mtbl* map_af_fait_z(const Map* cvi) {
296 
297  // recup de la grille
298  const Mg3d* mg = cvi->get_mg() ;
299 
300  // Le resultat
301  Mtbl* mti = new Mtbl(mg) ;
302 
303  *mti = (cvi->r) * (cvi->cost) ;
304 
305  // Termine
306  return mti ;
307 }
308 
309  //--------------------//
310  // Coord. X "absolue" //
311  //--------------------//
312 
313 Mtbl* map_af_fait_xa(const Map* cvi) {
314 
315  // recup de la grille
316  const Mg3d* mg = cvi->get_mg() ;
317 
318  // Le resultat
319  Mtbl* mti = new Mtbl(mg) ;
320 
321  double r_phi = cvi->get_rot_phi() ;
322  double t_x = cvi->get_ori_x() ;
323 
324  if ( fabs(r_phi) < 1.e-14 ) {
325  *mti = (cvi->x) + t_x ;
326  }
327  else if ( fabs(r_phi - M_PI) < 1.e-14 ) {
328  *mti = - (cvi->x) + t_x ;
329  }
330  else {
331  Mtbl phi = cvi->phi + r_phi ;
332  *mti = (cvi->r) * (cvi->sint) * cos(phi) + t_x ;
333  }
334 
335  // Termine
336  return mti ;
337 }
338 
339  //--------------------//
340  // Coord. Y "absolue" //
341  //--------------------//
342 
343 Mtbl* map_af_fait_ya(const Map* cvi) {
344 
345  // recup de la grille
346  const Mg3d* mg = cvi->get_mg() ;
347 
348  // Le resultat
349  Mtbl* mti = new Mtbl(mg) ;
350 
351  double r_phi = cvi->get_rot_phi() ;
352  double t_y = cvi->get_ori_y() ;
353 
354  if ( fabs(r_phi) < 1.e-14 ) {
355  *mti = (cvi->y) + t_y ;
356  }
357  else if ( fabs(r_phi - M_PI) < 1.e-14 ) {
358  *mti = - (cvi->y) + t_y ;
359  }
360  else {
361  Mtbl phi = cvi->phi + r_phi ;
362  *mti = (cvi->r) * (cvi->sint) * sin(phi) + t_y ;
363  }
364 
365  // Termine
366  return mti ;
367 }
368 
369  //--------------------//
370  // Coord. Z "absolue" //
371  //--------------------//
372 
373 Mtbl* map_af_fait_za(const Map* cvi) {
374 
375  // recup de la grille
376  const Mg3d* mg = cvi->get_mg() ;
377 
378  double t_z = cvi->get_ori_z() ;
379 
380  // Le resultat
381  Mtbl* mti = new Mtbl(mg) ;
382 
383  *mti = (cvi->r) * (cvi->cost) + t_z ;
384 
385  // Termine
386  return mti ;
387 }
388 
389  //---------------//
390  // Trigonometrie //
391  //---------------//
392 
393 Mtbl* map_af_fait_sint(const Map* cvi) {
394 
395  // recup du changement de variable
396  const Map_af* cv = static_cast<const Map_af*>(cvi) ;
397  const Mg3d* mg = cv->get_mg() ;
398  int nz = mg->get_nzone() ;
399 
400  // Le resultat
401  Mtbl* mti = new Mtbl(mg) ;
402  mti->set_etat_qcq() ;
403 
404  int i, j, k ;
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] ;
411  tb->set_etat_qcq() ;
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]) ;
417  p_r++ ;
418  } // Fin de boucle sur r
419  } // Fin de boucle sur theta
420  } // Fin de boucle sur phi
421  } // Fin de boucle sur zone
422 
423  // Termine
424  return mti ;
425 }
426 
427 Mtbl* map_af_fait_cost(const Map* cvi) {
428 
429  // recup du changement de variable
430  const Map_af* cv = static_cast<const Map_af*>(cvi) ;
431  const Mg3d* mg = cv->get_mg() ;
432  int nz = mg->get_nzone() ;
433 
434  // Le resultat
435  Mtbl* mti = new Mtbl(mg) ;
436  mti->set_etat_qcq() ;
437 
438  int i, j, k ;
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] ;
445  tb->set_etat_qcq() ;
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]) ;
451  p_r++ ;
452  } // Fin de boucle sur r
453  } // Fin de boucle sur theta
454  } // Fin de boucle sur phi
455  } // Fin de boucle sur zone
456 
457  // Termine
458  return mti ;
459 }
460 
461 Mtbl* map_af_fait_sinp(const Map* cvi) {
462 
463  // recup du changement de variable
464  const Map_af* cv = static_cast<const Map_af*>(cvi) ;
465  const Mg3d* mg = cv->get_mg() ;
466  int nz = mg->get_nzone() ;
467 
468  // Le resultat
469  Mtbl* mti = new Mtbl(mg) ;
470  mti->set_etat_qcq() ;
471 
472  int i, j, k ;
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] ;
479  tb->set_etat_qcq() ;
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]) ;
485  p_r++ ;
486  } // Fin de boucle sur r
487  } // Fin de boucle sur theta
488  } // Fin de boucle sur phi
489  } // Fin de boucle sur zone
490 
491  // Termine
492  return mti ;
493 }
494 
495 Mtbl* map_af_fait_cosp(const Map* cvi) {
496 
497  // recup du changement de variable
498  const Map_af* cv = static_cast<const Map_af*>(cvi) ;
499  const Mg3d* mg = cv->get_mg() ;
500  int nz = mg->get_nzone() ;
501 
502  // Le resultat
503  Mtbl* mti = new Mtbl(mg) ;
504  mti->set_etat_qcq() ;
505 
506  int i, j, k ;
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] ;
513  tb->set_etat_qcq() ;
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]) ;
519  p_r++ ;
520  } // Fin de boucle sur r
521  } // Fin de boucle sur theta
522  } // Fin de boucle sur phi
523  } // Fin de boucle sur zone
524 
525  // Termine
526  return mti ;
527 }
528 
529 /*
530  ************************************************************************
531  * x/R dans le noyau, 1/R dans les coquilles, (x-1)/U dans la ZEC
532  ************************************************************************
533  */
534 
535 Mtbl* map_af_fait_xsr(const Map* cvi) {
536 
537  // recup du changement de variable
538  const Map_af* cv = static_cast<const Map_af*>(cvi) ;
539  const Mg3d* mg = cv->get_mg() ;
540  int nz = mg->get_nzone() ;
541 
542  // Le resultat
543  Mtbl* mti = new Mtbl(mg) ;
544  mti->set_etat_qcq() ;
545 
546  // Pour le confort
547  double* alpha = cv->alpha ;
548  double* beta = cv->beta ;
549 
550  int i, j, k ;
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] ;
557  tb->set_etat_qcq() ;
558  double* p_r = tb->t ;
559 
560  switch(mg->get_type_r(l)) {
561 
562  case RARE:
563  assert(beta[l]==0) ;
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] ;
568  p_r++ ;
569  } // Fin de boucle sur r
570  } // Fin de boucle sur theta
571  } // Fin de boucle sur phi
572  break ;
573 
574  case FIN:
575  for (k=0 ; k<ip ; k++) {
576  for (j=0 ; j<it ; j++) {
577  if (ir == 1) { //Some hack for angular grid case...
578  *p_r = 1. / beta[l] ;
579  p_r++ ;
580  }
581  else
582  for (i=0 ; i<ir ; i++) {
583  *p_r = 1. / ( alpha[l] * (g->x)[i] + beta[l] ) ;
584  p_r++ ;
585  } // Fin de boucle sur r
586  } // Fin de boucle sur theta
587  } // Fin de boucle sur phi
588  break ;
589 
590  case UNSURR:
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] ;
596  p_r++ ;
597  } // Fin de boucle sur r
598  } // Fin de boucle sur theta
599  } // Fin de boucle sur phi
600  break ;
601 
602  default:
603  cout << "map_af_fait_xsr: unknown type_r !" << endl ;
604  abort() ;
605 
606  } // Fin du switch
607  } // Fin de boucle sur zone
608 
609  // Termine
610  return mti ;
611 
612 }
613 
614 /*
615  ************************************************************************
616  * 1/(dR/dx) ( -1/(dU/dx) ds la ZEC )
617  ************************************************************************
618  */
619 
620 Mtbl* map_af_fait_dxdr(const Map* cvi) {
621 
622  // recup du changement de variable
623  const Map_af* cv = static_cast<const Map_af*>(cvi) ;
624  const Mg3d* mg = cv->get_mg() ;
625  int nz = mg->get_nzone() ;
626 
627  // Le resultat
628  Mtbl* mti = new Mtbl(mg) ;
629  mti->set_etat_qcq() ;
630 
631  // Pour le confort
632  double* alpha = cv->alpha ;
633 
634  int i, j, k ;
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] ;
640  tb->set_etat_qcq() ;
641  double* p_r = tb->t ;
642 
643  switch(mg->get_type_r(l)) {
644 
645  case FIN: case RARE:
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] ;
650  p_r++ ;
651  } // Fin de boucle sur r
652  } // Fin de boucle sur theta
653  } // Fin de boucle sur phi
654  break ;
655 
656  case UNSURR:
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] ;
661  p_r++ ;
662  } // Fin de boucle sur r
663  } // Fin de boucle sur theta
664  } // Fin de boucle sur phi
665  break ;
666 
667 
668  default:
669  cout << "map_af_fait_dxdr: unknown type_r !" << endl ;
670  abort() ;
671  } // Fin du switch
672  } // Fin de boucle sur zone
673 
674  // Termine
675  return mti ;
676 }
677 
678 /*
679  ************************************************************************
680  * dR/dtheta
681  ************************************************************************
682  */
683 
684 Mtbl* map_af_fait_drdt(const Map* cvi) {
685 
686  // recup de la grille
687  const Mg3d* mg = cvi->get_mg() ;
688 
689  // Le resultat est nul :
690  Mtbl* mti = new Mtbl(mg) ;
691  mti->set_etat_zero() ;
692 
693  return mti ;
694 }
695 
696 /*
697  ************************************************************************
698  * 1/sin(theta) dR/dphi
699  ************************************************************************
700  */
701 
702 Mtbl* map_af_fait_stdrdp(const Map* cvi) {
703 
704  // recup de la grille
705  const Mg3d* mg = cvi->get_mg() ;
706 
707  // Le resultat est nul :
708  Mtbl* mti = new Mtbl(mg) ;
709  mti->set_etat_zero() ;
710 
711  return mti ;
712 }
713 
714 /*
715  ************************************************************************
716  * 1/R dR/dtheta
717  ************************************************************************
718  */
719 
720 Mtbl* map_af_fait_srdrdt(const Map* cvi) {
721 
722  // recup de la grille
723  const Mg3d* mg = cvi->get_mg() ;
724 
725  // Le resultat est nul :
726  Mtbl* mti = new Mtbl(mg) ;
727  mti->set_etat_zero() ;
728 
729  return mti ;
730 }
731 
732 /*
733  ************************************************************************
734  * 1/(R sin(theta)) dR/dphi
735  ************************************************************************
736  */
737 
738 Mtbl* map_af_fait_srstdrdp(const Map* cvi) {
739 
740  // recup de la grille
741  const Mg3d* mg = cvi->get_mg() ;
742 
743  // Le resultat est nul :
744  Mtbl* mti = new Mtbl(mg) ;
745  mti->set_etat_zero() ;
746 
747  return mti ;
748 }
749 
750 /*
751  ************************************************************************
752  * 1/R^2 dR/dtheta
753  ************************************************************************
754  */
755 
756 Mtbl* map_af_fait_sr2drdt(const Map* cvi) {
757 
758  // recup de la grille
759  const Mg3d* mg = cvi->get_mg() ;
760 
761  // Le resultat est nul :
762  Mtbl* mti = new Mtbl(mg) ;
763  mti->set_etat_zero() ;
764 
765  return mti ;
766 }
767 
768 /*
769  ************************************************************************
770  * 1/(R^2 sin(theta)) dR/dphi
771  ************************************************************************
772  */
773 
774 Mtbl* map_af_fait_sr2stdrdp(const Map* cvi) {
775 
776  // recup de la grille
777  const Mg3d* mg = cvi->get_mg() ;
778 
779  // Le resultat est nul :
780  Mtbl* mti = new Mtbl(mg) ;
781  mti->set_etat_zero() ;
782 
783  return mti ;
784 }
785 
786 /*
787  ************************************************************************
788  * d^2R/dx^2
789  ************************************************************************
790  */
791 
792 Mtbl* map_af_fait_d2rdx2(const Map* cvi) {
793 
794  // recup de la grille
795  const Mg3d* mg = cvi->get_mg() ;
796 
797  // Le resultat est nul :
798  Mtbl* mti = new Mtbl(mg) ;
799  mti->set_etat_zero() ;
800 
801  return mti ;
802 }
803 
804 /*
805  *****************************************************************************
806  * 1/R^2 ( 1/sin(th) d/dth( sin(th) dR/dth ) + 1/sin(th)^2 d^2R/dphi^2 )
807  *****************************************************************************
808  */
809 
810 Mtbl* map_af_fait_lapr_tp(const Map* cvi) {
811 
812  // recup de la grille
813  const Mg3d* mg = cvi->get_mg() ;
814 
815  // Le resultat est nul :
816  Mtbl* mti = new Mtbl(mg) ;
817  mti->set_etat_zero() ;
818 
819  return mti ;
820 }
821 
822 /*
823  ************************************************************************
824  * d^2R/dthdx
825  ************************************************************************
826  */
827 
828 Mtbl* map_af_fait_d2rdtdx(const Map* cvi) {
829 
830  // recup de la grille
831  const Mg3d* mg = cvi->get_mg() ;
832 
833  // Le resultat est nul :
834  Mtbl* mti = new Mtbl(mg) ;
835  mti->set_etat_zero() ;
836 
837  return mti ;
838 }
839 
840 /*
841  ************************************************************************
842  * 1/sin(th) d^2R/dphidx
843  ************************************************************************
844  */
845 
846 Mtbl* map_af_fait_sstd2rdpdx(const Map* cvi) {
847 
848  // recup de la grille
849  const Mg3d* mg = cvi->get_mg() ;
850 
851  // Le resultat est nul :
852  Mtbl* mti = new Mtbl(mg) ;
853  mti->set_etat_zero() ;
854 
855  return mti ;
856 }
857 
858 /*
859  ************************************************************************
860  * d^2R/dtheta^2
861  ************************************************************************
862  */
863 
864 Mtbl* map_af_fait_sr2d2rdt2(const Map* cvi) {
865 
866  // recup de la grille
867  const Mg3d* mg = cvi->get_mg() ;
868 
869  // Le resultat est nul :
870  Mtbl* mti = new Mtbl(mg) ;
871  mti->set_etat_zero() ;
872 
873  return mti ;
874 }
875 
876 }
Lorene prototypes.
Definition: app_hor.h:67
Cmp cos(const Cmp &)
Cosine.
Definition: cmp_math.C:97
int get_nzone() const
Returns the number of domains.
Definition: grilles.h:465
Cmp sin(const Cmp &)
Sine.
Definition: cmp_math.C:72
const Mg3d * get_mg() const
Gives the Mg3d on which the Mtbl is defined.
Definition: mtbl.h:274