LORENE
map.h
1 /*
2  * Definition of Lorene classes Map
3  * Map_radial
4  * Map_af
5  * Map_et
6  * Map_log
7  *
8  */
9 
10 /*
11  * Copyright (c) 1999-2000 Jean-Alain Marck
12  * Copyright (c) 1999-2003 Eric Gourgoulhon
13  * Copyright (c) 1999-2001 Philippe Grandclement
14  * Copyright (c) 2000-2001 Jerome Novak
15  * Copyright (c) 2000-2001 Keisuke Taniguchi
16  *
17  * This file is part of LORENE.
18  *
19  * LORENE is free software; you can redistribute it and/or modify
20  * it under the terms of the GNU General Public License as published by
21  * the Free Software Foundation; either version 2 of the License, or
22  * (at your option) any later version.
23  *
24  * LORENE is distributed in the hope that it will be useful,
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27  * GNU General Public License for more details.
28  *
29  * You should have received a copy of the GNU General Public License
30  * along with LORENE; if not, write to the Free Software
31  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
32  *
33  */
34 
35 
36 #ifndef __MAP_H_
37 #define __MAP_H_
38 
39 /*
40  * $Id: map.h,v 1.59 2014/10/13 08:52:35 j_novak Exp $
41  * $Log: map.h,v $
42  * Revision 1.59 2014/10/13 08:52:35 j_novak
43  * Lorene classes and functions now belong to the namespace Lorene.
44  *
45  * Revision 1.58 2014/10/06 15:09:40 j_novak
46  * Modified #include directives to use c++ syntax.
47  *
48  * Revision 1.57 2014/01/14 13:24:02 b_peres
49  * *** empty log message ***
50  *
51  * Revision 1.56 2012/01/24 14:58:54 j_novak
52  * Removed functions XXX_fait_xi()
53  *
54  * Revision 1.55 2012/01/17 15:34:20 j_penner
55  * *** empty log message ***
56  *
57  * Revision 1.54 2012/01/17 10:20:07 j_penner
58  * added a member cxi that allows for direct access to the computational coordinates in each domain
59  *
60  * Revision 1.53 2008/09/29 13:23:51 j_novak
61  * Implementation of the angular mapping associated with an affine
62  * mapping. Things must be improved to take into account the domain index.
63  *
64  * Revision 1.52 2007/10/16 21:52:10 e_gourgoulhon
65  * Added method poisson_compact for multi-domains.
66  *
67  * Revision 1.51 2007/05/15 12:44:18 p_grandclement
68  * Scalar version of reevaluate
69  *
70  * Revision 1.50 2007/05/06 10:48:08 p_grandclement
71  * Modification of a few operators for the vorton project
72  *
73  * Revision 1.49 2007/01/16 15:05:59 n_vasset
74  * New constructor (taking a Scalar in mono-domain angular grid for
75  * boundary) for function sol_elliptic_boundary
76  *
77  * Revision 1.48 2006/08/31 12:10:51 j_novak
78  * More comments for Map_af::avance_dalembert().
79  *
80  * Revision 1.47 2006/05/26 09:00:09 j_novak
81  * New members for multiplication or division by cos(theta).
82  *
83  * Revision 1.46 2006/04/25 07:21:54 p_grandclement
84  * Various changes for the NS_BH project
85  *
86  * Revision 1.45 2005/11/30 11:09:03 p_grandclement
87  * Changes for the Bin_ns_bh project
88  *
89  * Revision 1.44 2005/11/24 09:25:06 j_novak
90  * Added the Scalar version for the Laplacian
91  *
92  * Revision 1.43 2005/09/15 15:51:25 j_novak
93  * The "rotation" (change of triad) methods take now Scalars as default
94  * arguments.
95  *
96  * Revision 1.42 2005/08/26 14:02:38 p_grandclement
97  * Modification of the elliptic solver that matches with an oscillatory exterior solution
98  * small correction in Poisson tau also...
99  *
100  * Revision 1.41 2005/08/25 12:14:07 p_grandclement
101  * Addition of a new method to solve the scalar Poisson equation, based on a multi-domain Tau-method
102  *
103  * Revision 1.40 2005/06/09 07:56:24 f_limousin
104  * Implement a new function sol_elliptic_boundary() and
105  * Vector::poisson_boundary(...) which solve the vectorial poisson
106  * equation (method 6) with an inner boundary condition.
107  *
108  * Revision 1.39 2005/04/04 21:30:41 e_gourgoulhon
109  * Added argument lambda to method poisson_angu
110  * to treat the generalized angular Poisson equation:
111  * Lap_ang u + lambda u = source.
112  *
113  * Revision 1.38 2004/12/29 16:37:22 k_taniguchi
114  * Addition of some functions with the multipole falloff condition.
115  *
116  * Revision 1.37 2004/12/02 09:33:04 p_grandclement
117  * *** empty log message ***
118  *
119  * Revision 1.36 2004/11/30 20:42:05 k_taniguchi
120  * Addition of some functions with the falloff condition and a method
121  * to resize the external shell.
122  *
123  * Revision 1.35 2004/11/23 12:39:12 f_limousin
124  * Intoduce function poisson_dir_neu(...) to solve a scalar poisson
125  * equation with a mixed boundary condition (Dirichlet + Neumann).
126  *
127  * Revision 1.34 2004/10/11 15:08:59 j_novak
128  * The radial manipulation functions take Scalar as arguments, instead of Cmp.
129  * Added a conversion operator from Scalar to Cmp.
130  * The Cmp radial manipulation function make conversion to Scalar, call to the
131  * Map_radial version with a Scalar argument and back.
132  *
133  * Revision 1.33 2004/10/08 13:34:35 j_novak
134  * Scalar::div_r() does not need to pass through Cmp version anymore.
135  *
136  * Revision 1.32 2004/08/24 09:14:40 p_grandclement
137  * Addition of some new operators, like Poisson in 2d... It now requieres the
138  * GSL library to work.
139  *
140  * Also, the way a variable change is stored by a Param_elliptic is changed and
141  * no longer uses Change_var but rather 2 Scalars. The codes using that feature
142  * will requiere some modification. (It should concern only the ones about monopoles)
143  *
144  * Revision 1.31 2004/07/27 08:24:26 j_novak
145  * Modif. comments
146  *
147  * Revision 1.30 2004/07/26 16:02:21 j_novak
148  * Added a flag to specify whether the primitive should be zero either at r=0
149  * or at r going to infinity.
150  *
151  * Revision 1.29 2004/06/22 08:49:57 p_grandclement
152  * Addition of everything needed for using the logarithmic mapping
153  *
154  * Revision 1.28 2004/06/14 15:23:53 e_gourgoulhon
155  * Added virtual function primr for computation of radial primitives.
156  *
157  * Revision 1.27 2004/03/31 11:22:23 f_limousin
158  * Methods Map_et::poisson_interne and Map_af::poisson_interne have been
159  * implemented to solve the continuity equation for strange stars.
160  *
161  * Revision 1.26 2004/03/22 13:12:41 j_novak
162  * Modification of comments to use doxygen instead of doc++
163  *
164  * Revision 1.24 2004/03/01 09:57:02 j_novak
165  * the wave equation is solved with Scalars. It now accepts a grid with a
166  * compactified external domain, which the solver ignores and where it copies
167  * the values of the field from one time-step to the next.
168  *
169  * Revision 1.23 2004/02/11 09:47:44 p_grandclement
170  * Addition of a new elliptic solver, matching with the homogeneous solution
171  * at the outer shell and not solving in the external domain (more details
172  * coming soon ; check your local Lorene dealer...)
173  *
174  * Revision 1.22 2004/01/29 08:50:01 p_grandclement
175  * Modification of Map::operator==(const Map&) and addition of the surface
176  * integrales using Scalar.
177  *
178  * Revision 1.21 2004/01/28 16:46:22 p_grandclement
179  * Addition of the sol_elliptic_fixe_der_zero stuff
180  *
181  * Revision 1.20 2004/01/28 10:35:52 j_novak
182  * Added new methods mult_r() for Scalars. These do not change the dzpuis flag.
183  *
184  * Revision 1.19 2004/01/27 09:33:46 j_novak
185  * New method Map_radial::div_r_zec
186  *
187  * Revision 1.18 2004/01/26 16:16:15 j_novak
188  * Methods of gradient for Scalar s. The input can have any dzpuis.
189  *
190  * Revision 1.17 2004/01/19 21:38:21 e_gourgoulhon
191  * Corrected sign error in comments of Map_radial::dxdr.
192  *
193  * Revision 1.16 2003/12/30 22:52:47 e_gourgoulhon
194  * Class Map: added methods flat_met_spher() and flat_met_cart() to get
195  * flat metric associated with the coordinates described by the mapping.
196  *
197  * Revision 1.15 2003/12/11 14:48:47 p_grandclement
198  * Addition of ALL (and that is a lot !) the files needed for the general elliptic solver ... UNDER DEVELOPEMENT...
199  *
200  * Revision 1.14 2003/11/06 14:43:37 e_gourgoulhon
201  * Gave a name to const arguments in certain method prototypes (e.g.
202  * constructors) to correct a bug of DOC++.
203  *
204  * Revision 1.13 2003/11/04 22:54:49 e_gourgoulhon
205  * Added new virtual methods mult_cost, mult_sint and div_sint.
206  *
207  * Revision 1.12 2003/10/16 08:49:21 j_novak
208  * Added a flag to decide wether the output is in the Ylm or in the standard base.
209  *
210  * Revision 1.11 2003/10/15 21:08:22 e_gourgoulhon
211  * Added method poisson_angu.
212  *
213  * Revision 1.10 2003/10/15 16:03:35 j_novak
214  * Added the angular Laplace operator for Scalar.
215  *
216  * Revision 1.9 2003/10/15 10:27:33 e_gourgoulhon
217  * Classes Map, Map_af and Map_et: added new methods dsdt, stdsdp and div_tant.
218  * Class Map_radial: added new Coord's : drdt and stdrdp.
219  *
220  * Revision 1.8 2003/06/20 14:14:53 f_limousin
221  * Add the operator== to compare two Cmp.
222  *
223  * Revision 1.7 2003/06/20 09:27:09 j_novak
224  * Modif commentaires.
225  *
226  * Revision 1.6 2002/10/16 14:36:29 j_novak
227  * Reorganization of #include instructions of standard C++, in order to
228  * use experimental version 3 of gcc.
229  *
230  * Revision 1.5 2002/09/13 09:17:33 j_novak
231  * Modif. commentaires
232  *
233  * Revision 1.4 2002/06/17 14:05:16 j_novak
234  * friend functions are now also declared outside the class definition
235  *
236  * Revision 1.3 2002/05/07 07:06:37 e_gourgoulhon
237  * Compatibily with xlC compiler on IBM SP2:
238  * added declaration of functions map_af_fait_* and map_et_fait_*
239  * outside the classes declarations.
240  *
241  * Revision 1.2 2002/01/15 15:53:06 p_grandclement
242  * I have had a constructor fot map_et using the equation of the surface
243  * of the star.
244  *
245  * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
246  * LORENE
247  *
248  * Revision 2.110 2001/10/29 15:31:55 novak
249  * Ajout de Map_radial::div_r
250  *
251  * Revision 2.109 2001/10/16 10:02:49 novak
252  * *** empty log message ***
253  *
254  * Revision 2.108 2001/07/19 14:01:00 novak
255  * new arguments for Map_af::dalembert
256  *
257  * Revision 2.107 2001/02/26 17:28:31 eric
258  * Ajout de la fonction virtuelle resize.
259  *
260  * Revision 2.106 2001/01/10 11:03:00 phil
261  * ajout de homothetie interne
262  *
263  * Revision 2.105 2001/01/02 10:51:55 phil
264  * ajout integrale de surface a l'infini
265  *
266  * Revision 2.104 2000/10/23 13:59:48 eric
267  * Map_et::adapt: changement des arguments (en autre, ajout de nz_search).
268  *
269  * Revision 2.103 2000/10/20 09:39:19 phil
270  * changement commentaires
271  *
272  * Revision 2.102 2000/10/19 14:33:23 novak
273  * corrige oubli pour Map_et?
274  *
275  * Revision 2.101 2000/10/19 14:11:20 novak
276  * Ajout des fonctions membres Map::dalembert et Map_af::dalembert
277  * (etat experimental)
278  *
279  * Revision 2.100 2000/10/09 13:46:39 eric
280  * Ajout de la fonction virtuelle poisson2d.
281  *
282  * Revision 2.99 2000/09/19 15:28:55 phil
283  * *** empty log message ***
284  *
285  * Revision 2.98 2000/09/19 15:24:19 phil
286  * ajout du passage de cartesienne en spheriques
287  *
288  * Revision 2.97 2000/09/19 13:05:38 phil
289  * ajout integrale_surface
290  *
291  * Revision 2.96 2000/09/11 15:54:03 eric
292  * Suppression des methodes deriv_x, deriv_y et deriv_z.
293  * Introduction des methodes comp_x_from_spherical, etc...
294  *
295  * Revision 2.95 2000/09/07 15:27:58 keisuke
296  * Add a new argument Cmp& uu in Map_af::poisson_regular and Map_et::poisson_regular.
297  *
298  * Revision 2.94 2000/09/04 15:30:56 keisuke
299  * Modify the arguments of Map_af::poisson_regular and Map_et::poisson_regular.
300  *
301  * Revision 2.93 2000/09/04 13:36:19 keisuke
302  * Modify the explanation for "uu_div" in Map_et::poisson_regular.
303  *
304  * Revision 2.92 2000/08/31 15:50:12 keisuke
305  * Modify Map_af::poisson_regular.
306  * Add Map_et::poisson_regular and Map::poisson_regular.
307  *
308  * Revision 2.91 2000/08/31 13:03:22 eric
309  * Ajout de la fonction virtuelle mult_rsint.
310  *
311  * Revision 2.90 2000/08/28 16:17:37 keisuke
312  * Add "int nzet" in the argumant of Map_af::poisson_regular.
313  *
314  * Revision 2.89 2000/08/18 11:10:12 eric
315  * Classe Map_et: ajout de l'operateur d'affectation a un autre Map_et.
316  *
317  * Revision 2.88 2000/08/11 08:50:18 keisuke
318  * Modif Map_af::poisson_regular
319  *
320  * Revision 2.87 2000/08/10 12:54:00 keisuke
321  * Ajout de Map_af::poisson_regular
322  *
323  * Revision 2.86 2000/07/20 14:21:07 eric
324  * Ajout de la fonction div_rsint.
325  *
326  * Revision 2.85 2000/05/25 13:54:41 eric
327  * Modif commentaires
328  *
329  * Revision 2.84 2000/05/22 14:38:51 phil
330  * ajout de inc_dzpuis et dec_dzpuis
331  *
332  * Revision 2.83 2000/04/27 15:18:54 phil
333  * *** empty log message ***
334  *
335  * Revision 2.82 2000/03/20 13:33:23 phil
336  * commentaires
337  *
338  * Revision 2.81 2000/03/17 17:32:48 phil
339  * *** empty log message ***
340  *
341  * Revision 2.80 2000/03/17 17:01:54 phil
342  * *** empty log message ***
343  *
344  * Revision 2.79 2000/03/17 16:58:48 phil
345  * ajout de poisson_frontiere
346  *
347  * Revision 2.78 2000/03/06 11:29:51 eric
348  * Ajout du membre reeavaluate_symy.
349  *
350  * Revision 2.77 2000/02/15 15:08:21 eric
351  * Changement du Param dans Map_et::adapt : fact_echelle est desormais
352  * passe en double_mod.
353  *
354  * Revision 2.76 2000/02/15 10:26:25 phil
355  * commentaire +
356  * suppression de poisson_vect et poisson_vect_oohara
357  *
358  * Revision 2.75 2000/02/11 13:37:43 eric
359  * Ajout de la fonction convert_absolute.
360  *
361  * Revision 2.74 2000/02/09 09:53:37 phil
362  * ajout de poisson_vect_oohara
363  *
364  * Revision 2.73 2000/01/26 13:07:02 eric
365  * Reprototypage complet des routines de derivation:
366  * le resultat est desormais suppose alloue a l'exterieur de la routine
367  * et est passe en argument (Cmp& resu), si bien que le prototypage
368  * complet devient:
369  * void DERIV(const Cmp& ci, Cmp& resu)
370  *
371  * Revision 2.72 2000/01/24 17:08:21 eric
372  * Class Map_af : suppression de la fonction convert.
373  * suppression du constructeur par convertion d'un Map_et.
374  * ajout du constructeur par conversion d'un Map.
375  *
376  * Revision 2.71 2000/01/24 16:41:43 eric
377  * Ajout de la fonction virtuelle operator=(const Map_af& ).
378  * Classe Map_af : ajout de la fonction convert(const Map& ).
379  *
380  * Revision 2.70 2000/01/21 12:48:34 phil
381  * changement prototypage de Map::poisson_vect
382  *
383  * Revision 2.69 2000/01/20 16:35:05 phil
384  * *** empty log message ***
385  *
386  * Revision 2.68 2000/01/20 15:44:42 phil
387  * *** empty log message ***
388  *
389  * Revision 2.67 2000/01/20 15:31:56 phil
390  * *** empty log message ***
391  *
392  * Revision 2.66 2000/01/20 14:18:06 phil
393  * *** empty log message ***
394  *
395  * Revision 2.65 2000/01/20 13:16:34 phil
396  * *** empty log message ***
397  *
398  * Revision 2.64 2000/01/20 12:51:24 phil
399  * *** empty log message ***
400  *
401  * Revision 2.63 2000/01/20 12:45:28 phil
402  * *** empty log message ***
403  *
404  * Revision 2.62 2000/01/20 12:40:27 phil
405  * *** empty log message ***
406  *
407  * Revision 2.61 2000/01/20 11:27:54 phil
408  * ajout de poisson_vect
409  *
410  * Revision 2.60 2000/01/13 15:31:55 eric
411  * Modif commentaires/
412  *
413  * Revision 2.59 2000/01/12 16:02:57 eric
414  * Modif commentaires poisson_compact.
415  *
416  * Revision 2.58 2000/01/12 12:54:23 eric
417  * Ajout du Cmp null, *p_cmp_zero, et de la methode associee cmp_zero().
418  *
419  * Revision 2.57 2000/01/10 13:27:43 eric
420  * Ajout des bases vectorielles associees aux coordonnees :
421  * membres bvect_spher et bvect_cart.
422  *
423  * Revision 2.56 2000/01/10 09:12:47 eric
424  * Reprototypage de poisson_compact : Valeur -> Cmp, Tenseur.
425  * Suppression de poisson_compact_boucle.
426  * poisson_compact est desormais implementee au niveau Map_radial.
427  *
428  * Revision 2.55 2000/01/04 15:23:11 eric
429  * Classe Map_radial : les data sont listees en premier
430  * Introduction de la fonction reevalutate.
431  *
432  * Revision 2.54 2000/01/03 13:30:32 eric
433  * Ajout de la fonction adapt.
434  *
435  * Revision 2.53 1999/12/22 17:09:52 eric
436  * Modif commentaires.
437  *
438  * Revision 2.52 1999/12/21 16:26:25 eric
439  * Ajout du constructeur par conversion Map_af::Map_af(const Map_et&).
440  * Ajout des fonctions Map_af::set_alpha et Map_af::set_beta.
441  *
442  * Revision 2.51 1999/12/21 13:01:29 eric
443  * Changement de prototype de la routine poisson : la solution est
444  * desormais passee en argument (et non plus en valeur de retour)
445  * pour permettre l'initialisation de methodes de resolution iterative.
446  *
447  * Revision 2.50 1999/12/21 10:12:09 eric
448  * Modif commentaires.
449  *
450  * Revision 2.49 1999/12/21 10:06:05 eric
451  * Ajout de l'argument Param& a poisson.
452  *
453  * Revision 2.48 1999/12/20 15:44:35 eric
454  * Modif commentaires.
455  *
456  * Revision 2.47 1999/12/20 10:47:45 eric
457  * Modif commentaires.
458  *
459  * Revision 2.46 1999/12/20 10:24:12 eric
460  * Ajout des fonctions de lecture des parametres de Map_et:
461  * get_alpha(), get_beta(), get_ff(), get_gg().
462  *
463  * Revision 2.45 1999/12/16 14:50:08 eric
464  * Modif commentaires.
465  *
466  * Revision 2.44 1999/12/16 14:17:54 eric
467  * Introduction de l'argument const Param& par dans val_lx et val_lx_jk.
468  * (en remplacement de l'argument Tbl& param).
469  *
470  * Revision 2.43 1999/12/09 10:45:24 eric
471  * Ajout de la fonction virtuelle integrale.
472  *
473  * Revision 2.42 1999/12/07 14:50:47 eric
474  * Changement ordre des arguments val_r, val_lx
475  * val_r_kj --> val_r_jk
476  * val_lx_kj -->val_lx_jk
477  *
478  * Revision 2.41 1999/12/06 16:45:20 eric
479  * Surcharge de val_lx avec la version sans param.
480  *
481  * Revision 2.40 1999/12/06 15:33:44 eric
482  * Ajout des fonctions val_r_kj et val_lx_kj.
483  *
484  * Revision 2.39 1999/12/06 13:11:54 eric
485  * Introduction des fonctions val_r, val_lx et homothetie.
486  *
487  * Revision 2.38 1999/12/02 14:28:22 eric
488  * Reprototypage de la fonction poisson: Valeur -> Cmp.
489  *
490  * Revision 2.37 1999/11/30 14:19:33 eric
491  * Reprototypage complet des fonctions membres mult_r, mult_r_zec,
492  * dec2_dzpuis et inc2_dzpuis : Valeur --> Cmp
493  *
494  * Revision 2.36 1999/11/29 13:17:57 eric
495  * Modif commentaires.
496  *
497  * Revision 2.35 1999/11/29 12:55:42 eric
498  * Changement prototype de la fonction laplacien : Valeur --> Cmp.
499  *
500  * Revision 2.34 1999/11/25 16:27:27 eric
501  * Reorganisation complete du calcul des derivees partielles.
502  *
503  * Revision 2.33 1999/11/24 16:31:17 eric
504  * Map_et: ajout des fonctions set_ff et set_gg.
505  *
506  * Revision 2.32 1999/11/24 14:31:48 eric
507  * Map_af: les membres alpha et beta deviennent prives.
508  * Map_af: introduction des fonctions get_alpha() et get_beta().
509  *
510  * Revision 2.31 1999/11/24 11:22:09 eric
511  * Map_et : Coords rendus publics
512  * Map_et : fonctions de constructions amies.
513  *
514  * Revision 2.30 1999/11/22 10:32:39 eric
515  * Introduction de la classe Map_et.
516  * Constructeurs de Map rendus protected.
517  * Fonction del_coord() rebaptisee reset_coord().
518  *
519  * Revision 2.29 1999/10/27 16:44:41 phil
520  * ajout de mult_r_zec
521  *
522  * Revision 2.28 1999/10/19 14:40:37 phil
523  * ajout de inc2_dzpuis()
524  *
525  * Revision 2.27 1999/10/15 14:12:20 eric
526  * *** empty log message ***
527  *
528  * Revision 2.26 1999/10/14 14:26:06 eric
529  * Depoussierage.
530  * Documentation.
531  *
532  * Revision 2.25 1999/10/11 11:16:29 phil
533  * changement prototypage de poisson_compact_boucle
534  *
535  * Revision 2.24 1999/10/11 10:48:51 phil
536  * changement de nom pour poisson a support compact
537  *
538  * Revision 2.23 1999/10/04 09:20:58 phil
539  * changement de prototypage de void Map_af::poisson_nul
540  *
541  * Revision 2.22 1999/09/30 18:38:32 phil
542  * *** empty log message ***
543  *
544  * Revision 2.21 1999/09/30 18:33:10 phil
545  * ajout de poisson_nul et poisson_nul_boucle
546  *
547  * Revision 2.20 1999/09/30 16:45:54 phil
548  * ajout de Map_af::poisson_nul(const Valeur&, int, int)
549  *
550  * Revision 2.19 1999/09/16 13:15:40 phil
551  * ajout de Valeur mult_r (const Valeur &)
552  *
553  * Revision 2.18 1999/09/15 10:42:11 phil
554  * ajout de Valeur dec2_dzpuis(const Valeur&)
555  *
556  * Revision 2.17 1999/09/14 13:45:45 phil
557  * suppression de la divergence
558  *
559  * Revision 2.16 1999/09/13 15:09:07 phil
560  * ajout de Map_af::divergence
561  *
562  * Revision 2.15 1999/09/13 13:52:23 phil
563  * ajout des derivations partielles par rapport a x,y et z.
564  *
565  * Revision 2.14 1999/09/07 14:35:20 phil
566  * ajout de la fonction Valeur** gradient(const Valeur&)
567  *
568  * Revision 2.13 1999/04/26 16:37:43 phil
569  * *** empty log message ***
570  *
571  * Revision 2.12 1999/04/26 16:33:28 phil
572  * *** empty log message ***
573  *
574  * Revision 2.11 1999/04/26 13:53:04 phil
575  * *** empty log message ***
576  *
577  * Revision 2.10 1999/04/26 13:51:19 phil
578  * ajout de Map_af::laplacien (2versions)
579  *
580  * Revision 2.9 1999/04/14 09:04:01 phil
581  * *** empty log message ***
582  *
583  * Revision 2.8 1999/04/14 08:53:27 phil
584  * *** empty log message ***
585  *
586  * Revision 2.7 1999/04/13 17:45:25 phil
587  * *** empty log message ***
588  *
589  * Revision 2.6 1999/04/13 17:02:41 phil
590  * ,
591  *
592  * Revision 2.5 1999/04/13 17:00:41 phil
593  * ajout de la resolution de poisson affine
594  *
595  * Revision 2.4 1999/03/04 13:10:53 eric
596  * Ajout des Coord representant les derivees du changement de variable
597  * dans la classe Map_radial.
598  *
599  * Revision 2.3 1999/03/01 17:00:38 eric
600  * *** empty log message ***
601  *
602  * Revision 2.2 1999/03/01 16:44:41 eric
603  * Operateurs << et >> sur les ostream.
604  * L'operateur >> est virtuel.
605  *
606  * Revision 2.1 1999/02/22 15:21:45 hyc
607  * *** empty log message ***
608  *
609  *
610  * Revision 2.0 1999/01/15 09:10:39 hyc
611  * *** empty log message ***
612  *
613  * $Header: /cvsroot/Lorene/C++/Include/map.h,v 1.59 2014/10/13 08:52:35 j_novak Exp $
614  *
615  */
616 
617 #include <cstdio>
618 
619 #include "coord.h"
620 #include "base_vect.h"
621 #include "valeur.h"
622 #include "tbl.h"
623 #include "itbl.h"
624 
625 namespace Lorene {
626 class Scalar ;
627 class Cmp ;
628 class Param ;
629 class Map_af ;
630 class Map_et ;
631 class Tenseur ;
632 class Param_elliptic ;
633 class Metric_flat ;
634 class Tbl ;
635 class Itbl ;
636 
637  //------------------------------------//
638  // class Map //
639  //------------------------------------//
640 
670 class Map {
671 
672  // Data :
673  // ----
674  protected:
676  const Mg3d* mg ;
677 
678  double ori_x ;
679  double ori_y ;
680  double ori_z ;
681  double rot_phi ;
682 
690 
698 
703 
708 
714 
715  mutable Map_af* p_mp_angu ;
716 
717  public:
718  Coord r ;
725 
726  Coord x ;
727  Coord y ;
728  Coord z ;
729 
733 
734 
735  // Constructors, destructor :
736  // ------------------------
737 
738  protected:
739  explicit Map(const Mg3d& ) ;
740  Map(const Map &) ;
741  Map(const Mg3d&, FILE* ) ;
742 
743  public:
744  virtual ~Map() ;
745 
746  // Memory management
747  // -----------------
748  protected:
749  virtual void reset_coord() ;
750 
751  // Outputs
752  // -------
753  private:
754  virtual ostream& operator>>(ostream &) const = 0 ;
755 
756  public:
757  virtual void sauve(FILE* ) const ;
758 
759 
760  // Extraction of information
761  // -------------------------
762 
763  public:
765  const Mg3d* get_mg() const {return mg; };
766 
768  double get_ori_x() const {return ori_x;} ;
770  double get_ori_y() const {return ori_y;} ;
772  double get_ori_z() const {return ori_z;} ;
773 
775  double get_rot_phi() const {return rot_phi;} ;
776 
783  const Base_vect_spher& get_bvect_spher() const {return bvect_spher;} ;
784 
791  const Base_vect_cart& get_bvect_cart() const {return bvect_cart;} ;
792 
796  const Metric_flat& flat_met_spher() const ;
797 
801  const Metric_flat& flat_met_cart() const ;
802 
807  const Cmp& cmp_zero() const {return *p_cmp_zero;} ;
808 
812  virtual const Map_af& mp_angu(int) const = 0 ;
813 
824  void convert_absolute(double xx, double yy, double zz,
825  double& rr, double& theta, double& pphi) const ;
826 
835  virtual double val_r(int l, double xi, double theta, double pphi)
836  const = 0 ;
837 
846  virtual void val_lx(double rr, double theta, double pphi,
847  int& l, double& xi) const = 0 ;
848 
861  virtual void val_lx(double rr, double theta, double pphi,
862  const Param& par, int& l, double& xi) const = 0 ;
863 
864 
866  virtual bool operator==(const Map& ) const = 0;
867 
868 
869 
870  // Modification of the origin, the orientation and the radial scale:
871  // ----------------------------------------------------------------
872  public:
873  void set_ori(double xa0, double ya0, double za0) ;
874  void set_rot_phi(double phi0) ;
875 
880  virtual void homothetie(double lambda) = 0 ;
881 
891  virtual void resize(int l, double lambda) = 0 ;
892 
893  // Modification of the mapping
894  // ---------------------------
895  public:
897  virtual void operator=(const Map_af& ) = 0 ;
898 
904  virtual void adapt(const Cmp& ent, const Param& par, int nbr=0) = 0 ;
905 
906  // Values of a Cmp at the new grid points
907  // --------------------------------------
908 
921  virtual void reevaluate(const Map* mp_prev, int nzet,
922  Cmp& uu) const = 0 ;
923 
937  virtual void reevaluate_symy(const Map* mp_prev, int nzet,
938  Cmp& uu) const = 0 ;
939 
952  virtual void reevaluate(const Map* mp_prev, int nzet,
953  Scalar& uu) const = 0 ;
954 
968  virtual void reevaluate_symy(const Map* mp_prev, int nzet,
969  Scalar& uu) const = 0 ;
970 
971  // Differential operators:
972  // ----------------------
973  public:
980  virtual void dsdxi(const Cmp& ci, Cmp& resu) const = 0 ;
981 
988  virtual void dsdr(const Cmp& ci, Cmp& resu) const = 0 ;
989 
996  virtual void srdsdt(const Cmp& ci, Cmp& resu) const = 0 ;
997 
1005  virtual void srstdsdp(const Cmp& ci, Cmp& resu) const = 0 ;
1006 
1014  virtual void dsdxi(const Scalar& uu, Scalar& resu) const = 0 ;
1015 
1023  virtual void dsdr(const Scalar& uu, Scalar& resu) const = 0 ;
1024 
1033  virtual void dsdradial(const Scalar& uu, Scalar& resu) const = 0 ;
1034 
1042  virtual void srdsdt(const Scalar& uu, Scalar& resu) const = 0 ;
1043 
1051  virtual void srstdsdp(const Scalar& uu, Scalar& resu) const = 0 ;
1052 
1057  virtual void dsdt(const Scalar& uu, Scalar& resu) const = 0 ;
1058 
1063  virtual void stdsdp(const Scalar& uu, Scalar& resu) const = 0 ;
1064 
1075  virtual void laplacien(const Scalar& uu, int zec_mult_r,
1076  Scalar& lap) const = 0 ;
1077 
1079  virtual void laplacien(const Cmp& uu, int zec_mult_r,
1080  Cmp& lap) const = 0 ;
1081 
1088  virtual void lapang(const Scalar& uu, Scalar& lap) const = 0 ;
1089 
1090 
1101  virtual void primr(const Scalar& uu, Scalar& resu,
1102  bool null_infty) const = 0 ;
1103 
1104 
1105  // Various linear operators
1106  // ------------------------
1107  public:
1111  virtual void mult_r(Scalar& uu) const = 0 ;
1112 
1116  virtual void mult_r(Cmp& ci) const = 0 ;
1117 
1121  virtual void mult_r_zec(Scalar& ) const = 0 ;
1122 
1125  virtual void mult_rsint(Scalar& ) const = 0 ;
1126 
1129  virtual void div_rsint(Scalar& ) const = 0 ;
1130 
1133  virtual void div_r(Scalar& ) const = 0 ;
1134 
1138  virtual void div_r_zec(Scalar& ) const = 0 ;
1139 
1142  virtual void mult_cost(Scalar& ) const = 0 ;
1143 
1146  virtual void div_cost(Scalar& ) const = 0 ;
1147 
1150  virtual void mult_sint(Scalar& ) const = 0 ;
1151 
1154  virtual void div_sint(Scalar& ) const = 0 ;
1155 
1158  virtual void div_tant(Scalar& ) const = 0 ;
1159 
1169  virtual void comp_x_from_spherical(const Scalar& v_r, const Scalar& v_theta,
1170  const Scalar& v_phi, Scalar& v_x) const = 0 ;
1172  virtual void comp_x_from_spherical(const Cmp& v_r, const Cmp& v_theta,
1173  const Cmp& v_phi, Cmp& v_x) const = 0 ;
1174 
1184  virtual void comp_y_from_spherical(const Scalar& v_r, const Scalar& v_theta,
1185  const Scalar& v_phi, Scalar& v_y) const = 0 ;
1186 
1188  virtual void comp_y_from_spherical(const Cmp& v_r, const Cmp& v_theta,
1189  const Cmp& v_phi, Cmp& v_y) const = 0 ;
1190 
1199  virtual void comp_z_from_spherical(const Scalar& v_r, const Scalar& v_theta,
1200  Scalar& v_z) const = 0 ;
1201 
1203  virtual void comp_z_from_spherical(const Cmp& v_r, const Cmp& v_theta,
1204  Cmp& v_z) const = 0 ;
1205 
1215  virtual void comp_r_from_cartesian(const Scalar& v_x, const Scalar& v_y,
1216  const Scalar& v_z, Scalar& v_r) const = 0 ;
1218  virtual void comp_r_from_cartesian(const Cmp& v_x, const Cmp& v_y,
1219  const Cmp& v_z, Cmp& v_r) const = 0 ;
1220 
1230  virtual void comp_t_from_cartesian(const Scalar& v_x, const Scalar& v_y,
1231  const Scalar& v_z, Scalar& v_t) const = 0 ;
1232 
1234  virtual void comp_t_from_cartesian(const Cmp& v_x, const Cmp& v_y,
1235  const Cmp& v_z, Cmp& v_t) const = 0 ;
1236 
1245  virtual void comp_p_from_cartesian(const Scalar& v_x, const Scalar& v_y,
1246  Scalar& v_p) const = 0 ;
1247 
1249  virtual void comp_p_from_cartesian(const Cmp& v_x, const Cmp& v_y,
1250  Cmp& v_p) const = 0 ;
1251 
1256  virtual void dec_dzpuis(Scalar& ) const = 0 ;
1257 
1262  virtual void dec2_dzpuis(Scalar& ) const = 0 ;
1263 
1268  virtual void inc_dzpuis(Scalar& ) const = 0 ;
1269 
1274  virtual void inc2_dzpuis(Scalar& ) const = 0 ;
1275 
1283  virtual Tbl* integrale(const Cmp&) const = 0 ;
1284 
1285  // PDE resolution :
1286  // --------------
1287  public:
1298  virtual void poisson(const Cmp& source, Param& par, Cmp& uu) const = 0 ;
1299 
1310  virtual void poisson_tau(const Cmp& source, Param& par, Cmp& uu) const = 0 ;
1311 
1312  virtual void poisson_falloff(const Cmp& source, Param& par, Cmp& uu,
1313  int k_falloff) const = 0 ;
1314 
1315  virtual void poisson_ylm(const Cmp& source, Param& par, Cmp& pot,
1316  int nylm, double* intvec) const = 0 ;
1317 
1340  virtual void poisson_regular(const Cmp& source, int k_div, int nzet,
1341  double unsgam1, Param& par, Cmp& uu,
1342  Cmp& uu_regu, Cmp& uu_div,
1343  Tenseur& duu_div, Cmp& source_regu,
1344  Cmp& source_div) const = 0 ;
1345 
1359  virtual void poisson_compact(const Cmp& source, const Cmp& aa,
1360  const Tenseur& bb, const Param& par,
1361  Cmp& psi) const = 0 ;
1362 
1377  virtual void poisson_compact(int nzet, const Cmp& source, const Cmp& aa,
1378  const Tenseur& bb, const Param& par,
1379  Cmp& psi) const = 0 ;
1380 
1398  virtual void poisson_angu(const Scalar& source, Param& par,
1399  Scalar& uu, double lambda=0) const = 0 ;
1400 
1401 
1402  public:
1426  virtual Param* donne_para_poisson_vect (Param& para, int i) const = 0;
1427 
1448  virtual void poisson_frontiere (const Cmp& source,const Valeur& limite,
1449  int raccord, int num_front, Cmp& pot,
1450  double = 0., double = 0.) const = 0 ;
1451 
1452  virtual void poisson_frontiere_double (const Cmp& source, const Valeur& lim_func,
1453  const Valeur& lim_der, int num_zone, Cmp& pot) const = 0 ;
1454 
1455 
1466  virtual void poisson_interne (const Cmp& source, const Valeur& limite,
1467  Param& par, Cmp& pot) const = 0 ;
1468 
1469 
1491  virtual void poisson2d(const Cmp& source_mat, const Cmp& source_quad,
1492  Param& par, Cmp& uu) const = 0 ;
1493 
1507  virtual void dalembert(Param& par, Scalar& fJp1, const Scalar& fJ,
1508  const Scalar& fJm1, const Scalar& source) const = 0 ;
1509 
1510  // Friend functions :
1511  // ----------------
1512  friend ostream& operator<<(ostream& , const Map& ) ;
1513 };
1514 ostream& operator<<(ostream& , const Map& ) ;
1515 
1516 
1517 
1518  //------------------------------------//
1519  // class Map_radial //
1520  //------------------------------------//
1521 
1522 
1523 
1536 class Map_radial : public Map {
1537 
1538  // Data :
1539  // ----
1540 
1541  // 0th order derivatives of the mapping
1542  // - - - - - - - - - - - - - - - - - -
1543  public:
1550 
1551  // 1st order derivatives of the mapping
1552  // - - - - - - - - - - - - - - - - - -
1553  public:
1561 
1569 
1577 
1585 
1593 
1601 
1609 
1610  // 2nd order derivatives of the mapping
1611  // - - - - - - - - - - - - - - - - - -
1612  public:
1620 
1632 
1633 
1641 
1649 
1650 
1658 
1659 
1660  // Constructors, destructor :
1661  // ------------------------
1662 
1663  protected:
1665  Map_radial(const Mg3d& mgrid ) ;
1666  Map_radial(const Map_radial& mp) ;
1667  Map_radial (const Mg3d&, FILE* ) ;
1668 
1669  public:
1670  virtual ~Map_radial() ;
1671 
1672  // Memory management
1673  // -----------------
1674  protected:
1675  virtual void reset_coord() ;
1676  // Modification of the mapping
1677  // ---------------------------
1678  public:
1680  virtual void operator=(const Map_af& ) = 0 ;
1681 
1682  // Outputs
1683  // -------
1684  public:
1685  virtual void sauve(FILE* ) const ;
1686 
1687  // Extraction of information
1688  // -------------------------
1698  virtual double val_r_jk(int l, double xi, int j, int k) const = 0 ;
1699 
1710  virtual void val_lx_jk(double rr, int j, int k, const Param& par,
1711  int& l, double& xi) const = 0 ;
1712 
1714  virtual bool operator==(const Map& ) const = 0;
1715 
1716  // Values of a Cmp at the new grid points
1717  // --------------------------------------
1730  virtual void reevaluate(const Map* mp_prev, int nzet, Cmp& uu) const ;
1731 
1745  virtual void reevaluate_symy(const Map* mp_prev, int nzet, Cmp& uu)
1746  const ;
1747 
1760  virtual void reevaluate(const Map* mp_prev, int nzet, Scalar& uu) const ;
1761 
1775  virtual void reevaluate_symy(const Map* mp_prev, int nzet, Scalar& uu)
1776  const ;
1777 
1778  // Various linear operators
1779  // ------------------------
1780  public:
1784  virtual void mult_r(Scalar& uu) const ;
1785 
1789  virtual void mult_r(Cmp& ci) const ;
1790 
1795  virtual void mult_r_zec(Scalar& ) const ;
1796 
1799  virtual void mult_rsint(Scalar& ) const ;
1800 
1803  virtual void div_rsint(Scalar& ) const ;
1804 
1807  virtual void div_r(Scalar& ) const ;
1808 
1812  virtual void div_r_zec(Scalar& ) const ;
1813 
1816  virtual void mult_cost(Scalar& ) const ;
1817 
1820  virtual void div_cost(Scalar& ) const ;
1821 
1824  virtual void mult_sint(Scalar& ) const ;
1825 
1828  virtual void div_sint(Scalar& ) const ;
1829 
1832  virtual void div_tant(Scalar& ) const ;
1833 
1843  virtual void comp_x_from_spherical(const Scalar& v_r, const Scalar& v_theta,
1844  const Scalar& v_phi, Scalar& v_x) const ;
1845 
1847  virtual void comp_x_from_spherical(const Cmp& v_r, const Cmp& v_theta,
1848  const Cmp& v_phi, Cmp& v_x) const ;
1849 
1859  virtual void comp_y_from_spherical(const Scalar& v_r, const Scalar& v_theta,
1860  const Scalar& v_phi, Scalar& v_y) const ;
1861 
1863  virtual void comp_y_from_spherical(const Cmp& v_r, const Cmp& v_theta,
1864  const Cmp& v_phi, Cmp& v_y) const ;
1865 
1874  virtual void comp_z_from_spherical(const Scalar& v_r, const Scalar& v_theta,
1875  Scalar& v_z) const ;
1876 
1878  virtual void comp_z_from_spherical(const Cmp& v_r, const Cmp& v_theta,
1879  Cmp& v_z) const ;
1880 
1890  virtual void comp_r_from_cartesian(const Scalar& v_x, const Scalar& v_y,
1891  const Scalar& v_z, Scalar& v_r) const ;
1892 
1894  virtual void comp_r_from_cartesian(const Cmp& v_x, const Cmp& v_y,
1895  const Cmp& v_z, Cmp& v_r) const ;
1896 
1906  virtual void comp_t_from_cartesian(const Scalar& v_x, const Scalar& v_y,
1907  const Scalar& v_z, Scalar& v_t) const ;
1908 
1910  virtual void comp_t_from_cartesian(const Cmp& v_x, const Cmp& v_y,
1911  const Cmp& v_z, Cmp& v_t) const ;
1912 
1921  virtual void comp_p_from_cartesian(const Scalar& v_x, const Scalar& v_y,
1922  Scalar& v_p) const ;
1923 
1925  virtual void comp_p_from_cartesian(const Cmp& v_x, const Cmp& v_y,
1926  Cmp& v_p) const ;
1927 
1933  virtual void dec_dzpuis(Scalar& ) const ;
1934 
1940  virtual void dec2_dzpuis(Scalar& ) const ;
1941 
1947  virtual void inc_dzpuis(Scalar& ) const ;
1948 
1954  virtual void inc2_dzpuis(Scalar& ) const ;
1955 
1956 
1957  // PDE resolution :
1958  // --------------
1959  public:
1982  virtual void poisson_compact(const Cmp& source, const Cmp& aa,
1983  const Tenseur& bb, const Param& par,
1984  Cmp& psi) const ;
1985 
2000  virtual void poisson_compact(int nzet, const Cmp& source, const Cmp& aa,
2001  const Tenseur& bb, const Param& par,
2002  Cmp& psi) const ;
2003 
2004 };
2005 
2006 
2007  //------------------------------------//
2008  // class Map_af //
2009  //------------------------------------//
2010 
2011 
2012 
2027 class Map_af : public Map_radial {
2028 
2029  // Data :
2030  // ----
2031  private:
2033  double* alpha ;
2035  double* beta ;
2036 
2037  // Constructors, destructor :
2038  // ------------------------
2039  public:
2051  Map_af(const Mg3d& mgrille, const double* r_limits) ;
2064  Map_af(const Mg3d& mgrille, const Tbl& r_limits) ;
2065 
2066  Map_af(const Map_af& ) ;
2067  Map_af(const Mg3d&, FILE* ) ;
2068 
2080  explicit Map_af(const Map& ) ;
2081 
2082  virtual ~Map_af() ;
2083 
2084  // Assignment
2085  // ----------
2086  public:
2088  virtual void operator=(const Map_af& ) ;
2089 
2090  // Memory management
2091  // -----------------
2092  private:
2094  void set_coord() ;
2095 
2096  // Extraction of information
2097  // -------------------------
2098  public:
2100  const double* get_alpha() const ;
2101 
2103  const double* get_beta() const ;
2104 
2108  virtual const Map_af& mp_angu(int) const ;
2109 
2119  virtual double val_r(int l, double xi, double theta, double pphi) const ;
2120 
2130  virtual void val_lx(double rr, double theta, double pphi,
2131  int& l, double& xi) const ;
2132 
2142  virtual void val_lx(double rr, double theta, double pphi,
2143  const Param& par, int& l, double& xi) const ;
2144 
2154  virtual double val_r_jk(int l, double xi, int j, int k) const ;
2155 
2165  virtual void val_lx_jk(double rr, int j, int k, const Param& par,
2166  int& l, double& xi) const ;
2167 
2169  virtual bool operator==(const Map& ) const ;
2170 
2171 
2172  // Outputs
2173  // -------
2174  public:
2175  virtual void sauve(FILE* ) const ;
2176 
2177  private:
2178  virtual ostream& operator>>(ostream &) const ;
2179 
2180  // Modification of the mapping
2181  // ---------------------------
2182  public:
2187  virtual void homothetie(double lambda) ;
2188 
2198  virtual void resize(int l, double lambda) ;
2199 
2205  void homothetie_interne(double lambda) ;
2206 
2209  virtual void adapt(const Cmp& ent, const Param& par, int nbr=0) ;
2210 
2212  void set_alpha(double alpha0, int l) ;
2213 
2215  void set_beta(double beta0, int l) ;
2216 
2217  // Differential operators:
2218  // ----------------------
2219  public:
2226  virtual void dsdxi(const Cmp& ci, Cmp& resu) const ;
2227 
2234  virtual void dsdr(const Cmp& ci, Cmp& resu) const ;
2235 
2242  virtual void srdsdt(const Cmp& ci, Cmp& resu) const ;
2243 
2251  virtual void srstdsdp(const Cmp& ci, Cmp& resu) const ;
2252 
2260  virtual void dsdr(const Scalar& uu, Scalar& resu) const ;
2261 
2269  virtual void dsdxi(const Scalar& uu, Scalar& resu) const ;
2270 
2278  virtual void dsdradial(const Scalar&, Scalar&) const ;
2279 
2287  virtual void srdsdt(const Scalar& uu, Scalar& resu) const ;
2288 
2296  virtual void srstdsdp(const Scalar& uu, Scalar& resu) const ;
2297 
2302  virtual void dsdt(const Scalar& uu, Scalar& resu) const ;
2303 
2308  virtual void stdsdp(const Scalar& uu, Scalar& resu) const ;
2309 
2320  virtual void laplacien(const Scalar& uu, int zec_mult_r,
2321  Scalar& lap) const ;
2322 
2324  virtual void laplacien(const Cmp& uu, int zec_mult_r,
2325  Cmp& lap) const ;
2326 
2333  virtual void lapang(const Scalar& uu, Scalar& lap) const ;
2334 
2335 
2346  virtual void primr(const Scalar& uu, Scalar& resu,
2347  bool null_infty) const ;
2348 
2349 
2357  virtual Tbl* integrale(const Cmp&) const ;
2358 
2359 
2360  // PDE resolution :
2361  // --------------
2362  public:
2370  virtual void poisson(const Cmp& source, Param& par, Cmp& uu) const ;
2371 
2379  virtual void poisson_tau(const Cmp& source, Param& par, Cmp& uu) const ;
2380 
2381  virtual void poisson_falloff(const Cmp& source, Param& par, Cmp& uu,
2382  int k_falloff) const ;
2383 
2384  virtual void poisson_ylm(const Cmp& source, Param& par, Cmp& pot,
2385  int nylm, double* intvec) const ;
2386 
2408  virtual void poisson_regular(const Cmp& source, int k_div, int nzet,
2409  double unsgam1, Param& par, Cmp& uu,
2410  Cmp& uu_regu, Cmp& uu_div,
2411  Tenseur& duu_div, Cmp& source_regu,
2412  Cmp& source_div) const ;
2413 
2431  virtual void poisson_angu(const Scalar& source, Param& par,
2432  Scalar& uu, double lambda=0) const ;
2433 
2443  virtual Param* donne_para_poisson_vect (Param& par, int i) const ;
2444 
2449  virtual void poisson_frontiere (const Cmp&, const Valeur&, int, int, Cmp&, double = 0., double = 0.) const ;
2450 
2456  virtual void poisson_frontiere_double (const Cmp& source, const Valeur& lim_func,
2457  const Valeur& lim_der, int num_zone, Cmp& pot) const ;
2458 
2469  virtual void poisson_interne (const Cmp& source, const Valeur& limite,
2470  Param& par, Cmp& pot) const ;
2471 
2476  double integrale_surface (const Cmp& ci, double rayon) const ;
2477 
2482  double integrale_surface (const Scalar& ci, double rayon) const ;
2483 
2484  double integrale_surface_falloff (const Cmp& ci) const ;
2485 
2490  double integrale_surface_infini (const Cmp& ci) const ;
2491 
2496  double integrale_surface_infini (const Scalar& ci) const ;
2497 
2505  void sol_elliptic (Param_elliptic& params,
2506  const Scalar& so, Scalar& uu) const ;
2507 
2508 
2520  void sol_elliptic_boundary (Param_elliptic& params,
2521  const Scalar& so, Scalar& uu, const Mtbl_cf& bound,
2522  double fact_dir, double fact_neu ) const ;
2523 
2528  void sol_elliptic_boundary (Param_elliptic& params,
2529  const Scalar& so, Scalar& uu, const Scalar& bound,
2530  double fact_dir, double fact_neu ) const ;
2531 
2541  void sol_elliptic_no_zec (Param_elliptic& params,
2542  const Scalar& so, Scalar& uu, double val) const ;
2543 
2553  void sol_elliptic_only_zec (Param_elliptic& params,
2554  const Scalar& so, Scalar& uu, double val) const ;
2555 
2561  void sol_elliptic_sin_zec (Param_elliptic& params,
2562  const Scalar& so, Scalar& uu,
2563  double* coefs, double*) const ;
2574  void sol_elliptic_fixe_der_zero (double val,
2575  Param_elliptic& params,
2576  const Scalar& so, Scalar& uu) const ;
2577 
2602  virtual void poisson2d(const Cmp& source_mat, const Cmp& source_quad,
2603  Param& par, Cmp& uu) const ;
2611  void sol_elliptic_2d(Param_elliptic&,
2612  const Scalar&, Scalar&) const ;
2620  void sol_elliptic_pseudo_1d(Param_elliptic&,
2621  const Scalar&, Scalar&) const ;
2622 
2651  virtual void dalembert(Param& par, Scalar& fJp1, const Scalar& fJ,
2652  const Scalar& fJm1, const Scalar& source) const ;
2653 
2654  // Building functions for the Coord's
2655  // ----------------------------------
2656  friend Mtbl* map_af_fait_r(const Map* ) ;
2657  friend Mtbl* map_af_fait_tet(const Map* ) ;
2658  friend Mtbl* map_af_fait_phi(const Map* ) ;
2659  friend Mtbl* map_af_fait_sint(const Map* ) ;
2660  friend Mtbl* map_af_fait_cost(const Map* ) ;
2661  friend Mtbl* map_af_fait_sinp(const Map* ) ;
2662  friend Mtbl* map_af_fait_cosp(const Map* ) ;
2663 
2664  friend Mtbl* map_af_fait_x(const Map* ) ;
2665  friend Mtbl* map_af_fait_y(const Map* ) ;
2666  friend Mtbl* map_af_fait_z(const Map* ) ;
2667 
2668  friend Mtbl* map_af_fait_xa(const Map* ) ;
2669  friend Mtbl* map_af_fait_ya(const Map* ) ;
2670  friend Mtbl* map_af_fait_za(const Map* ) ;
2671 
2672  friend Mtbl* map_af_fait_xsr(const Map* ) ;
2673  friend Mtbl* map_af_fait_dxdr(const Map* ) ;
2674  friend Mtbl* map_af_fait_drdt(const Map* ) ;
2675  friend Mtbl* map_af_fait_stdrdp(const Map* ) ;
2676  friend Mtbl* map_af_fait_srdrdt(const Map* ) ;
2677  friend Mtbl* map_af_fait_srstdrdp(const Map* ) ;
2678  friend Mtbl* map_af_fait_sr2drdt(const Map* ) ;
2679  friend Mtbl* map_af_fait_sr2stdrdp(const Map* ) ;
2680  friend Mtbl* map_af_fait_d2rdx2(const Map* ) ;
2681  friend Mtbl* map_af_fait_lapr_tp(const Map* ) ;
2682  friend Mtbl* map_af_fait_d2rdtdx(const Map* ) ;
2683  friend Mtbl* map_af_fait_sstd2rdpdx(const Map* ) ;
2684  friend Mtbl* map_af_fait_sr2d2rdt2(const Map* ) ;
2685 
2686 };
2687 
2688  Mtbl* map_af_fait_r(const Map* ) ;
2689  Mtbl* map_af_fait_tet(const Map* ) ;
2690  Mtbl* map_af_fait_phi(const Map* ) ;
2691  Mtbl* map_af_fait_sint(const Map* ) ;
2692  Mtbl* map_af_fait_cost(const Map* ) ;
2693  Mtbl* map_af_fait_sinp(const Map* ) ;
2694  Mtbl* map_af_fait_cosp(const Map* ) ;
2695 
2696  Mtbl* map_af_fait_x(const Map* ) ;
2697  Mtbl* map_af_fait_y(const Map* ) ;
2698  Mtbl* map_af_fait_z(const Map* ) ;
2699 
2700  Mtbl* map_af_fait_xa(const Map* ) ;
2701  Mtbl* map_af_fait_ya(const Map* ) ;
2702  Mtbl* map_af_fait_za(const Map* ) ;
2703 
2704  Mtbl* map_af_fait_xsr(const Map* ) ;
2705  Mtbl* map_af_fait_dxdr(const Map* ) ;
2706  Mtbl* map_af_fait_drdt(const Map* ) ;
2707  Mtbl* map_af_fait_stdrdp(const Map* ) ;
2708  Mtbl* map_af_fait_srdrdt(const Map* ) ;
2709  Mtbl* map_af_fait_srstdrdp(const Map* ) ;
2710  Mtbl* map_af_fait_sr2drdt(const Map* ) ;
2711  Mtbl* map_af_fait_sr2stdrdp(const Map* ) ;
2712  Mtbl* map_af_fait_d2rdx2(const Map* ) ;
2713  Mtbl* map_af_fait_lapr_tp(const Map* ) ;
2714  Mtbl* map_af_fait_d2rdtdx(const Map* ) ;
2715  Mtbl* map_af_fait_sstd2rdpdx(const Map* ) ;
2716  Mtbl* map_af_fait_sr2d2rdt2(const Map* ) ;
2717 
2718 
2719 
2720 
2721  //------------------------------------//
2722  // class Map_et //
2723  //------------------------------------//
2724 
2725 
2726 
2752 class Map_et : public Map_radial {
2753 
2754  // Data :
2755  // ----
2756  private:
2758  double* alpha ;
2760  double* beta ;
2761 
2765  Tbl** aa ;
2766 
2770  Tbl** daa ;
2771 
2775  Tbl** ddaa ;
2776 
2779 
2782 
2787 
2792 
2796  Tbl** bb ;
2797 
2801  Tbl** dbb ;
2802 
2806  Tbl** ddbb ;
2807 
2810 
2813 
2820 
2827 
2828  public:
2835 
2842 
2843  // Constructors, destructor :
2844  // ------------------------
2845  public:
2857  Map_et(const Mg3d& mgrille, const double* r_limits) ;
2858 
2876  Map_et(const Mg3d& mgrille, const double* r_limits,const Tbl& tab);
2877  Map_et(const Map_et& ) ;
2878  Map_et(const Mg3d&, FILE* ) ;
2879 
2880  virtual ~Map_et() ;
2881 
2882  // Assignment
2883  // ----------
2884  public:
2886  virtual void operator=(const Map_et& mp) ;
2887 
2889  virtual void operator=(const Map_af& mpa) ;
2890 
2892  void set_ff(const Valeur& ) ;
2894  void set_gg(const Valeur& ) ;
2895 
2896  // Memory management
2897  // -----------------
2898  private:
2900  void set_coord() ;
2901  protected:
2903  virtual void reset_coord() ;
2904 
2905  private:
2907  void fait_poly() ;
2908 
2909  // Extraction of information
2910  // -------------------------
2911  public:
2915  virtual const Map_af& mp_angu(int) const ;
2916 
2920  const double* get_alpha() const ;
2921 
2925  const double* get_beta() const ;
2926 
2928  const Valeur& get_ff() const ;
2929 
2931  const Valeur& get_gg() const ;
2932 
2942  virtual double val_r(int l, double xi, double theta, double pphi) const ;
2943 
2953  virtual void val_lx(double rr, double theta, double pphi,
2954  int& l, double& xi) const ;
2955 
2974  virtual void val_lx(double rr, double theta, double pphi,
2975  const Param& par, int& l, double& xi) const ;
2976 
2978  virtual bool operator==(const Map& ) const ;
2979 
2989  virtual double val_r_jk(int l, double xi, int j, int k) const ;
2990 
3007  virtual void val_lx_jk(double rr, int j, int k, const Param& par,
3008  int& l, double& xi) const ;
3009 
3010 
3011 
3012  // Outputs
3013  // -------
3014  public:
3015  virtual void sauve(FILE* ) const ;
3016 
3017  private:
3018  virtual ostream& operator>>(ostream &) const ;
3019 
3020  // Modification of the radial scale
3021  // --------------------------------
3022  public:
3027  virtual void homothetie(double lambda) ;
3028 
3038  virtual void resize(int l, double lambda) ;
3039 
3046  void resize_extr(double lambda) ;
3047 
3049  void set_alpha(double alpha0, int l) ;
3050 
3052  void set_beta(double beta0, int l) ;
3053 
3054  // Modification of the mapping
3055  // ---------------------------
3100  virtual void adapt(const Cmp& ent, const Param& par, int nbr_filtre = 0) ;
3101 
3102  // Differential operators:
3103  // ----------------------
3104  public:
3111  virtual void dsdxi(const Cmp& ci, Cmp& resu) const ;
3112 
3119  virtual void dsdr(const Cmp& ci, Cmp& resu) const ;
3120 
3127  virtual void srdsdt(const Cmp& ci, Cmp& resu) const ;
3128 
3136  virtual void srstdsdp(const Cmp& ci, Cmp& resu) const ;
3137 
3145  virtual void dsdxi(const Scalar& uu, Scalar& resu) const ;
3146 
3154  virtual void dsdr(const Scalar& uu, Scalar& resu) const ;
3155 
3164  virtual void dsdradial(const Scalar& uu, Scalar& resu) const ;
3165 
3173  virtual void srdsdt(const Scalar& uu, Scalar& resu) const ;
3174 
3182  virtual void srstdsdp(const Scalar& uu, Scalar& resu) const ;
3183 
3188  virtual void dsdt(const Scalar& uu, Scalar& resu) const ;
3189 
3194  virtual void stdsdp(const Scalar& uu, Scalar& resu) const ;
3195 
3206  virtual void laplacien(const Scalar& uu, int zec_mult_r,
3207  Scalar& lap) const ;
3208 
3210  virtual void laplacien(const Cmp& uu, int zec_mult_r,
3211  Cmp& lap) const ;
3212 
3219  virtual void lapang(const Scalar& uu, Scalar& lap) const ;
3220 
3221 
3232  virtual void primr(const Scalar& uu, Scalar& resu,
3233  bool null_infty) const ;
3234 
3235 
3243  virtual Tbl* integrale(const Cmp&) const ;
3244 
3245 
3246  // PDE resolution :
3247  // --------------
3248  public:
3286  virtual void poisson(const Cmp& source, Param& par, Cmp& uu) const ;
3287 
3325  virtual void poisson_tau(const Cmp& source, Param& par, Cmp& uu) const ;
3326 
3327  virtual void poisson_falloff(const Cmp& source, Param& par, Cmp& uu,
3328  int k_falloff) const ;
3329 
3330  virtual void poisson_ylm(const Cmp& source, Param& par, Cmp& uu,
3331  int nylm, double* intvec) const ;
3332 
3368  virtual void poisson_regular(const Cmp& source, int k_div, int nzet,
3369  double unsgam1, Param& par, Cmp& uu,
3370  Cmp& uu_regu, Cmp& uu_div,
3371  Tenseur& duu_div, Cmp& source_regu,
3372  Cmp& source_div) const ;
3373 
3391  virtual void poisson_angu(const Scalar& source, Param& par,
3392  Scalar& uu, double lambda=0) const ;
3393 
3417  virtual Param* donne_para_poisson_vect (Param& para, int i) const ;
3418 
3422  virtual void poisson_frontiere (const Cmp&, const Valeur&, int, int,
3423  Cmp&, double = 0., double = 0.) const ;
3424  virtual void poisson_frontiere_double (const Cmp& source,
3425  const Valeur& lim_func, const Valeur& lim_der,
3426  int num_zone, Cmp& pot) const ;
3427 
3438  virtual void poisson_interne (const Cmp& source, const Valeur& limite,
3439  Param& par, Cmp& pot) const ;
3440 
3441 
3480  virtual void poisson2d(const Cmp& source_mat, const Cmp& source_quad,
3481  Param& par, Cmp& uu) const ;
3482 
3486  virtual void dalembert(Param& par, Scalar& fJp1, const Scalar& fJ,
3487  const Scalar& fJm1, const Scalar& source) const ;
3488 
3489 
3490 
3491 
3492  // Building functions for the Coord's
3493  // ----------------------------------
3494  friend Mtbl* map_et_fait_r(const Map* ) ;
3495  friend Mtbl* map_et_fait_tet(const Map* ) ;
3496  friend Mtbl* map_et_fait_phi(const Map* ) ;
3497  friend Mtbl* map_et_fait_sint(const Map* ) ;
3498  friend Mtbl* map_et_fait_cost(const Map* ) ;
3499  friend Mtbl* map_et_fait_sinp(const Map* ) ;
3500  friend Mtbl* map_et_fait_cosp(const Map* ) ;
3501 
3502  friend Mtbl* map_et_fait_x(const Map* ) ;
3503  friend Mtbl* map_et_fait_y(const Map* ) ;
3504  friend Mtbl* map_et_fait_z(const Map* ) ;
3505 
3506  friend Mtbl* map_et_fait_xa(const Map* ) ;
3507  friend Mtbl* map_et_fait_ya(const Map* ) ;
3508  friend Mtbl* map_et_fait_za(const Map* ) ;
3509 
3510  friend Mtbl* map_et_fait_xsr(const Map* ) ;
3511  friend Mtbl* map_et_fait_dxdr(const Map* ) ;
3512  friend Mtbl* map_et_fait_drdt(const Map* ) ;
3513  friend Mtbl* map_et_fait_stdrdp(const Map* ) ;
3514  friend Mtbl* map_et_fait_srdrdt(const Map* ) ;
3515  friend Mtbl* map_et_fait_srstdrdp(const Map* ) ;
3516  friend Mtbl* map_et_fait_sr2drdt(const Map* ) ;
3517  friend Mtbl* map_et_fait_sr2stdrdp(const Map* ) ;
3518  friend Mtbl* map_et_fait_d2rdx2(const Map* ) ;
3519  friend Mtbl* map_et_fait_lapr_tp(const Map* ) ;
3520  friend Mtbl* map_et_fait_d2rdtdx(const Map* ) ;
3521  friend Mtbl* map_et_fait_sstd2rdpdx(const Map* ) ;
3522  friend Mtbl* map_et_fait_sr2d2rdt2(const Map* ) ;
3523 
3524  friend Mtbl* map_et_fait_rsxdxdr(const Map* ) ;
3525  friend Mtbl* map_et_fait_rsx2drdx(const Map* ) ;
3526 
3527 };
3528 
3529  Mtbl* map_et_fait_r(const Map* ) ;
3530  Mtbl* map_et_fait_tet(const Map* ) ;
3531  Mtbl* map_et_fait_phi(const Map* ) ;
3532  Mtbl* map_et_fait_sint(const Map* ) ;
3533  Mtbl* map_et_fait_cost(const Map* ) ;
3534  Mtbl* map_et_fait_sinp(const Map* ) ;
3535  Mtbl* map_et_fait_cosp(const Map* ) ;
3536 
3537  Mtbl* map_et_fait_x(const Map* ) ;
3538  Mtbl* map_et_fait_y(const Map* ) ;
3539  Mtbl* map_et_fait_z(const Map* ) ;
3540 
3541  Mtbl* map_et_fait_xa(const Map* ) ;
3542  Mtbl* map_et_fait_ya(const Map* ) ;
3543  Mtbl* map_et_fait_za(const Map* ) ;
3544 
3545  Mtbl* map_et_fait_xsr(const Map* ) ;
3546  Mtbl* map_et_fait_dxdr(const Map* ) ;
3547  Mtbl* map_et_fait_drdt(const Map* ) ;
3548  Mtbl* map_et_fait_stdrdp(const Map* ) ;
3549  Mtbl* map_et_fait_srdrdt(const Map* ) ;
3550  Mtbl* map_et_fait_srstdrdp(const Map* ) ;
3551  Mtbl* map_et_fait_sr2drdt(const Map* ) ;
3552  Mtbl* map_et_fait_sr2stdrdp(const Map* ) ;
3553  Mtbl* map_et_fait_d2rdx2(const Map* ) ;
3554  Mtbl* map_et_fait_lapr_tp(const Map* ) ;
3555  Mtbl* map_et_fait_d2rdtdx(const Map* ) ;
3556  Mtbl* map_et_fait_sstd2rdpdx(const Map* ) ;
3557  Mtbl* map_et_fait_sr2d2rdt2(const Map* ) ;
3558 
3559  Mtbl* map_et_fait_rsxdxdr(const Map* ) ;
3560  Mtbl* map_et_fait_rsx2drdx(const Map* ) ;
3561 
3562  //------------------------------------//
3563  // class Map_log //
3564  //------------------------------------//
3565 
3566 #define AFFINE 0
3567 #define LOG 1
3568 
3583 class Map_log : public Map_radial {
3584 
3585  // Data :
3586  // ----
3587  private:
3596 
3597  public:
3604 
3605  private:
3606  void set_coord() ;
3607 
3608  // Constructors, destructor :
3609  // ------------------------
3610  public:
3623  Map_log (const Mg3d& mgrille, const Tbl& r_limits, const Itbl& typevar) ;
3624 
3625 
3626  Map_log (const Map_log& ) ;
3627  Map_log (const Mg3d&, FILE* ) ;
3628 
3629  virtual ~Map_log() ;
3630 
3634  virtual const Map_af& mp_angu(int) const ;
3635 
3637  double get_alpha (int l) const {return alpha(l) ;} ;
3639  double get_beta (int l) const {return beta(l) ;} ;
3641  int get_type (int l) const {return type_var(l) ;} ;
3642 
3650  void sol_elliptic (Param_elliptic& params,
3651  const Scalar& so, Scalar& uu) const ;
3652 
3653 
3665  void sol_elliptic_boundary (Param_elliptic& params,
3666  const Scalar& so, Scalar& uu, const Mtbl_cf& bound,
3667  double fact_dir, double fact_neu ) const ;
3668 
3672  void sol_elliptic_boundary (Param_elliptic& params,
3673  const Scalar& so, Scalar& uu, const Scalar& bound,
3674  double fact_dir, double fact_neu ) const ;
3675 
3676 
3686  void sol_elliptic_no_zec (Param_elliptic& params,
3687  const Scalar& so, Scalar& uu, double) const ;
3688 
3689 
3690  virtual void sauve(FILE*) const ;
3691 
3693  virtual void operator=(const Map_af& mpa) ;
3694 
3695 
3696  virtual ostream& operator>> (ostream&) const ;
3697 
3707  virtual double val_r (int l, double xi, double theta, double pphi) const ;
3708 
3718  virtual void val_lx (double rr, double theta, double pphi, int& l, double& xi) const ;
3719 
3729  virtual void val_lx (double rr, double theta, double pphi, const Param& par, int& l, double& xi) const ;
3730 
3731 
3732  virtual bool operator== (const Map&) const ;
3733 
3743  virtual double val_r_jk (int l, double xi, int j, int k) const ;
3744 
3754  virtual void val_lx_jk (double rr, int j, int k, const Param& par, int& l, double& xi) const ;
3755 
3762  virtual void dsdr (const Scalar& ci, Scalar& resu) const ;
3763 
3770  virtual void dsdxi (const Scalar& ci, Scalar& resu) const ;
3771 
3780  virtual void dsdradial (const Scalar& uu, Scalar& resu) const ;
3781 
3782  virtual void homothetie (double) ;
3783  virtual void resize (int, double) ;
3784  virtual void adapt (const Cmp&, const Param&, int) ;
3785  virtual void dsdr (const Cmp&, Cmp&) const ;
3786  virtual void dsdxi (const Cmp&, Cmp&) const ;
3787  virtual void srdsdt (const Cmp&, Cmp&) const ;
3788  virtual void srstdsdp (const Cmp&, Cmp&) const ;
3789  virtual void srdsdt (const Scalar&, Scalar&) const ;
3790  virtual void srstdsdp (const Scalar&, Scalar&) const ;
3791  virtual void dsdt (const Scalar&, Scalar&) const ;
3792  virtual void stdsdp (const Scalar&, Scalar&) const ;
3793  virtual void laplacien (const Scalar&, int, Scalar&) const ;
3794  virtual void laplacien (const Cmp&, int, Cmp&) const ;
3795  virtual void lapang (const Scalar&, Scalar&) const ;
3796  virtual void primr(const Scalar&, Scalar&, bool) const ;
3797  virtual Tbl* integrale (const Cmp&) const ;
3798  virtual void poisson (const Cmp&, Param&, Cmp&) const ;
3799  virtual void poisson_tau (const Cmp&, Param&, Cmp&) const ;
3800  virtual void poisson_falloff(const Cmp&, Param&, Cmp&, int) const ;
3801  virtual void poisson_ylm(const Cmp&, Param&, Cmp&, int, double*) const ;
3802  virtual void poisson_regular (const Cmp&, int, int, double, Param&, Cmp&, Cmp&, Cmp&,
3803  Tenseur&, Cmp&, Cmp&) const ;
3804  virtual void poisson_angu (const Scalar&, Param&, Scalar&, double=0) const ;
3805  virtual Param* donne_para_poisson_vect (Param&, int) const ;
3806  virtual void poisson_frontiere (const Cmp&, const Valeur&, int, int, Cmp&, double = 0., double = 0.) const ;
3807  virtual void poisson_frontiere_double (const Cmp&, const Valeur&, const Valeur&, int, Cmp&) const ;
3808  virtual void poisson_interne (const Cmp&, const Valeur&, Param&, Cmp&) const ;
3809  virtual void poisson2d (const Cmp&, const Cmp&, Param&, Cmp&) const ;
3810  virtual void dalembert (Param&, Scalar&, const Scalar&, const Scalar&, const Scalar&) const ;
3811 
3812 
3813  // Building functions for the Coord's
3814  // ----------------------------------
3815  friend Mtbl* map_log_fait_r(const Map* ) ;
3816  friend Mtbl* map_log_fait_tet(const Map* ) ;
3817  friend Mtbl* map_log_fait_phi(const Map* ) ;
3818  friend Mtbl* map_log_fait_sint(const Map* ) ;
3819  friend Mtbl* map_log_fait_cost(const Map* ) ;
3820  friend Mtbl* map_log_fait_sinp(const Map* ) ;
3821  friend Mtbl* map_log_fait_cosp(const Map* ) ;
3822 
3823  friend Mtbl* map_log_fait_x(const Map* ) ;
3824  friend Mtbl* map_log_fait_y(const Map* ) ;
3825  friend Mtbl* map_log_fait_z(const Map* ) ;
3826 
3827  friend Mtbl* map_log_fait_xa(const Map* ) ;
3828  friend Mtbl* map_log_fait_ya(const Map* ) ;
3829  friend Mtbl* map_log_fait_za(const Map* ) ;
3830 
3831  friend Mtbl* map_log_fait_xsr(const Map* ) ;
3832  friend Mtbl* map_log_fait_dxdr(const Map* ) ;
3833  friend Mtbl* map_log_fait_drdt(const Map* ) ;
3834  friend Mtbl* map_log_fait_stdrdp(const Map* ) ;
3835  friend Mtbl* map_log_fait_srdrdt(const Map* ) ;
3836  friend Mtbl* map_log_fait_srstdrdp(const Map* ) ;
3837  friend Mtbl* map_log_fait_sr2drdt(const Map* ) ;
3838  friend Mtbl* map_log_fait_sr2stdrdp(const Map* ) ;
3839  friend Mtbl* map_log_fait_d2rdx2(const Map* ) ;
3840  friend Mtbl* map_log_fait_lapr_tp(const Map* ) ;
3841  friend Mtbl* map_log_fait_d2rdtdx(const Map* ) ;
3842  friend Mtbl* map_log_fait_sstd2rdpdx(const Map* ) ;
3843  friend Mtbl* map_log_fait_sr2d2rdt2(const Map* ) ;
3844  friend Mtbl* map_log_fait_dxdlnr(const Map* ) ;
3845 
3846 };
3847 
3848 Mtbl* map_log_fait_r(const Map* ) ;
3849 Mtbl* map_log_fait_tet(const Map* ) ;
3850 Mtbl* map_log_fait_phi(const Map* ) ;
3851 Mtbl* map_log_fait_sint(const Map* ) ;
3852 Mtbl* map_log_fait_cost(const Map* ) ;
3853 Mtbl* map_log_fait_sinp(const Map* ) ;
3854 Mtbl* map_log_fait_cosp(const Map* ) ;
3855 
3856 Mtbl* map_log_fait_x(const Map* ) ;
3857 Mtbl* map_log_fait_y(const Map* ) ;
3858 Mtbl* map_log_fait_z(const Map* ) ;
3859 
3860 Mtbl* map_log_fait_xa(const Map* ) ;
3861 Mtbl* map_log_fait_ya(const Map* ) ;
3862 Mtbl* map_log_fait_za(const Map* ) ;
3863 
3864 Mtbl* map_log_fait_xsr(const Map* ) ;
3865 Mtbl* map_log_fait_dxdr(const Map* ) ;
3866 Mtbl* map_log_fait_drdt(const Map* ) ;
3867 Mtbl* map_log_fait_stdrdp(const Map* ) ;
3868 Mtbl* map_log_fait_srdrdt(const Map* ) ;
3869 Mtbl* map_log_fait_srstdrdp(const Map* ) ;
3870 Mtbl* map_log_fait_sr2drdt(const Map* ) ;
3871 Mtbl* map_log_fait_sr2stdrdp(const Map* ) ;
3872 Mtbl* map_log_fait_d2rdx2(const Map* ) ;
3873 Mtbl* map_log_fait_lapr_tp(const Map* ) ;
3874 Mtbl* map_log_fait_d2rdtdx(const Map* ) ;
3875 Mtbl* map_log_fait_sstd2rdpdx(const Map* ) ;
3876 Mtbl* map_log_fait_sr2d2rdt2(const Map* ) ;
3877 
3878 Mtbl* map_log_fait_dxdlnr (const Map*) ;
3879 
3880 }
3881 #endif
Coord xa
Absolute x coordinate.
Definition: map.h:730
Tbl beta
Array (size: mg->nzone ) of the values of in each domain.
Definition: map.h:3591
Coord d2rdx2
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1619
Tbl ** bb
Array (size: mg->nzone ) of Tbl which stores the values of in each domain.
Definition: map.h:2796
Coord sr2d2rdt2
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1657
Coord sr2stdrdp
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1608
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Definition: cmp.h:443
Tbl zaasx
Values at the nr collocation points of in the outermost compactified domain.
Definition: map.h:2786
Radial mapping of rather general form.
Definition: map.h:2752
virtual const Map_af & mp_angu(int) const =0
Returns the "angular" mapping for the outside of domain l_zone.
virtual void mult_sint(Scalar &) const =0
Multiplication by of a Scalar.
virtual void sauve(FILE *) const
Save in a file.
Definition: map.C:224
const Cmp & cmp_zero() const
Returns the null Cmp defined on *this.
Definition: map.h:807
virtual void dsdxi(const Cmp &ci, Cmp &resu) const =0
Computes of a Cmp .
void set_rot_phi(double phi0)
Sets a new rotation angle.
Definition: map.C:263
virtual ostream & operator>>(ostream &) const =0
Operator >>
Multi-domain array.
Definition: mtbl.h:118
double * alpha
Array (size: mg->nzone ) of the values of in each domain.
Definition: map.h:2033
double get_ori_y() const
Returns the y coordinate of the origin.
Definition: map.h:770
virtual Tbl * integrale(const Cmp &) const =0
Computes the integral over all space of a Cmp .
const Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
Definition: map.h:783
double * alpha
Array (size: mg->nzone ) of the values of in each domain.
Definition: map.h:2758
virtual void dsdt(const Scalar &uu, Scalar &resu) const =0
Computes of a Scalar .
double get_alpha(int l) const
Returns in the domain l.
Definition: map.h:3637
Lorene prototypes.
Definition: app_hor.h:64
Cmp * p_cmp_zero
The null Cmp.
Definition: map.h:713
virtual void comp_p_from_cartesian(const Scalar &v_x, const Scalar &v_y, Scalar &v_p) const =0
Computes the Spherical component (with respect to bvect_spher ) of a vector given by its cartesian c...
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
Definition: map.h:765
virtual void dsdr(const Cmp &ci, Cmp &resu) const =0
Computes of a Cmp .
Flat metric for tensor calculation.
Definition: metric.h:261
Coord sr2drdt
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1600
int get_type(int l) const
Returns the type of description in the domain l.
Definition: map.h:3641
Tbl bbsx
Values at the nr collocation points of in the nucleus.
Definition: map.h:2809
Tensor field of valence 0 (or component of a tensorial field).
Definition: scalar.h:387
virtual void primr(const Scalar &uu, Scalar &resu, bool null_infty) const =0
Computes the radial primitive which vanishes for .
Base class for coordinate mappings.
Definition: map.h:670
double get_ori_x() const
Returns the x coordinate of the origin.
Definition: map.h:768
virtual void div_tant(Scalar &) const =0
Division by of a Scalar.
virtual void adapt(const Cmp &ent, const Param &par, int nbr=0)=0
Adaptation of the mapping to a given scalar field.
Basic integer array class.
Definition: itbl.h:122
virtual void poisson_compact(const Cmp &source, const Cmp &aa, const Tenseur &bb, const Param &par, Cmp &psi) const =0
Resolution of the elliptic equation in the case where the stellar interior is covered by a single do...
virtual void inc_dzpuis(Scalar &) const =0
Increases by 1 the value of dzpuis of a Scalar and changes accordingly its values in the compactified...
Values and coefficients of a (real-value) function.
Definition: valeur.h:287
virtual bool operator==(const Map &) const =0
Comparison operator (egality)
virtual void mult_rsint(Scalar &) const =0
Multiplication by of a Scalar.
Map_af * p_mp_angu
Pointer on the "angular" mapping.
Definition: map.h:715
double get_rot_phi() const
Returns the angle between the x –axis and X –axis.
Definition: map.h:775
Tbl ** ddbb
Array (size: mg->nzone ) of Tbl which stores the values of in each domain.
Definition: map.h:2806
Itbl type_var
Array (size: mg->nzone ) of the type of variable in each domain.
Definition: map.h:3595
virtual void comp_x_from_spherical(const Scalar &v_r, const Scalar &v_theta, const Scalar &v_phi, Scalar &v_x) const =0
Computes the Cartesian x component (with respect to bvect_cart ) of a vector given by its spherical c...
virtual void srdsdt(const Cmp &ci, Cmp &resu) const =0
Computes of a Cmp .
const Metric_flat & flat_met_cart() const
Returns the flat metric associated with the Cartesian coordinates and with components expressed in th...
Definition: map.C:331
Tbl ** daa
Array (size: mg->nzone ) of Tbl which stores the values of in each domain.
Definition: map.h:2770
Coord srstdrdp
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1592
virtual void div_r_zec(Scalar &) const =0
Division by r (in the compactified external domain only) of a Scalar.
virtual void poisson_tau(const Cmp &source, Param &par, Cmp &uu) const =0
Computes the solution of a scalar Poisson equationwith a Tau method.
Coord tet
coordinate centered on the grid
Definition: map.h:719
void set_ori(double xa0, double ya0, double za0)
Sets a new origin.
Definition: map.C:253
Coord phi
coordinate centered on the grid
Definition: map.h:720
virtual void poisson_interne(const Cmp &source, const Valeur &limite, Param &par, Cmp &pot) const =0
Computes the solution of a Poisson equation in the shell, imposing a boundary condition at the surfac...
Coord sint
Definition: map.h:721
virtual void dec2_dzpuis(Scalar &) const =0
Decreases by 2 the value of dzpuis of a Scalar and changes accordingly its values in the compactified...
Coord dxdlnr
Same as dxdr if the domains where the description is affine and where it is logarithmic.
Definition: map.h:3603
virtual void comp_t_from_cartesian(const Scalar &v_x, const Scalar &v_y, const Scalar &v_z, Scalar &v_t) const =0
Computes the Spherical component (with respect to bvect_spher ) of a vector given by its cartesian c...
virtual double val_r(int l, double xi, double theta, double pphi) const =0
Returns the value of the radial coordinate r for a given in a given domain.
virtual void operator=(const Map_af &)=0
Assignment to an affine mapping.
virtual void dalembert(Param &par, Scalar &fJp1, const Scalar &fJ, const Scalar &fJm1, const Scalar &source) const =0
Performs one time-step integration of the d&#39;Alembert scalar equation.
Metric_flat * p_flat_met_spher
Pointer onto the flat metric associated with the spherical coordinates and with components expressed ...
Definition: map.h:702
virtual void comp_z_from_spherical(const Scalar &v_r, const Scalar &v_theta, Scalar &v_z) const =0
Computes the Cartesian z component (with respect to bvect_cart ) of a vector given by its spherical c...
virtual void poisson2d(const Cmp &source_mat, const Cmp &source_quad, Param &par, Cmp &uu) const =0
Computes the solution of a 2-D Poisson equation.
Tbl aasx2
Values at the nr collocation points of in the nucleus.
Definition: map.h:2781
Valeur ff
Values of the function at the nt*np angular collocation points in each domain.
Definition: map.h:2819
Coord stdrdp
in the nucleus and in the non-compactified shells; \ in the compactified external domain (CED)...
Definition: map.h:1576
virtual void div_rsint(Scalar &) const =0
Division by of a Scalar.
virtual void homothetie(double lambda)=0
Sets a new radial scale.
Logarithmic radial mapping.
Definition: map.h:3583
Coord dxdr
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1560
double ori_y
Absolute coordinate y of the origin.
Definition: map.h:679
double ori_z
Absolute coordinate z of the origin.
Definition: map.h:680
Tbl alpha
Array (size: mg->nzone ) of the values of in each domain.
Definition: map.h:3589
Coord rsx2drdx
in the nucleus and the shells; \ in the outermost compactified domain.
Definition: map.h:2841
Parameter storage.
Definition: param.h:125
virtual void srstdsdp(const Cmp &ci, Cmp &resu) const =0
Computes of a Cmp .
Base class for pure radial mappings.
Definition: map.h:1536
virtual void poisson_regular(const Cmp &source, int k_div, int nzet, double unsgam1, Param &par, Cmp &uu, Cmp &uu_regu, Cmp &uu_div, Tenseur &duu_div, Cmp &source_regu, Cmp &source_div) const =0
Computes the solution of a scalar Poisson equation.
double * beta
Array (size: mg->nzone ) of the values of in each domain.
Definition: map.h:2035
Coord sinp
Definition: map.h:723
Tbl ** aa
Array (size: mg->nzone ) of Tbl which stores the values of in each domain.
Definition: map.h:2765
Coord sstd2rdpdx
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1648
virtual void mult_cost(Scalar &) const =0
Multiplication by of a Scalar.
Coord xsr
in the nucleus; \ 1/R in the non-compactified shells; \ in the compactified outer domain...
Definition: map.h:1549
Metric_flat * p_flat_met_cart
Pointer onto the flat metric associated with the Cartesian coordinates and with components expressed ...
Definition: map.h:707
virtual Param * donne_para_poisson_vect(Param &para, int i) const =0
Function intended to be used by Map::poisson_vect and Map::poisson_vect_oohara .
This class contains the parameters needed to call the general elliptic solver.
virtual void reset_coord()
Resets all the member Coords.
Definition: map.C:276
Coord drdt
in the nucleus and in the non-compactified shells; \ in the compactified external domain (CED)...
Definition: map.h:1568
virtual void resize(int l, double lambda)=0
Rescales the outer boundary of one domain.
Active physical coordinates and mapping derivatives.
Definition: coord.h:90
Cartesian vectorial bases (triads).
Definition: base_vect.h:201
Spherical orthonormal vectorial bases (triads).
Definition: base_vect.h:308
Coord rsxdxdr
in the nucleus; \ in the shells; \ in the outermost compactified domain.
Definition: map.h:2834
virtual void mult_r(Scalar &uu) const =0
Multiplication by r of a Scalar , the dzpuis of uu is not changed.
virtual void inc2_dzpuis(Scalar &) const =0
Increases by 2 the value of dzpuis of a Scalar and changes accordingly its values in the compactified...
Coord ya
Absolute y coordinate.
Definition: map.h:731
const Mg3d * mg
Pointer on the multi-grid Mgd3 on which this is defined.
Definition: map.h:676
Multi-domain grid.
Definition: grilles.h:273
virtual void poisson_frontiere(const Cmp &source, const Valeur &limite, int raccord, int num_front, Cmp &pot, double=0., double=0.) const =0
Computes the solution of a Poisson equation from the domain num_front+1 .
double ori_x
Absolute coordinate x of the origin.
Definition: map.h:678
Affine radial mapping.
Definition: map.h:2027
Tbl zaasx2
Values at the nr collocation points of in the outermost compactified domain.
Definition: map.h:2791
virtual void reevaluate_symy(const Map *mp_prev, int nzet, Cmp &uu) const =0
Recomputes the values of a Cmp at the collocation points after a change in the mapping.
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping, i.e.
Definition: map.h:791
Valeur gg
Values of the function at the nt*np angular collocation points in each domain.
Definition: map.h:2826
Coord y
y coordinate centered on the grid
Definition: map.h:727
virtual void comp_r_from_cartesian(const Scalar &v_x, const Scalar &v_y, const Scalar &v_z, Scalar &v_r) const =0
Computes the Spherical r component (with respect to bvect_spher ) of a vector given by its cartesian ...
virtual void div_sint(Scalar &) const =0
Division by of a Scalar.
Coord za
Absolute z coordinate.
Definition: map.h:732
Coord lapr_tp
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1631
double get_beta(int l) const
Returns in the domain l.
Definition: map.h:3639
virtual void reevaluate(const Map *mp_prev, int nzet, Cmp &uu) const =0
Recomputes the values of a Cmp at the collocation points after a change in the mapping.
Coord cosp
Definition: map.h:724
virtual void poisson(const Cmp &source, Param &par, Cmp &uu) const =0
Computes the solution of a scalar Poisson equation.
double * beta
Array (size: mg->nzone ) of the values of in each domain.
Definition: map.h:2760
Coefficients storage for the multi-domain spectral method.
Definition: mtbl_cf.h:186
Coord x
x coordinate centered on the grid
Definition: map.h:726
Base_vect_spher bvect_spher
Orthonormal vectorial basis associated with the coordinates of the mapping.
Definition: map.h:689
double get_ori_z() const
Returns the z coordinate of the origin.
Definition: map.h:772
virtual void mult_r_zec(Scalar &) const =0
Multiplication by r (in the compactified external domain only) of a Scalar.
Basic array class.
Definition: tbl.h:161
virtual void dsdradial(const Scalar &uu, Scalar &resu) const =0
Computes of a Scalar if the description is affine and if it is logarithmic.
Tbl bbsx2
Values at the nr collocation points of in the nucleus.
Definition: map.h:2812
Map(const Mg3d &)
Constructor from a multi-domain 3D grid.
Definition: map.C:139
virtual void dec_dzpuis(Scalar &) const =0
Decreases by 1 the value of dzpuis of a Scalar and changes accordingly its values in the compactified...
void convert_absolute(double xx, double yy, double zz, double &rr, double &theta, double &pphi) const
Determines the coordinates corresponding to given absolute Cartesian coordinates (X...
Definition: map.C:302
virtual void div_cost(Scalar &) const =0
Division by of a Scalar.
Coord srdrdt
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1584
virtual ~Map()
Destructor.
Definition: map.C:213
Coord z
z coordinate centered on the grid
Definition: map.h:728
virtual void div_r(Scalar &) const =0
Division by r of a Scalar.
double rot_phi
Angle between the x –axis and X –axis.
Definition: map.h:681
Tbl ** dbb
Array (size: mg->nzone ) of Tbl which stores the values of in each domain.
Definition: map.h:2801
virtual void poisson_angu(const Scalar &source, Param &par, Scalar &uu, double lambda=0) const =0
Computes the solution of the generalized angular Poisson equation.
const Metric_flat & flat_met_spher() const
Returns the flat metric associated with the spherical coordinates and with components expressed in th...
Definition: map.C:321
Tbl aasx
Values at the nr collocation points of in the nucleus.
Definition: map.h:2778
Tensor handling *** DEPRECATED : use class Tensor instead ***.
Definition: tenseur.h:298
virtual void comp_y_from_spherical(const Scalar &v_r, const Scalar &v_theta, const Scalar &v_phi, Scalar &v_y) const =0
Computes the Cartesian y component (with respect to bvect_cart ) of a vector given by its spherical c...
Base_vect_cart bvect_cart
Cartesian basis associated with the coordinates (x,y,z) of the mapping, i.e.
Definition: map.h:697
virtual void laplacien(const Scalar &uu, int zec_mult_r, Scalar &lap) const =0
Computes the Laplacian of a scalar field.
Tbl ** ddaa
Array (size: mg->nzone ) of Tbl which stores the values of in each domain.
Definition: map.h:2775
Coord r
r coordinate centered on the grid
Definition: map.h:718
Coord d2rdtdx
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1640
virtual void lapang(const Scalar &uu, Scalar &lap) const =0
Computes the angular Laplacian of a scalar field.
friend ostream & operator<<(ostream &, const Map &)
Operator <<.
Definition: map.C:239
virtual void val_lx(double rr, double theta, double pphi, int &l, double &xi) const =0
Computes the domain index l and the value of corresponding to a point given by its physical coordina...
virtual void stdsdp(const Scalar &uu, Scalar &resu) const =0
Computes of a Scalar .
Coord cost
Definition: map.h:722