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.63 2023/05/24 09:58:44 g_servignat Exp $
41  * $Log: map.h,v $
42  * Revision 1.63 2023/05/24 09:58:44 g_servignat
43  * Added Map_eps, an ellipsoidal radial mapping
44  *
45  * Revision 1.62 2022/06/20 14:21:55 g_servignat
46  * Implemented shells in Map_star
47  *
48  * Revision 1.61 2022/05/30 12:39:53 g_servignat
49  * New Map_star class for general adaptive domain to star boundaries
50  *
51  * Revision 1.60 2018/12/05 15:43:45 j_novak
52  * New Map_af constructor from a formatted file.
53  *
54  * Revision 1.59 2014/10/13 08:52:35 j_novak
55  * Lorene classes and functions now belong to the namespace Lorene.
56  *
57  * Revision 1.58 2014/10/06 15:09:40 j_novak
58  * Modified #include directives to use c++ syntax.
59  *
60  * Revision 1.57 2014/01/14 13:24:02 b_peres
61  * *** empty log message ***
62  *
63  * Revision 1.56 2012/01/24 14:58:54 j_novak
64  * Removed functions XXX_fait_xi()
65  *
66  * Revision 1.55 2012/01/17 15:34:20 j_penner
67  * *** empty log message ***
68  *
69  * Revision 1.54 2012/01/17 10:20:07 j_penner
70  * added a member cxi that allows for direct access to the computational coordinates in each domain
71  *
72  * Revision 1.53 2008/09/29 13:23:51 j_novak
73  * Implementation of the angular mapping associated with an affine
74  * mapping. Things must be improved to take into account the domain index.
75  *
76  * Revision 1.52 2007/10/16 21:52:10 e_gourgoulhon
77  * Added method poisson_compact for multi-domains.
78  *
79  * Revision 1.51 2007/05/15 12:44:18 p_grandclement
80  * Scalar version of reevaluate
81  *
82  * Revision 1.50 2007/05/06 10:48:08 p_grandclement
83  * Modification of a few operators for the vorton project
84  *
85  * Revision 1.49 2007/01/16 15:05:59 n_vasset
86  * New constructor (taking a Scalar in mono-domain angular grid for
87  * boundary) for function sol_elliptic_boundary
88  *
89  * Revision 1.48 2006/08/31 12:10:51 j_novak
90  * More comments for Map_af::avance_dalembert().
91  *
92  * Revision 1.47 2006/05/26 09:00:09 j_novak
93  * New members for multiplication or division by cos(theta).
94  *
95  * Revision 1.46 2006/04/25 07:21:54 p_grandclement
96  * Various changes for the NS_BH project
97  *
98  * Revision 1.45 2005/11/30 11:09:03 p_grandclement
99  * Changes for the Bin_ns_bh project
100  *
101  * Revision 1.44 2005/11/24 09:25:06 j_novak
102  * Added the Scalar version for the Laplacian
103  *
104  * Revision 1.43 2005/09/15 15:51:25 j_novak
105  * The "rotation" (change of triad) methods take now Scalars as default
106  * arguments.
107  *
108  * Revision 1.42 2005/08/26 14:02:38 p_grandclement
109  * Modification of the elliptic solver that matches with an oscillatory exterior solution
110  * small correction in Poisson tau also...
111  *
112  * Revision 1.41 2005/08/25 12:14:07 p_grandclement
113  * Addition of a new method to solve the scalar Poisson equation, based on a multi-domain Tau-method
114  *
115  * Revision 1.40 2005/06/09 07:56:24 f_limousin
116  * Implement a new function sol_elliptic_boundary() and
117  * Vector::poisson_boundary(...) which solve the vectorial poisson
118  * equation (method 6) with an inner boundary condition.
119  *
120  * Revision 1.39 2005/04/04 21:30:41 e_gourgoulhon
121  * Added argument lambda to method poisson_angu
122  * to treat the generalized angular Poisson equation:
123  * Lap_ang u + lambda u = source.
124  *
125  * Revision 1.38 2004/12/29 16:37:22 k_taniguchi
126  * Addition of some functions with the multipole falloff condition.
127  *
128  * Revision 1.37 2004/12/02 09:33:04 p_grandclement
129  * *** empty log message ***
130  *
131  * Revision 1.36 2004/11/30 20:42:05 k_taniguchi
132  * Addition of some functions with the falloff condition and a method
133  * to resize the external shell.
134  *
135  * Revision 1.35 2004/11/23 12:39:12 f_limousin
136  * Intoduce function poisson_dir_neu(...) to solve a scalar poisson
137  * equation with a mixed boundary condition (Dirichlet + Neumann).
138  *
139  * Revision 1.34 2004/10/11 15:08:59 j_novak
140  * The radial manipulation functions take Scalar as arguments, instead of Cmp.
141  * Added a conversion operator from Scalar to Cmp.
142  * The Cmp radial manipulation function make conversion to Scalar, call to the
143  * Map_radial version with a Scalar argument and back.
144  *
145  * Revision 1.33 2004/10/08 13:34:35 j_novak
146  * Scalar::div_r() does not need to pass through Cmp version anymore.
147  *
148  * Revision 1.32 2004/08/24 09:14:40 p_grandclement
149  * Addition of some new operators, like Poisson in 2d... It now requieres the
150  * GSL library to work.
151  *
152  * Also, the way a variable change is stored by a Param_elliptic is changed and
153  * no longer uses Change_var but rather 2 Scalars. The codes using that feature
154  * will requiere some modification. (It should concern only the ones about monopoles)
155  *
156  * Revision 1.31 2004/07/27 08:24:26 j_novak
157  * Modif. comments
158  *
159  * Revision 1.30 2004/07/26 16:02:21 j_novak
160  * Added a flag to specify whether the primitive should be zero either at r=0
161  * or at r going to infinity.
162  *
163  * Revision 1.29 2004/06/22 08:49:57 p_grandclement
164  * Addition of everything needed for using the logarithmic mapping
165  *
166  * Revision 1.28 2004/06/14 15:23:53 e_gourgoulhon
167  * Added virtual function primr for computation of radial primitives.
168  *
169  * Revision 1.27 2004/03/31 11:22:23 f_limousin
170  * Methods Map_et::poisson_interne and Map_af::poisson_interne have been
171  * implemented to solve the continuity equation for strange stars.
172  *
173  * Revision 1.26 2004/03/22 13:12:41 j_novak
174  * Modification of comments to use doxygen instead of doc++
175  *
176  * Revision 1.24 2004/03/01 09:57:02 j_novak
177  * the wave equation is solved with Scalars. It now accepts a grid with a
178  * compactified external domain, which the solver ignores and where it copies
179  * the values of the field from one time-step to the next.
180  *
181  * Revision 1.23 2004/02/11 09:47:44 p_grandclement
182  * Addition of a new elliptic solver, matching with the homogeneous solution
183  * at the outer shell and not solving in the external domain (more details
184  * coming soon ; check your local Lorene dealer...)
185  *
186  * Revision 1.22 2004/01/29 08:50:01 p_grandclement
187  * Modification of Map::operator==(const Map&) and addition of the surface
188  * integrales using Scalar.
189  *
190  * Revision 1.21 2004/01/28 16:46:22 p_grandclement
191  * Addition of the sol_elliptic_fixe_der_zero stuff
192  *
193  * Revision 1.20 2004/01/28 10:35:52 j_novak
194  * Added new methods mult_r() for Scalars. These do not change the dzpuis flag.
195  *
196  * Revision 1.19 2004/01/27 09:33:46 j_novak
197  * New method Map_radial::div_r_zec
198  *
199  * Revision 1.18 2004/01/26 16:16:15 j_novak
200  * Methods of gradient for Scalar s. The input can have any dzpuis.
201  *
202  * Revision 1.17 2004/01/19 21:38:21 e_gourgoulhon
203  * Corrected sign error in comments of Map_radial::dxdr.
204  *
205  * Revision 1.16 2003/12/30 22:52:47 e_gourgoulhon
206  * Class Map: added methods flat_met_spher() and flat_met_cart() to get
207  * flat metric associated with the coordinates described by the mapping.
208  *
209  * Revision 1.15 2003/12/11 14:48:47 p_grandclement
210  * Addition of ALL (and that is a lot !) the files needed for the general elliptic solver ... UNDER DEVELOPEMENT...
211  *
212  * Revision 1.14 2003/11/06 14:43:37 e_gourgoulhon
213  * Gave a name to const arguments in certain method prototypes (e.g.
214  * constructors) to correct a bug of DOC++.
215  *
216  * Revision 1.13 2003/11/04 22:54:49 e_gourgoulhon
217  * Added new virtual methods mult_cost, mult_sint and div_sint.
218  *
219  * Revision 1.12 2003/10/16 08:49:21 j_novak
220  * Added a flag to decide wether the output is in the Ylm or in the standard base.
221  *
222  * Revision 1.11 2003/10/15 21:08:22 e_gourgoulhon
223  * Added method poisson_angu.
224  *
225  * Revision 1.10 2003/10/15 16:03:35 j_novak
226  * Added the angular Laplace operator for Scalar.
227  *
228  * Revision 1.9 2003/10/15 10:27:33 e_gourgoulhon
229  * Classes Map, Map_af and Map_et: added new methods dsdt, stdsdp and div_tant.
230  * Class Map_radial: added new Coord's : drdt and stdrdp.
231  *
232  * Revision 1.8 2003/06/20 14:14:53 f_limousin
233  * Add the operator== to compare two Cmp.
234  *
235  * Revision 1.7 2003/06/20 09:27:09 j_novak
236  * Modif commentaires.
237  *
238  * Revision 1.6 2002/10/16 14:36:29 j_novak
239  * Reorganization of #include instructions of standard C++, in order to
240  * use experimental version 3 of gcc.
241  *
242  * Revision 1.5 2002/09/13 09:17:33 j_novak
243  * Modif. commentaires
244  *
245  * Revision 1.4 2002/06/17 14:05:16 j_novak
246  * friend functions are now also declared outside the class definition
247  *
248  * Revision 1.3 2002/05/07 07:06:37 e_gourgoulhon
249  * Compatibily with xlC compiler on IBM SP2:
250  * added declaration of functions map_af_fait_* and map_et_fait_*
251  * outside the classes declarations.
252  *
253  * Revision 1.2 2002/01/15 15:53:06 p_grandclement
254  * I have had a constructor fot map_et using the equation of the surface
255  * of the star.
256  *
257  * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
258  * LORENE
259  *
260  * Revision 2.110 2001/10/29 15:31:55 novak
261  * Ajout de Map_radial::div_r
262  *
263  * Revision 2.109 2001/10/16 10:02:49 novak
264  * *** empty log message ***
265  *
266  * Revision 2.108 2001/07/19 14:01:00 novak
267  * new arguments for Map_af::dalembert
268  *
269  * Revision 2.107 2001/02/26 17:28:31 eric
270  * Ajout de la fonction virtuelle resize.
271  *
272  * Revision 2.106 2001/01/10 11:03:00 phil
273  * ajout de homothetie interne
274  *
275  * Revision 2.105 2001/01/02 10:51:55 phil
276  * ajout integrale de surface a l'infini
277  *
278  * Revision 2.104 2000/10/23 13:59:48 eric
279  * Map_et::adapt: changement des arguments (en autre, ajout de nz_search).
280  *
281  * Revision 2.103 2000/10/20 09:39:19 phil
282  * changement commentaires
283  *
284  * Revision 2.102 2000/10/19 14:33:23 novak
285  * corrige oubli pour Map_et?
286  *
287  * Revision 2.101 2000/10/19 14:11:20 novak
288  * Ajout des fonctions membres Map::dalembert et Map_af::dalembert
289  * (etat experimental)
290  *
291  * Revision 2.100 2000/10/09 13:46:39 eric
292  * Ajout de la fonction virtuelle poisson2d.
293  *
294  * Revision 2.99 2000/09/19 15:28:55 phil
295  * *** empty log message ***
296  *
297  * Revision 2.98 2000/09/19 15:24:19 phil
298  * ajout du passage de cartesienne en spheriques
299  *
300  * Revision 2.97 2000/09/19 13:05:38 phil
301  * ajout integrale_surface
302  *
303  * Revision 2.96 2000/09/11 15:54:03 eric
304  * Suppression des methodes deriv_x, deriv_y et deriv_z.
305  * Introduction des methodes comp_x_from_spherical, etc...
306  *
307  * Revision 2.95 2000/09/07 15:27:58 keisuke
308  * Add a new argument Cmp& uu in Map_af::poisson_regular and Map_et::poisson_regular.
309  *
310  * Revision 2.94 2000/09/04 15:30:56 keisuke
311  * Modify the arguments of Map_af::poisson_regular and Map_et::poisson_regular.
312  *
313  * Revision 2.93 2000/09/04 13:36:19 keisuke
314  * Modify the explanation for "uu_div" in Map_et::poisson_regular.
315  *
316  * Revision 2.92 2000/08/31 15:50:12 keisuke
317  * Modify Map_af::poisson_regular.
318  * Add Map_et::poisson_regular and Map::poisson_regular.
319  *
320  * Revision 2.91 2000/08/31 13:03:22 eric
321  * Ajout de la fonction virtuelle mult_rsint.
322  *
323  * Revision 2.90 2000/08/28 16:17:37 keisuke
324  * Add "int nzet" in the argumant of Map_af::poisson_regular.
325  *
326  * Revision 2.89 2000/08/18 11:10:12 eric
327  * Classe Map_et: ajout de l'operateur d'affectation a un autre Map_et.
328  *
329  * Revision 2.88 2000/08/11 08:50:18 keisuke
330  * Modif Map_af::poisson_regular
331  *
332  * Revision 2.87 2000/08/10 12:54:00 keisuke
333  * Ajout de Map_af::poisson_regular
334  *
335  * Revision 2.86 2000/07/20 14:21:07 eric
336  * Ajout de la fonction div_rsint.
337  *
338  * Revision 2.85 2000/05/25 13:54:41 eric
339  * Modif commentaires
340  *
341  * Revision 2.84 2000/05/22 14:38:51 phil
342  * ajout de inc_dzpuis et dec_dzpuis
343  *
344  * Revision 2.83 2000/04/27 15:18:54 phil
345  * *** empty log message ***
346  *
347  * Revision 2.82 2000/03/20 13:33:23 phil
348  * commentaires
349  *
350  * Revision 2.81 2000/03/17 17:32:48 phil
351  * *** empty log message ***
352  *
353  * Revision 2.80 2000/03/17 17:01:54 phil
354  * *** empty log message ***
355  *
356  * Revision 2.79 2000/03/17 16:58:48 phil
357  * ajout de poisson_frontiere
358  *
359  * Revision 2.78 2000/03/06 11:29:51 eric
360  * Ajout du membre reeavaluate_symy.
361  *
362  * Revision 2.77 2000/02/15 15:08:21 eric
363  * Changement du Param dans Map_et::adapt : fact_echelle est desormais
364  * passe en double_mod.
365  *
366  * Revision 2.76 2000/02/15 10:26:25 phil
367  * commentaire +
368  * suppression de poisson_vect et poisson_vect_oohara
369  *
370  * Revision 2.75 2000/02/11 13:37:43 eric
371  * Ajout de la fonction convert_absolute.
372  *
373  * Revision 2.74 2000/02/09 09:53:37 phil
374  * ajout de poisson_vect_oohara
375  *
376  * Revision 2.73 2000/01/26 13:07:02 eric
377  * Reprototypage complet des routines de derivation:
378  * le resultat est desormais suppose alloue a l'exterieur de la routine
379  * et est passe en argument (Cmp& resu), si bien que le prototypage
380  * complet devient:
381  * void DERIV(const Cmp& ci, Cmp& resu)
382  *
383  * Revision 2.72 2000/01/24 17:08:21 eric
384  * Class Map_af : suppression de la fonction convert.
385  * suppression du constructeur par convertion d'un Map_et.
386  * ajout du constructeur par conversion d'un Map.
387  *
388  * Revision 2.71 2000/01/24 16:41:43 eric
389  * Ajout de la fonction virtuelle operator=(const Map_af& ).
390  * Classe Map_af : ajout de la fonction convert(const Map& ).
391  *
392  * Revision 2.70 2000/01/21 12:48:34 phil
393  * changement prototypage de Map::poisson_vect
394  *
395  * Revision 2.69 2000/01/20 16:35:05 phil
396  * *** empty log message ***
397  *
398  * Revision 2.68 2000/01/20 15:44:42 phil
399  * *** empty log message ***
400  *
401  * Revision 2.67 2000/01/20 15:31:56 phil
402  * *** empty log message ***
403  *
404  * Revision 2.66 2000/01/20 14:18:06 phil
405  * *** empty log message ***
406  *
407  * Revision 2.65 2000/01/20 13:16:34 phil
408  * *** empty log message ***
409  *
410  * Revision 2.64 2000/01/20 12:51:24 phil
411  * *** empty log message ***
412  *
413  * Revision 2.63 2000/01/20 12:45:28 phil
414  * *** empty log message ***
415  *
416  * Revision 2.62 2000/01/20 12:40:27 phil
417  * *** empty log message ***
418  *
419  * Revision 2.61 2000/01/20 11:27:54 phil
420  * ajout de poisson_vect
421  *
422  * Revision 2.60 2000/01/13 15:31:55 eric
423  * Modif commentaires/
424  *
425  * Revision 2.59 2000/01/12 16:02:57 eric
426  * Modif commentaires poisson_compact.
427  *
428  * Revision 2.58 2000/01/12 12:54:23 eric
429  * Ajout du Cmp null, *p_cmp_zero, et de la methode associee cmp_zero().
430  *
431  * Revision 2.57 2000/01/10 13:27:43 eric
432  * Ajout des bases vectorielles associees aux coordonnees :
433  * membres bvect_spher et bvect_cart.
434  *
435  * Revision 2.56 2000/01/10 09:12:47 eric
436  * Reprototypage de poisson_compact : Valeur -> Cmp, Tenseur.
437  * Suppression de poisson_compact_boucle.
438  * poisson_compact est desormais implementee au niveau Map_radial.
439  *
440  * Revision 2.55 2000/01/04 15:23:11 eric
441  * Classe Map_radial : les data sont listees en premier
442  * Introduction de la fonction reevalutate.
443  *
444  * Revision 2.54 2000/01/03 13:30:32 eric
445  * Ajout de la fonction adapt.
446  *
447  * Revision 2.53 1999/12/22 17:09:52 eric
448  * Modif commentaires.
449  *
450  * Revision 2.52 1999/12/21 16:26:25 eric
451  * Ajout du constructeur par conversion Map_af::Map_af(const Map_et&).
452  * Ajout des fonctions Map_af::set_alpha et Map_af::set_beta.
453  *
454  * Revision 2.51 1999/12/21 13:01:29 eric
455  * Changement de prototype de la routine poisson : la solution est
456  * desormais passee en argument (et non plus en valeur de retour)
457  * pour permettre l'initialisation de methodes de resolution iterative.
458  *
459  * Revision 2.50 1999/12/21 10:12:09 eric
460  * Modif commentaires.
461  *
462  * Revision 2.49 1999/12/21 10:06:05 eric
463  * Ajout de l'argument Param& a poisson.
464  *
465  * Revision 2.48 1999/12/20 15:44:35 eric
466  * Modif commentaires.
467  *
468  * Revision 2.47 1999/12/20 10:47:45 eric
469  * Modif commentaires.
470  *
471  * Revision 2.46 1999/12/20 10:24:12 eric
472  * Ajout des fonctions de lecture des parametres de Map_et:
473  * get_alpha(), get_beta(), get_ff(), get_gg().
474  *
475  * Revision 2.45 1999/12/16 14:50:08 eric
476  * Modif commentaires.
477  *
478  * Revision 2.44 1999/12/16 14:17:54 eric
479  * Introduction de l'argument const Param& par dans val_lx et val_lx_jk.
480  * (en remplacement de l'argument Tbl& param).
481  *
482  * Revision 2.43 1999/12/09 10:45:24 eric
483  * Ajout de la fonction virtuelle integrale.
484  *
485  * Revision 2.42 1999/12/07 14:50:47 eric
486  * Changement ordre des arguments val_r, val_lx
487  * val_r_kj --> val_r_jk
488  * val_lx_kj -->val_lx_jk
489  *
490  * Revision 2.41 1999/12/06 16:45:20 eric
491  * Surcharge de val_lx avec la version sans param.
492  *
493  * Revision 2.40 1999/12/06 15:33:44 eric
494  * Ajout des fonctions val_r_kj et val_lx_kj.
495  *
496  * Revision 2.39 1999/12/06 13:11:54 eric
497  * Introduction des fonctions val_r, val_lx et homothetie.
498  *
499  * Revision 2.38 1999/12/02 14:28:22 eric
500  * Reprototypage de la fonction poisson: Valeur -> Cmp.
501  *
502  * Revision 2.37 1999/11/30 14:19:33 eric
503  * Reprototypage complet des fonctions membres mult_r, mult_r_zec,
504  * dec2_dzpuis et inc2_dzpuis : Valeur --> Cmp
505  *
506  * Revision 2.36 1999/11/29 13:17:57 eric
507  * Modif commentaires.
508  *
509  * Revision 2.35 1999/11/29 12:55:42 eric
510  * Changement prototype de la fonction laplacien : Valeur --> Cmp.
511  *
512  * Revision 2.34 1999/11/25 16:27:27 eric
513  * Reorganisation complete du calcul des derivees partielles.
514  *
515  * Revision 2.33 1999/11/24 16:31:17 eric
516  * Map_et: ajout des fonctions set_ff et set_gg.
517  *
518  * Revision 2.32 1999/11/24 14:31:48 eric
519  * Map_af: les membres alpha et beta deviennent prives.
520  * Map_af: introduction des fonctions get_alpha() et get_beta().
521  *
522  * Revision 2.31 1999/11/24 11:22:09 eric
523  * Map_et : Coords rendus publics
524  * Map_et : fonctions de constructions amies.
525  *
526  * Revision 2.30 1999/11/22 10:32:39 eric
527  * Introduction de la classe Map_et.
528  * Constructeurs de Map rendus protected.
529  * Fonction del_coord() rebaptisee reset_coord().
530  *
531  * Revision 2.29 1999/10/27 16:44:41 phil
532  * ajout de mult_r_zec
533  *
534  * Revision 2.28 1999/10/19 14:40:37 phil
535  * ajout de inc2_dzpuis()
536  *
537  * Revision 2.27 1999/10/15 14:12:20 eric
538  * *** empty log message ***
539  *
540  * Revision 2.26 1999/10/14 14:26:06 eric
541  * Depoussierage.
542  * Documentation.
543  *
544  * Revision 2.25 1999/10/11 11:16:29 phil
545  * changement prototypage de poisson_compact_boucle
546  *
547  * Revision 2.24 1999/10/11 10:48:51 phil
548  * changement de nom pour poisson a support compact
549  *
550  * Revision 2.23 1999/10/04 09:20:58 phil
551  * changement de prototypage de void Map_af::poisson_nul
552  *
553  * Revision 2.22 1999/09/30 18:38:32 phil
554  * *** empty log message ***
555  *
556  * Revision 2.21 1999/09/30 18:33:10 phil
557  * ajout de poisson_nul et poisson_nul_boucle
558  *
559  * Revision 2.20 1999/09/30 16:45:54 phil
560  * ajout de Map_af::poisson_nul(const Valeur&, int, int)
561  *
562  * Revision 2.19 1999/09/16 13:15:40 phil
563  * ajout de Valeur mult_r (const Valeur &)
564  *
565  * Revision 2.18 1999/09/15 10:42:11 phil
566  * ajout de Valeur dec2_dzpuis(const Valeur&)
567  *
568  * Revision 2.17 1999/09/14 13:45:45 phil
569  * suppression de la divergence
570  *
571  * Revision 2.16 1999/09/13 15:09:07 phil
572  * ajout de Map_af::divergence
573  *
574  * Revision 2.15 1999/09/13 13:52:23 phil
575  * ajout des derivations partielles par rapport a x,y et z.
576  *
577  * Revision 2.14 1999/09/07 14:35:20 phil
578  * ajout de la fonction Valeur** gradient(const Valeur&)
579  *
580  * Revision 2.13 1999/04/26 16:37:43 phil
581  * *** empty log message ***
582  *
583  * Revision 2.12 1999/04/26 16:33:28 phil
584  * *** empty log message ***
585  *
586  * Revision 2.11 1999/04/26 13:53:04 phil
587  * *** empty log message ***
588  *
589  * Revision 2.10 1999/04/26 13:51:19 phil
590  * ajout de Map_af::laplacien (2versions)
591  *
592  * Revision 2.9 1999/04/14 09:04:01 phil
593  * *** empty log message ***
594  *
595  * Revision 2.8 1999/04/14 08:53:27 phil
596  * *** empty log message ***
597  *
598  * Revision 2.7 1999/04/13 17:45:25 phil
599  * *** empty log message ***
600  *
601  * Revision 2.6 1999/04/13 17:02:41 phil
602  * ,
603  *
604  * Revision 2.5 1999/04/13 17:00:41 phil
605  * ajout de la resolution de poisson affine
606  *
607  * Revision 2.4 1999/03/04 13:10:53 eric
608  * Ajout des Coord representant les derivees du changement de variable
609  * dans la classe Map_radial.
610  *
611  * Revision 2.3 1999/03/01 17:00:38 eric
612  * *** empty log message ***
613  *
614  * Revision 2.2 1999/03/01 16:44:41 eric
615  * Operateurs << et >> sur les ostream.
616  * L'operateur >> est virtuel.
617  *
618  * Revision 2.1 1999/02/22 15:21:45 hyc
619  * *** empty log message ***
620  *
621  *
622  * Revision 2.0 1999/01/15 09:10:39 hyc
623  * *** empty log message ***
624  *
625  * $Header: /cvsroot/Lorene/C++/Include/map.h,v 1.63 2023/05/24 09:58:44 g_servignat Exp $
626  *
627  */
628 
629 #include <cstdio>
630 
631 #include "coord.h"
632 #include "base_vect.h"
633 #include "valeur.h"
634 #include "tbl.h"
635 #include "itbl.h"
636 
637 namespace Lorene {
638 class Scalar ;
639 class Cmp ;
640 class Param ;
641 class Map_af ;
642 class Map_et ;
643 class Tenseur ;
644 class Param_elliptic ;
645 class Metric_flat ;
646 class Tbl ;
647 class Itbl ;
648 
649  //------------------------------------//
650  // class Map //
651  //------------------------------------//
652 
682 class Map {
683 
684  // Data :
685  // ----
686  protected:
688  const Mg3d* mg ;
689 
690  double ori_x ;
691  double ori_y ;
692  double ori_z ;
693  double rot_phi ;
694 
702 
710 
715 
720 
726 
727  mutable Map_af* p_mp_angu ;
728 
729  public:
730  Coord r ;
737 
738  Coord x ;
739  Coord y ;
740  Coord z ;
741 
745 
746 
747  // Constructors, destructor :
748  // ------------------------
749 
750  protected:
751  explicit Map(const Mg3d& ) ;
752  Map(const Map &) ;
753  Map(const Mg3d&, FILE* ) ;
754 
755  public:
756  virtual ~Map() ;
757 
758  // Memory management
759  // -----------------
760  protected:
761  virtual void reset_coord() ;
762 
763  // Outputs
764  // -------
765  private:
766  virtual ostream& operator>>(ostream &) const = 0 ;
767 
768  public:
769  virtual void sauve(FILE* ) const ;
770 
771 
772  // Extraction of information
773  // -------------------------
774 
775  public:
777  const Mg3d* get_mg() const {return mg; };
778 
780  double get_ori_x() const {return ori_x;} ;
782  double get_ori_y() const {return ori_y;} ;
784  double get_ori_z() const {return ori_z;} ;
785 
787  double get_rot_phi() const {return rot_phi;} ;
788 
795  const Base_vect_spher& get_bvect_spher() const {return bvect_spher;} ;
796 
803  const Base_vect_cart& get_bvect_cart() const {return bvect_cart;} ;
804 
808  const Metric_flat& flat_met_spher() const ;
809 
813  const Metric_flat& flat_met_cart() const ;
814 
819  const Cmp& cmp_zero() const {return *p_cmp_zero;} ;
820 
824  virtual const Map_af& mp_angu(int) const = 0 ;
825 
836  void convert_absolute(double xx, double yy, double zz,
837  double& rr, double& theta, double& pphi) const ;
838 
847  virtual double val_r(int l, double xi, double theta, double pphi)
848  const = 0 ;
849 
858  virtual void val_lx(double rr, double theta, double pphi,
859  int& l, double& xi) const = 0 ;
860 
873  virtual void val_lx(double rr, double theta, double pphi,
874  const Param& par, int& l, double& xi) const = 0 ;
875 
876 
878  virtual bool operator==(const Map& ) const = 0;
879 
880 
881 
882  // Modification of the origin, the orientation and the radial scale:
883  // ----------------------------------------------------------------
884  public:
885  void set_ori(double xa0, double ya0, double za0) ;
886  void set_rot_phi(double phi0) ;
887 
892  virtual void homothetie(double lambda) = 0 ;
893 
903  virtual void resize(int l, double lambda) = 0 ;
904 
905  // Modification of the mapping
906  // ---------------------------
907  public:
909  virtual void operator=(const Map_af& ) = 0 ;
910 
916  virtual void adapt(const Cmp& ent, const Param& par, int nbr=0) = 0 ;
917 
918  // Values of a Cmp at the new grid points
919  // --------------------------------------
920 
933  virtual void reevaluate(const Map* mp_prev, int nzet,
934  Cmp& uu) const = 0 ;
935 
949  virtual void reevaluate_symy(const Map* mp_prev, int nzet,
950  Cmp& uu) const = 0 ;
951 
964  virtual void reevaluate(const Map* mp_prev, int nzet,
965  Scalar& uu) const = 0 ;
966 
980  virtual void reevaluate_symy(const Map* mp_prev, int nzet,
981  Scalar& uu) const = 0 ;
982 
983  // Differential operators:
984  // ----------------------
985  public:
992  virtual void dsdxi(const Cmp& ci, Cmp& resu) const = 0 ;
993 
1000  virtual void dsdr(const Cmp& ci, Cmp& resu) const = 0 ;
1001 
1008  virtual void srdsdt(const Cmp& ci, Cmp& resu) const = 0 ;
1009 
1017  virtual void srstdsdp(const Cmp& ci, Cmp& resu) const = 0 ;
1018 
1026  virtual void dsdxi(const Scalar& uu, Scalar& resu) const = 0 ;
1027 
1035  virtual void dsdr(const Scalar& uu, Scalar& resu) const = 0 ;
1036 
1045  virtual void dsdradial(const Scalar& uu, Scalar& resu) const = 0 ;
1046 
1054  virtual void srdsdt(const Scalar& uu, Scalar& resu) const = 0 ;
1055 
1063  virtual void srstdsdp(const Scalar& uu, Scalar& resu) const = 0 ;
1064 
1069  virtual void dsdt(const Scalar& uu, Scalar& resu) const = 0 ;
1070 
1075  virtual void stdsdp(const Scalar& uu, Scalar& resu) const = 0 ;
1076 
1087  virtual void laplacien(const Scalar& uu, int zec_mult_r,
1088  Scalar& lap) const = 0 ;
1089 
1091  virtual void laplacien(const Cmp& uu, int zec_mult_r,
1092  Cmp& lap) const = 0 ;
1093 
1100  virtual void lapang(const Scalar& uu, Scalar& lap) const = 0 ;
1101 
1102 
1113  virtual void primr(const Scalar& uu, Scalar& resu,
1114  bool null_infty) const = 0 ;
1115 
1116 
1117  // Various linear operators
1118  // ------------------------
1119  public:
1123  virtual void mult_r(Scalar& uu) const = 0 ;
1124 
1128  virtual void mult_r(Cmp& ci) const = 0 ;
1129 
1133  virtual void mult_r_zec(Scalar& ) const = 0 ;
1134 
1137  virtual void mult_rsint(Scalar& ) const = 0 ;
1138 
1141  virtual void div_rsint(Scalar& ) const = 0 ;
1142 
1145  virtual void div_r(Scalar& ) const = 0 ;
1146 
1150  virtual void div_r_zec(Scalar& ) const = 0 ;
1151 
1154  virtual void mult_cost(Scalar& ) const = 0 ;
1155 
1158  virtual void div_cost(Scalar& ) const = 0 ;
1159 
1162  virtual void mult_sint(Scalar& ) const = 0 ;
1163 
1166  virtual void div_sint(Scalar& ) const = 0 ;
1167 
1170  virtual void div_tant(Scalar& ) const = 0 ;
1171 
1181  virtual void comp_x_from_spherical(const Scalar& v_r, const Scalar& v_theta,
1182  const Scalar& v_phi, Scalar& v_x) const = 0 ;
1184  virtual void comp_x_from_spherical(const Cmp& v_r, const Cmp& v_theta,
1185  const Cmp& v_phi, Cmp& v_x) const = 0 ;
1186 
1196  virtual void comp_y_from_spherical(const Scalar& v_r, const Scalar& v_theta,
1197  const Scalar& v_phi, Scalar& v_y) const = 0 ;
1198 
1200  virtual void comp_y_from_spherical(const Cmp& v_r, const Cmp& v_theta,
1201  const Cmp& v_phi, Cmp& v_y) const = 0 ;
1202 
1211  virtual void comp_z_from_spherical(const Scalar& v_r, const Scalar& v_theta,
1212  Scalar& v_z) const = 0 ;
1213 
1215  virtual void comp_z_from_spherical(const Cmp& v_r, const Cmp& v_theta,
1216  Cmp& v_z) const = 0 ;
1217 
1227  virtual void comp_r_from_cartesian(const Scalar& v_x, const Scalar& v_y,
1228  const Scalar& v_z, Scalar& v_r) const = 0 ;
1230  virtual void comp_r_from_cartesian(const Cmp& v_x, const Cmp& v_y,
1231  const Cmp& v_z, Cmp& v_r) const = 0 ;
1232 
1242  virtual void comp_t_from_cartesian(const Scalar& v_x, const Scalar& v_y,
1243  const Scalar& v_z, Scalar& v_t) const = 0 ;
1244 
1246  virtual void comp_t_from_cartesian(const Cmp& v_x, const Cmp& v_y,
1247  const Cmp& v_z, Cmp& v_t) const = 0 ;
1248 
1257  virtual void comp_p_from_cartesian(const Scalar& v_x, const Scalar& v_y,
1258  Scalar& v_p) const = 0 ;
1259 
1261  virtual void comp_p_from_cartesian(const Cmp& v_x, const Cmp& v_y,
1262  Cmp& v_p) const = 0 ;
1263 
1268  virtual void dec_dzpuis(Scalar& ) const = 0 ;
1269 
1274  virtual void dec2_dzpuis(Scalar& ) const = 0 ;
1275 
1280  virtual void inc_dzpuis(Scalar& ) const = 0 ;
1281 
1286  virtual void inc2_dzpuis(Scalar& ) const = 0 ;
1287 
1295  virtual Tbl* integrale(const Cmp&) const = 0 ;
1296 
1297  // PDE resolution :
1298  // --------------
1299  public:
1310  virtual void poisson(const Cmp& source, Param& par, Cmp& uu) const = 0 ;
1311 
1322  virtual void poisson_tau(const Cmp& source, Param& par, Cmp& uu) const = 0 ;
1323 
1324  virtual void poisson_falloff(const Cmp& source, Param& par, Cmp& uu,
1325  int k_falloff) const = 0 ;
1326 
1327  virtual void poisson_ylm(const Cmp& source, Param& par, Cmp& pot,
1328  int nylm, double* intvec) const = 0 ;
1329 
1352  virtual void poisson_regular(const Cmp& source, int k_div, int nzet,
1353  double unsgam1, Param& par, Cmp& uu,
1354  Cmp& uu_regu, Cmp& uu_div,
1355  Tenseur& duu_div, Cmp& source_regu,
1356  Cmp& source_div) const = 0 ;
1357 
1371  virtual void poisson_compact(const Cmp& source, const Cmp& aa,
1372  const Tenseur& bb, const Param& par,
1373  Cmp& psi) const = 0 ;
1374 
1389  virtual void poisson_compact(int nzet, const Cmp& source, const Cmp& aa,
1390  const Tenseur& bb, const Param& par,
1391  Cmp& psi) const = 0 ;
1392 
1410  virtual void poisson_angu(const Scalar& source, Param& par,
1411  Scalar& uu, double lambda=0) const = 0 ;
1412 
1413  virtual void poisson_angu(const Cmp& source, Param& par,
1414  Cmp& uu, double lambda=0) const = 0 ;
1415 
1416 
1417  public:
1441  virtual Param* donne_para_poisson_vect (Param& para, int i) const = 0;
1442 
1463  virtual void poisson_frontiere (const Cmp& source,const Valeur& limite,
1464  int raccord, int num_front, Cmp& pot,
1465  double = 0., double = 0.) const = 0 ;
1466 
1467  virtual void poisson_frontiere_double (const Cmp& source, const Valeur& lim_func,
1468  const Valeur& lim_der, int num_zone, Cmp& pot) const = 0 ;
1469 
1470 
1481  virtual void poisson_interne (const Cmp& source, const Valeur& limite,
1482  Param& par, Cmp& pot) const = 0 ;
1483 
1484 
1506  virtual void poisson2d(const Cmp& source_mat, const Cmp& source_quad,
1507  Param& par, Cmp& uu) const = 0 ;
1508 
1522  virtual void dalembert(Param& par, Scalar& fJp1, const Scalar& fJ,
1523  const Scalar& fJm1, const Scalar& source) const = 0 ;
1524 
1525  // Friend functions :
1526  // ----------------
1527  friend ostream& operator<<(ostream& , const Map& ) ;
1528 };
1529 ostream& operator<<(ostream& , const Map& ) ;
1530 
1531 
1532 
1533  //------------------------------------//
1534  // class Map_radial //
1535  //------------------------------------//
1536 
1537 
1538 
1551 class Map_radial : public Map {
1552 
1553  // Data :
1554  // ----
1555 
1556  // 0th order derivatives of the mapping
1557  // - - - - - - - - - - - - - - - - - -
1558  public:
1565 
1566  // 1st order derivatives of the mapping
1567  // - - - - - - - - - - - - - - - - - -
1568  public:
1576 
1584 
1592 
1600 
1608 
1616 
1624 
1625  // 2nd order derivatives of the mapping
1626  // - - - - - - - - - - - - - - - - - -
1627  public:
1635 
1647 
1648 
1656 
1664 
1665 
1673 
1674 
1675  // Constructors, destructor :
1676  // ------------------------
1677 
1678  protected:
1680  Map_radial(const Mg3d& mgrid ) ;
1681  Map_radial(const Map_radial& mp) ;
1682  Map_radial (const Mg3d&, FILE* ) ;
1683 
1684  public:
1685  virtual ~Map_radial() ;
1686 
1687  // Memory management
1688  // -----------------
1689  protected:
1690  virtual void reset_coord() ;
1691  // Modification of the mapping
1692  // ---------------------------
1693  public:
1695  virtual void operator=(const Map_af& ) = 0 ;
1696 
1697  // Outputs
1698  // -------
1699  public:
1700  virtual void sauve(FILE* ) const ;
1701 
1702  // Extraction of information
1703  // -------------------------
1713  virtual double val_r_jk(int l, double xi, int j, int k) const = 0 ;
1714 
1725  virtual void val_lx_jk(double rr, int j, int k, const Param& par,
1726  int& l, double& xi) const = 0 ;
1727 
1729  virtual bool operator==(const Map& ) const = 0;
1730 
1731  // Values of a Cmp at the new grid points
1732  // --------------------------------------
1745  virtual void reevaluate(const Map* mp_prev, int nzet, Cmp& uu) const ;
1746 
1760  virtual void reevaluate_symy(const Map* mp_prev, int nzet, Cmp& uu)
1761  const ;
1762 
1775  virtual void reevaluate(const Map* mp_prev, int nzet, Scalar& uu) const ;
1776 
1790  virtual void reevaluate_symy(const Map* mp_prev, int nzet, Scalar& uu)
1791  const ;
1792 
1793  // Various linear operators
1794  // ------------------------
1795  public:
1799  virtual void mult_r(Scalar& uu) const ;
1800 
1804  virtual void mult_r(Cmp& ci) const ;
1805 
1810  virtual void mult_r_zec(Scalar& ) const ;
1811 
1814  virtual void mult_rsint(Scalar& ) const ;
1815 
1818  virtual void div_rsint(Scalar& ) const ;
1819 
1822  virtual void div_r(Scalar& ) const ;
1823 
1827  virtual void div_r_zec(Scalar& ) const ;
1828 
1831  virtual void mult_cost(Scalar& ) const ;
1832 
1835  virtual void div_cost(Scalar& ) const ;
1836 
1839  virtual void mult_sint(Scalar& ) const ;
1840 
1843  virtual void div_sint(Scalar& ) const ;
1844 
1847  virtual void div_tant(Scalar& ) const ;
1848 
1858  virtual void comp_x_from_spherical(const Scalar& v_r, const Scalar& v_theta,
1859  const Scalar& v_phi, Scalar& v_x) const ;
1860 
1862  virtual void comp_x_from_spherical(const Cmp& v_r, const Cmp& v_theta,
1863  const Cmp& v_phi, Cmp& v_x) const ;
1864 
1874  virtual void comp_y_from_spherical(const Scalar& v_r, const Scalar& v_theta,
1875  const Scalar& v_phi, Scalar& v_y) const ;
1876 
1878  virtual void comp_y_from_spherical(const Cmp& v_r, const Cmp& v_theta,
1879  const Cmp& v_phi, Cmp& v_y) const ;
1880 
1889  virtual void comp_z_from_spherical(const Scalar& v_r, const Scalar& v_theta,
1890  Scalar& v_z) const ;
1891 
1893  virtual void comp_z_from_spherical(const Cmp& v_r, const Cmp& v_theta,
1894  Cmp& v_z) const ;
1895 
1905  virtual void comp_r_from_cartesian(const Scalar& v_x, const Scalar& v_y,
1906  const Scalar& v_z, Scalar& v_r) const ;
1907 
1909  virtual void comp_r_from_cartesian(const Cmp& v_x, const Cmp& v_y,
1910  const Cmp& v_z, Cmp& v_r) const ;
1911 
1921  virtual void comp_t_from_cartesian(const Scalar& v_x, const Scalar& v_y,
1922  const Scalar& v_z, Scalar& v_t) const ;
1923 
1925  virtual void comp_t_from_cartesian(const Cmp& v_x, const Cmp& v_y,
1926  const Cmp& v_z, Cmp& v_t) const ;
1927 
1936  virtual void comp_p_from_cartesian(const Scalar& v_x, const Scalar& v_y,
1937  Scalar& v_p) const ;
1938 
1940  virtual void comp_p_from_cartesian(const Cmp& v_x, const Cmp& v_y,
1941  Cmp& v_p) const ;
1942 
1948  virtual void dec_dzpuis(Scalar& ) const ;
1949 
1955  virtual void dec2_dzpuis(Scalar& ) const ;
1956 
1962  virtual void inc_dzpuis(Scalar& ) const ;
1963 
1969  virtual void inc2_dzpuis(Scalar& ) const ;
1970 
1971 
1972  // PDE resolution :
1973  // --------------
1974  public:
1997  virtual void poisson_compact(const Cmp& source, const Cmp& aa,
1998  const Tenseur& bb, const Param& par,
1999  Cmp& psi) const ;
2000 
2015  virtual void poisson_compact(int nzet, const Cmp& source, const Cmp& aa,
2016  const Tenseur& bb, const Param& par,
2017  Cmp& psi) const ;
2018 
2019 };
2020 
2021 
2022  //------------------------------------//
2023  // class Map_af //
2024  //------------------------------------//
2025 
2026 
2027 
2042 class Map_af : public Map_radial {
2043 
2044  // Data :
2045  // ----
2046  private:
2048  double* alpha ;
2050  double* beta ;
2051 
2052  // Constructors, destructor :
2053  // ------------------------
2054  public:
2066  Map_af(const Mg3d& mgrille, const double* r_limits) ;
2079  Map_af(const Mg3d& mgrille, const Tbl& r_limits) ;
2080 
2081  Map_af(const Map_af& ) ;
2082  Map_af(const Mg3d&, const string&) ;
2083  Map_af(const Mg3d&, FILE* ) ;
2084 
2096  explicit Map_af(const Map& ) ;
2097 
2098  virtual ~Map_af() ;
2099 
2100  // Assignment
2101  // ----------
2102  public:
2104  virtual void operator=(const Map_af& ) ;
2105 
2106  // Memory management
2107  // -----------------
2108  private:
2110  void set_coord() ;
2111 
2112  // Extraction of information
2113  // -------------------------
2114  public:
2116  const double* get_alpha() const ;
2117 
2119  const double* get_beta() const ;
2120 
2124  virtual const Map_af& mp_angu(int) const ;
2125 
2135  virtual double val_r(int l, double xi, double theta, double pphi) const ;
2136 
2146  virtual void val_lx(double rr, double theta, double pphi,
2147  int& l, double& xi) const ;
2148 
2158  virtual void val_lx(double rr, double theta, double pphi,
2159  const Param& par, int& l, double& xi) const ;
2160 
2170  virtual double val_r_jk(int l, double xi, int j, int k) const ;
2171 
2181  virtual void val_lx_jk(double rr, int j, int k, const Param& par,
2182  int& l, double& xi) const ;
2183 
2185  virtual bool operator==(const Map& ) const ;
2186 
2187 
2188  // Outputs
2189  // -------
2190  public:
2191  virtual void sauve(FILE* ) const ;
2192 
2193  private:
2194  virtual ostream& operator>>(ostream &) const ;
2195 
2196  // Modification of the mapping
2197  // ---------------------------
2198  public:
2203  virtual void homothetie(double lambda) ;
2204 
2214  virtual void resize(int l, double lambda) ;
2215 
2221  void homothetie_interne(double lambda) ;
2222 
2225  virtual void adapt(const Cmp& ent, const Param& par, int nbr=0) ;
2226 
2228  void set_alpha(double alpha0, int l) ;
2229 
2231  void set_beta(double beta0, int l) ;
2232 
2233  // Differential operators:
2234  // ----------------------
2235  public:
2242  virtual void dsdxi(const Cmp& ci, Cmp& resu) const ;
2243 
2250  virtual void dsdr(const Cmp& ci, Cmp& resu) const ;
2251 
2258  virtual void srdsdt(const Cmp& ci, Cmp& resu) const ;
2259 
2267  virtual void srstdsdp(const Cmp& ci, Cmp& resu) const ;
2268 
2276  virtual void dsdr(const Scalar& uu, Scalar& resu) const ;
2277 
2285  virtual void dsdxi(const Scalar& uu, Scalar& resu) const ;
2286 
2294  virtual void dsdradial(const Scalar&, Scalar&) const ;
2295 
2303  virtual void srdsdt(const Scalar& uu, Scalar& resu) const ;
2304 
2312  virtual void srstdsdp(const Scalar& uu, Scalar& resu) const ;
2313 
2318  virtual void dsdt(const Scalar& uu, Scalar& resu) const ;
2319 
2324  virtual void stdsdp(const Scalar& uu, Scalar& resu) const ;
2325 
2336  virtual void laplacien(const Scalar& uu, int zec_mult_r,
2337  Scalar& lap) const ;
2338 
2340  virtual void laplacien(const Cmp& uu, int zec_mult_r,
2341  Cmp& lap) const ;
2342 
2349  virtual void lapang(const Scalar& uu, Scalar& lap) const ;
2350 
2351 
2362  virtual void primr(const Scalar& uu, Scalar& resu,
2363  bool null_infty) const ;
2364 
2365 
2373  virtual Tbl* integrale(const Cmp&) const ;
2374 
2375 
2376  // PDE resolution :
2377  // --------------
2378  public:
2386  virtual void poisson(const Cmp& source, Param& par, Cmp& uu) const ;
2387 
2395  virtual void poisson_tau(const Cmp& source, Param& par, Cmp& uu) const ;
2396 
2397  virtual void poisson_falloff(const Cmp& source, Param& par, Cmp& uu,
2398  int k_falloff) const ;
2399 
2400  virtual void poisson_ylm(const Cmp& source, Param& par, Cmp& pot,
2401  int nylm, double* intvec) const ;
2402 
2424  virtual void poisson_regular(const Cmp& source, int k_div, int nzet,
2425  double unsgam1, Param& par, Cmp& uu,
2426  Cmp& uu_regu, Cmp& uu_div,
2427  Tenseur& duu_div, Cmp& source_regu,
2428  Cmp& source_div) const ;
2429 
2447  virtual void poisson_angu(const Scalar& source, Param& par,
2448  Scalar& uu, double lambda=0) const ;
2449  virtual void poisson_angu(const Cmp& source, Param& par,
2450  Cmp& uu, double lambda=0) const ;
2451 
2461  virtual Param* donne_para_poisson_vect (Param& par, int i) const ;
2462 
2467  virtual void poisson_frontiere (const Cmp&, const Valeur&, int, int, Cmp&, double = 0., double = 0.) const ;
2468 
2474  virtual void poisson_frontiere_double (const Cmp& source, const Valeur& lim_func,
2475  const Valeur& lim_der, int num_zone, Cmp& pot) const ;
2476 
2487  virtual void poisson_interne (const Cmp& source, const Valeur& limite,
2488  Param& par, Cmp& pot) const ;
2489 
2494  double integrale_surface (const Cmp& ci, double rayon) const ;
2495 
2500  double integrale_surface (const Scalar& ci, double rayon) const ;
2501 
2502  double integrale_surface_falloff (const Cmp& ci) const ;
2503 
2508  double integrale_surface_infini (const Cmp& ci) const ;
2509 
2514  double integrale_surface_infini (const Scalar& ci) const ;
2515 
2523  void sol_elliptic (Param_elliptic& params,
2524  const Scalar& so, Scalar& uu) const ;
2525 
2526 
2538  void sol_elliptic_boundary (Param_elliptic& params,
2539  const Scalar& so, Scalar& uu, const Mtbl_cf& bound,
2540  double fact_dir, double fact_neu ) const ;
2541 
2546  void sol_elliptic_boundary (Param_elliptic& params,
2547  const Scalar& so, Scalar& uu, const Scalar& bound,
2548  double fact_dir, double fact_neu ) const ;
2549 
2559  void sol_elliptic_no_zec (Param_elliptic& params,
2560  const Scalar& so, Scalar& uu, double val) const ;
2561 
2571  void sol_elliptic_only_zec (Param_elliptic& params,
2572  const Scalar& so, Scalar& uu, double val) const ;
2573 
2579  void sol_elliptic_sin_zec (Param_elliptic& params,
2580  const Scalar& so, Scalar& uu,
2581  double* coefs, double*) const ;
2592  void sol_elliptic_fixe_der_zero (double val,
2593  Param_elliptic& params,
2594  const Scalar& so, Scalar& uu) const ;
2595 
2620  virtual void poisson2d(const Cmp& source_mat, const Cmp& source_quad,
2621  Param& par, Cmp& uu) const ;
2630  const Scalar&, Scalar&) const ;
2639  const Scalar&, Scalar&) const ;
2640 
2669  virtual void dalembert(Param& par, Scalar& fJp1, const Scalar& fJ,
2670  const Scalar& fJm1, const Scalar& source) const ;
2671 
2672  // Building functions for the Coord's
2673  // ----------------------------------
2674  friend Mtbl* map_af_fait_r(const Map* ) ;
2675  friend Mtbl* map_af_fait_tet(const Map* ) ;
2676  friend Mtbl* map_af_fait_phi(const Map* ) ;
2677  friend Mtbl* map_af_fait_sint(const Map* ) ;
2678  friend Mtbl* map_af_fait_cost(const Map* ) ;
2679  friend Mtbl* map_af_fait_sinp(const Map* ) ;
2680  friend Mtbl* map_af_fait_cosp(const Map* ) ;
2681 
2682  friend Mtbl* map_af_fait_x(const Map* ) ;
2683  friend Mtbl* map_af_fait_y(const Map* ) ;
2684  friend Mtbl* map_af_fait_z(const Map* ) ;
2685 
2686  friend Mtbl* map_af_fait_xa(const Map* ) ;
2687  friend Mtbl* map_af_fait_ya(const Map* ) ;
2688  friend Mtbl* map_af_fait_za(const Map* ) ;
2689 
2690  friend Mtbl* map_af_fait_xsr(const Map* ) ;
2691  friend Mtbl* map_af_fait_dxdr(const Map* ) ;
2692  friend Mtbl* map_af_fait_drdt(const Map* ) ;
2693  friend Mtbl* map_af_fait_stdrdp(const Map* ) ;
2694  friend Mtbl* map_af_fait_srdrdt(const Map* ) ;
2695  friend Mtbl* map_af_fait_srstdrdp(const Map* ) ;
2696  friend Mtbl* map_af_fait_sr2drdt(const Map* ) ;
2697  friend Mtbl* map_af_fait_sr2stdrdp(const Map* ) ;
2698  friend Mtbl* map_af_fait_d2rdx2(const Map* ) ;
2699  friend Mtbl* map_af_fait_lapr_tp(const Map* ) ;
2700  friend Mtbl* map_af_fait_d2rdtdx(const Map* ) ;
2701  friend Mtbl* map_af_fait_sstd2rdpdx(const Map* ) ;
2702  friend Mtbl* map_af_fait_sr2d2rdt2(const Map* ) ;
2703 
2704 };
2705 
2706  Mtbl* map_af_fait_r(const Map* ) ;
2707  Mtbl* map_af_fait_tet(const Map* ) ;
2708  Mtbl* map_af_fait_phi(const Map* ) ;
2709  Mtbl* map_af_fait_sint(const Map* ) ;
2710  Mtbl* map_af_fait_cost(const Map* ) ;
2711  Mtbl* map_af_fait_sinp(const Map* ) ;
2712  Mtbl* map_af_fait_cosp(const Map* ) ;
2713 
2714  Mtbl* map_af_fait_x(const Map* ) ;
2715  Mtbl* map_af_fait_y(const Map* ) ;
2716  Mtbl* map_af_fait_z(const Map* ) ;
2717 
2718  Mtbl* map_af_fait_xa(const Map* ) ;
2719  Mtbl* map_af_fait_ya(const Map* ) ;
2720  Mtbl* map_af_fait_za(const Map* ) ;
2721 
2722  Mtbl* map_af_fait_xsr(const Map* ) ;
2723  Mtbl* map_af_fait_dxdr(const Map* ) ;
2724  Mtbl* map_af_fait_drdt(const Map* ) ;
2725  Mtbl* map_af_fait_stdrdp(const Map* ) ;
2726  Mtbl* map_af_fait_srdrdt(const Map* ) ;
2727  Mtbl* map_af_fait_srstdrdp(const Map* ) ;
2728  Mtbl* map_af_fait_sr2drdt(const Map* ) ;
2729  Mtbl* map_af_fait_sr2stdrdp(const Map* ) ;
2730  Mtbl* map_af_fait_d2rdx2(const Map* ) ;
2731  Mtbl* map_af_fait_lapr_tp(const Map* ) ;
2732  Mtbl* map_af_fait_d2rdtdx(const Map* ) ;
2733  Mtbl* map_af_fait_sstd2rdpdx(const Map* ) ;
2734  Mtbl* map_af_fait_sr2d2rdt2(const Map* ) ;
2735 
2736 
2737 
2738 
2739  //------------------------------------//
2740  // class Map_et //
2741  //------------------------------------//
2742 
2743 
2744 
2770 class Map_et : public Map_radial {
2771 
2772  // Data :
2773  // ----
2774  private:
2776  double* alpha ;
2778  double* beta ;
2779 
2783  Tbl** aa ;
2784 
2788  Tbl** daa ;
2789 
2793  Tbl** ddaa ;
2794 
2797 
2800 
2805 
2810 
2814  Tbl** bb ;
2815 
2819  Tbl** dbb ;
2820 
2824  Tbl** ddbb ;
2825 
2828 
2831 
2838 
2845 
2846  public:
2853 
2860 
2861  // Constructors, destructor :
2862  // ------------------------
2863  public:
2875  Map_et(const Mg3d& mgrille, const double* r_limits) ;
2876 
2894  Map_et(const Mg3d& mgrille, const double* r_limits,const Tbl& tab);
2895  Map_et(const Map_et& ) ;
2896  Map_et(const Mg3d&, FILE* ) ;
2897 
2898  virtual ~Map_et() ;
2899 
2900  // Assignment
2901  // ----------
2902  public:
2904  virtual void operator=(const Map_et& mp) ;
2905 
2907  virtual void operator=(const Map_af& mpa) ;
2908 
2910  void set_ff(const Valeur& ) ;
2912  void set_gg(const Valeur& ) ;
2913 
2914  // Memory management
2915  // -----------------
2916  private:
2918  void set_coord() ;
2919  protected:
2921  virtual void reset_coord() ;
2922 
2923  private:
2925  void fait_poly() ;
2926 
2927  // Extraction of information
2928  // -------------------------
2929  public:
2933  virtual const Map_af& mp_angu(int) const ;
2934 
2938  const double* get_alpha() const ;
2939 
2943  const double* get_beta() const ;
2944 
2946  const Valeur& get_ff() const ;
2947 
2949  const Valeur& get_gg() const ;
2950 
2960  virtual double val_r(int l, double xi, double theta, double pphi) const ;
2961 
2971  virtual void val_lx(double rr, double theta, double pphi,
2972  int& l, double& xi) const ;
2973 
2992  virtual void val_lx(double rr, double theta, double pphi,
2993  const Param& par, int& l, double& xi) const ;
2994 
2996  virtual bool operator==(const Map& ) const ;
2997 
3007  virtual double val_r_jk(int l, double xi, int j, int k) const ;
3008 
3025  virtual void val_lx_jk(double rr, int j, int k, const Param& par,
3026  int& l, double& xi) const ;
3027 
3028 
3029 
3030  // Outputs
3031  // -------
3032  public:
3033  virtual void sauve(FILE* ) const ;
3034 
3035  private:
3036  virtual ostream& operator>>(ostream &) const ;
3037 
3038  // Modification of the radial scale
3039  // --------------------------------
3040  public:
3045  virtual void homothetie(double lambda) ;
3046 
3056  virtual void resize(int l, double lambda) ;
3057 
3064  void resize_extr(double lambda) ;
3065 
3067  void set_alpha(double alpha0, int l) ;
3068 
3070  void set_beta(double beta0, int l) ;
3071 
3072  // Modification of the mapping
3073  // ---------------------------
3118  virtual void adapt(const Cmp& ent, const Param& par, int nbr_filtre = 0) ;
3119 
3120  // Differential operators:
3121  // ----------------------
3122  public:
3129  virtual void dsdxi(const Cmp& ci, Cmp& resu) const ;
3130 
3137  virtual void dsdr(const Cmp& ci, Cmp& resu) const ;
3138 
3145  virtual void srdsdt(const Cmp& ci, Cmp& resu) const ;
3146 
3154  virtual void srstdsdp(const Cmp& ci, Cmp& resu) const ;
3155 
3163  virtual void dsdxi(const Scalar& uu, Scalar& resu) const ;
3164 
3172  virtual void dsdr(const Scalar& uu, Scalar& resu) const ;
3173 
3182  virtual void dsdradial(const Scalar& uu, Scalar& resu) const ;
3183 
3191  virtual void srdsdt(const Scalar& uu, Scalar& resu) const ;
3192 
3200  virtual void srstdsdp(const Scalar& uu, Scalar& resu) const ;
3201 
3206  virtual void dsdt(const Scalar& uu, Scalar& resu) const ;
3207 
3212  virtual void stdsdp(const Scalar& uu, Scalar& resu) const ;
3213 
3224  virtual void laplacien(const Scalar& uu, int zec_mult_r,
3225  Scalar& lap) const ;
3226 
3228  virtual void laplacien(const Cmp& uu, int zec_mult_r,
3229  Cmp& lap) const ;
3230 
3237  virtual void lapang(const Scalar& uu, Scalar& lap) const ;
3238 
3239 
3250  virtual void primr(const Scalar& uu, Scalar& resu,
3251  bool null_infty) const ;
3252 
3253 
3261  virtual Tbl* integrale(const Cmp&) const ;
3262 
3263 
3264  // PDE resolution :
3265  // --------------
3266  public:
3304  virtual void poisson(const Cmp& source, Param& par, Cmp& uu) const ;
3305 
3343  virtual void poisson_tau(const Cmp& source, Param& par, Cmp& uu) const ;
3344 
3345  virtual void poisson_falloff(const Cmp& source, Param& par, Cmp& uu,
3346  int k_falloff) const ;
3347 
3348  virtual void poisson_ylm(const Cmp& source, Param& par, Cmp& uu,
3349  int nylm, double* intvec) const ;
3350 
3386  virtual void poisson_regular(const Cmp& source, int k_div, int nzet,
3387  double unsgam1, Param& par, Cmp& uu,
3388  Cmp& uu_regu, Cmp& uu_div,
3389  Tenseur& duu_div, Cmp& source_regu,
3390  Cmp& source_div) const ;
3391 
3409  virtual void poisson_angu(const Scalar& source, Param& par,
3410  Scalar& uu, double lambda=0) const ;
3411  virtual void poisson_angu(const Cmp& source, Param& par,
3412  Cmp& uu, double lambda=0) const ;
3413 
3437  virtual Param* donne_para_poisson_vect (Param& para, int i) const ;
3438 
3442  virtual void poisson_frontiere (const Cmp&, const Valeur&, int, int,
3443  Cmp&, double = 0., double = 0.) const ;
3444  virtual void poisson_frontiere_double (const Cmp& source,
3445  const Valeur& lim_func, const Valeur& lim_der,
3446  int num_zone, Cmp& pot) const ;
3447 
3458  virtual void poisson_interne (const Cmp& source, const Valeur& limite,
3459  Param& par, Cmp& pot) const ;
3460 
3461 
3500  virtual void poisson2d(const Cmp& source_mat, const Cmp& source_quad,
3501  Param& par, Cmp& uu) const ;
3502 
3506  virtual void dalembert(Param& par, Scalar& fJp1, const Scalar& fJ,
3507  const Scalar& fJm1, const Scalar& source) const ;
3508 
3509 
3510 
3511 
3512  // Building functions for the Coord's
3513  // ----------------------------------
3514  friend Mtbl* map_et_fait_r(const Map* ) ;
3515  friend Mtbl* map_et_fait_tet(const Map* ) ;
3516  friend Mtbl* map_et_fait_phi(const Map* ) ;
3517  friend Mtbl* map_et_fait_sint(const Map* ) ;
3518  friend Mtbl* map_et_fait_cost(const Map* ) ;
3519  friend Mtbl* map_et_fait_sinp(const Map* ) ;
3520  friend Mtbl* map_et_fait_cosp(const Map* ) ;
3521 
3522  friend Mtbl* map_et_fait_x(const Map* ) ;
3523  friend Mtbl* map_et_fait_y(const Map* ) ;
3524  friend Mtbl* map_et_fait_z(const Map* ) ;
3525 
3526  friend Mtbl* map_et_fait_xa(const Map* ) ;
3527  friend Mtbl* map_et_fait_ya(const Map* ) ;
3528  friend Mtbl* map_et_fait_za(const Map* ) ;
3529 
3530  friend Mtbl* map_et_fait_xsr(const Map* ) ;
3531  friend Mtbl* map_et_fait_dxdr(const Map* ) ;
3532  friend Mtbl* map_et_fait_drdt(const Map* ) ;
3533  friend Mtbl* map_et_fait_stdrdp(const Map* ) ;
3534  friend Mtbl* map_et_fait_srdrdt(const Map* ) ;
3535  friend Mtbl* map_et_fait_srstdrdp(const Map* ) ;
3536  friend Mtbl* map_et_fait_sr2drdt(const Map* ) ;
3537  friend Mtbl* map_et_fait_sr2stdrdp(const Map* ) ;
3538  friend Mtbl* map_et_fait_d2rdx2(const Map* ) ;
3539  friend Mtbl* map_et_fait_lapr_tp(const Map* ) ;
3540  friend Mtbl* map_et_fait_d2rdtdx(const Map* ) ;
3541  friend Mtbl* map_et_fait_sstd2rdpdx(const Map* ) ;
3542  friend Mtbl* map_et_fait_sr2d2rdt2(const Map* ) ;
3543 
3544  friend Mtbl* map_et_fait_rsxdxdr(const Map* ) ;
3545  friend Mtbl* map_et_fait_rsx2drdx(const Map* ) ;
3546 
3547 };
3548 
3549  Mtbl* map_et_fait_r(const Map* ) ;
3550  Mtbl* map_et_fait_tet(const Map* ) ;
3551  Mtbl* map_et_fait_phi(const Map* ) ;
3552  Mtbl* map_et_fait_sint(const Map* ) ;
3553  Mtbl* map_et_fait_cost(const Map* ) ;
3554  Mtbl* map_et_fait_sinp(const Map* ) ;
3555  Mtbl* map_et_fait_cosp(const Map* ) ;
3556 
3557  Mtbl* map_et_fait_x(const Map* ) ;
3558  Mtbl* map_et_fait_y(const Map* ) ;
3559  Mtbl* map_et_fait_z(const Map* ) ;
3560 
3561  Mtbl* map_et_fait_xa(const Map* ) ;
3562  Mtbl* map_et_fait_ya(const Map* ) ;
3563  Mtbl* map_et_fait_za(const Map* ) ;
3564 
3565  Mtbl* map_et_fait_xsr(const Map* ) ;
3566  Mtbl* map_et_fait_dxdr(const Map* ) ;
3567  Mtbl* map_et_fait_drdt(const Map* ) ;
3568  Mtbl* map_et_fait_stdrdp(const Map* ) ;
3569  Mtbl* map_et_fait_srdrdt(const Map* ) ;
3570  Mtbl* map_et_fait_srstdrdp(const Map* ) ;
3571  Mtbl* map_et_fait_sr2drdt(const Map* ) ;
3572  Mtbl* map_et_fait_sr2stdrdp(const Map* ) ;
3573  Mtbl* map_et_fait_d2rdx2(const Map* ) ;
3574  Mtbl* map_et_fait_lapr_tp(const Map* ) ;
3575  Mtbl* map_et_fait_d2rdtdx(const Map* ) ;
3576  Mtbl* map_et_fait_sstd2rdpdx(const Map* ) ;
3577  Mtbl* map_et_fait_sr2d2rdt2(const Map* ) ;
3578 
3579  Mtbl* map_et_fait_rsxdxdr(const Map* ) ;
3580  Mtbl* map_et_fait_rsx2drdx(const Map* ) ;
3581 
3582  //------------------------------------//
3583  // class Map_log //
3584  //------------------------------------//
3585 
3586 #define AFFINE 0
3587 #define LOG 1
3588 
3603 class Map_log : public Map_radial {
3604 
3605  // Data :
3606  // ----
3607  private:
3616 
3617  public:
3624 
3625  private:
3626  void set_coord() ;
3627 
3628  // Constructors, destructor :
3629  // ------------------------
3630  public:
3643  Map_log (const Mg3d& mgrille, const Tbl& r_limits, const Itbl& typevar) ;
3644 
3645 
3646  Map_log (const Map_log& ) ;
3647  Map_log (const Mg3d&, FILE* ) ;
3648 
3649  virtual ~Map_log() ;
3650 
3654  virtual const Map_af& mp_angu(int) const ;
3655 
3657  double get_alpha (int l) const {return alpha(l) ;} ;
3659  double get_beta (int l) const {return beta(l) ;} ;
3661  int get_type (int l) const {return type_var(l) ;} ;
3662 
3670  void sol_elliptic (Param_elliptic& params,
3671  const Scalar& so, Scalar& uu) const ;
3672 
3673 
3685  void sol_elliptic_boundary (Param_elliptic& params,
3686  const Scalar& so, Scalar& uu, const Mtbl_cf& bound,
3687  double fact_dir, double fact_neu ) const ;
3688 
3692  void sol_elliptic_boundary (Param_elliptic& params,
3693  const Scalar& so, Scalar& uu, const Scalar& bound,
3694  double fact_dir, double fact_neu ) const ;
3695 
3696 
3706  void sol_elliptic_no_zec (Param_elliptic& params,
3707  const Scalar& so, Scalar& uu, double) const ;
3708 
3709 
3710  virtual void sauve(FILE*) const ;
3711 
3713  virtual void operator=(const Map_af& mpa) ;
3714 
3715 
3716  virtual ostream& operator>> (ostream&) const ;
3717 
3727  virtual double val_r (int l, double xi, double theta, double pphi) const ;
3728 
3738  virtual void val_lx (double rr, double theta, double pphi, int& l, double& xi) const ;
3739 
3749  virtual void val_lx (double rr, double theta, double pphi, const Param& par, int& l, double& xi) const ;
3750 
3751 
3752  virtual bool operator== (const Map&) const ;
3753 
3763  virtual double val_r_jk (int l, double xi, int j, int k) const ;
3764 
3774  virtual void val_lx_jk (double rr, int j, int k, const Param& par, int& l, double& xi) const ;
3775 
3782  virtual void dsdr (const Scalar& ci, Scalar& resu) const ;
3783 
3790  virtual void dsdxi (const Scalar& ci, Scalar& resu) const ;
3791 
3800  virtual void dsdradial (const Scalar& uu, Scalar& resu) const ;
3801 
3802  virtual void homothetie (double) ;
3803  virtual void resize (int, double) ;
3804  virtual void adapt (const Cmp&, const Param&, int) ;
3805  virtual void dsdr (const Cmp&, Cmp&) const ;
3806  virtual void dsdxi (const Cmp&, Cmp&) const ;
3807  virtual void srdsdt (const Cmp&, Cmp&) const ;
3808  virtual void srstdsdp (const Cmp&, Cmp&) const ;
3809  virtual void srstdsdp (const Scalar&, Scalar&) const ;
3810  virtual void srdsdt (const Scalar&, Scalar&) const ;
3811  virtual void dsdt (const Scalar&, Scalar&) const ;
3812  virtual void stdsdp (const Scalar&, Scalar&) const ;
3813  virtual void laplacien (const Scalar&, int, Scalar&) const ;
3814  virtual void laplacien (const Cmp&, int, Cmp&) const ;
3815  virtual void lapang (const Scalar&, Scalar&) const ;
3816  virtual void primr(const Scalar&, Scalar&, bool) const ;
3817  virtual Tbl* integrale (const Cmp&) const ;
3818  virtual void poisson (const Cmp&, Param&, Cmp&) const ;
3819  virtual void poisson_tau (const Cmp&, Param&, Cmp&) const ;
3820  virtual void poisson_falloff(const Cmp&, Param&, Cmp&, int) const ;
3821  virtual void poisson_ylm(const Cmp&, Param&, Cmp&, int, double*) const ;
3822  virtual void poisson_regular (const Cmp&, int, int, double, Param&, Cmp&, Cmp&, Cmp&,
3823  Tenseur&, Cmp&, Cmp&) const ;
3824  virtual void poisson_angu (const Scalar&, Param&, Scalar&, double=0) const ;
3825  virtual void poisson_angu (const Cmp&, Param&, Cmp&, double=0) const ;
3826  virtual Param* donne_para_poisson_vect (Param&, int) const ;
3827  virtual void poisson_frontiere (const Cmp&, const Valeur&, int, int, Cmp&, double = 0., double = 0.) const ;
3828  virtual void poisson_frontiere_double (const Cmp&, const Valeur&, const Valeur&, int, Cmp&) const ;
3829  virtual void poisson_interne (const Cmp&, const Valeur&, Param&, Cmp&) const ;
3830  virtual void poisson2d (const Cmp&, const Cmp&, Param&, Cmp&) const ;
3831  virtual void dalembert (Param&, Scalar&, const Scalar&, const Scalar&, const Scalar&) const ;
3832 
3833 
3834  // Building functions for the Coord's
3835  // ----------------------------------
3836  friend Mtbl* map_log_fait_r(const Map* ) ;
3837  friend Mtbl* map_log_fait_tet(const Map* ) ;
3838  friend Mtbl* map_log_fait_phi(const Map* ) ;
3839  friend Mtbl* map_log_fait_sint(const Map* ) ;
3840  friend Mtbl* map_log_fait_cost(const Map* ) ;
3841  friend Mtbl* map_log_fait_sinp(const Map* ) ;
3842  friend Mtbl* map_log_fait_cosp(const Map* ) ;
3843 
3844  friend Mtbl* map_log_fait_x(const Map* ) ;
3845  friend Mtbl* map_log_fait_y(const Map* ) ;
3846  friend Mtbl* map_log_fait_z(const Map* ) ;
3847 
3848  friend Mtbl* map_log_fait_xa(const Map* ) ;
3849  friend Mtbl* map_log_fait_ya(const Map* ) ;
3850  friend Mtbl* map_log_fait_za(const Map* ) ;
3851 
3852  friend Mtbl* map_log_fait_xsr(const Map* ) ;
3853  friend Mtbl* map_log_fait_dxdr(const Map* ) ;
3854  friend Mtbl* map_log_fait_drdt(const Map* ) ;
3855  friend Mtbl* map_log_fait_stdrdp(const Map* ) ;
3856  friend Mtbl* map_log_fait_srdrdt(const Map* ) ;
3857  friend Mtbl* map_log_fait_srstdrdp(const Map* ) ;
3858  friend Mtbl* map_log_fait_sr2drdt(const Map* ) ;
3859  friend Mtbl* map_log_fait_sr2stdrdp(const Map* ) ;
3860  friend Mtbl* map_log_fait_d2rdx2(const Map* ) ;
3861  friend Mtbl* map_log_fait_lapr_tp(const Map* ) ;
3862  friend Mtbl* map_log_fait_d2rdtdx(const Map* ) ;
3863  friend Mtbl* map_log_fait_sstd2rdpdx(const Map* ) ;
3864  friend Mtbl* map_log_fait_sr2d2rdt2(const Map* ) ;
3865  friend Mtbl* map_log_fait_dxdlnr(const Map* ) ;
3866 
3867 };
3868 
3869 Mtbl* map_log_fait_r(const Map* ) ;
3870 Mtbl* map_log_fait_tet(const Map* ) ;
3871 Mtbl* map_log_fait_phi(const Map* ) ;
3872 Mtbl* map_log_fait_sint(const Map* ) ;
3873 Mtbl* map_log_fait_cost(const Map* ) ;
3874 Mtbl* map_log_fait_sinp(const Map* ) ;
3875 Mtbl* map_log_fait_cosp(const Map* ) ;
3876 
3877 Mtbl* map_log_fait_x(const Map* ) ;
3878 Mtbl* map_log_fait_y(const Map* ) ;
3879 Mtbl* map_log_fait_z(const Map* ) ;
3880 
3881 Mtbl* map_log_fait_xa(const Map* ) ;
3882 Mtbl* map_log_fait_ya(const Map* ) ;
3883 Mtbl* map_log_fait_za(const Map* ) ;
3884 
3885 Mtbl* map_log_fait_xsr(const Map* ) ;
3886 Mtbl* map_log_fait_dxdr(const Map* ) ;
3887 Mtbl* map_log_fait_drdt(const Map* ) ;
3888 Mtbl* map_log_fait_stdrdp(const Map* ) ;
3889 Mtbl* map_log_fait_srdrdt(const Map* ) ;
3890 Mtbl* map_log_fait_srstdrdp(const Map* ) ;
3891 Mtbl* map_log_fait_sr2drdt(const Map* ) ;
3892 Mtbl* map_log_fait_sr2stdrdp(const Map* ) ;
3893 Mtbl* map_log_fait_d2rdx2(const Map* ) ;
3894 Mtbl* map_log_fait_lapr_tp(const Map* ) ;
3895 Mtbl* map_log_fait_d2rdtdx(const Map* ) ;
3896 Mtbl* map_log_fait_sstd2rdpdx(const Map* ) ;
3897 Mtbl* map_log_fait_sr2d2rdt2(const Map* ) ;
3898 
3899 Mtbl* map_log_fait_dxdlnr (const Map*) ;
3900 
3901  //------------------------------------//
3902  // class Map_star //
3903  //------------------------------------//
3904 
3905 /*
3906  * Affine and starlike radial mapping to describe 3D star. \ingroup (map)
3907  *
3908  * The affine radial mapping is the simplest one between the grid coordinates
3909  * \f$(\xi, \theta', \phi')\f$ and the physical coordinates \f$(r, \theta, \phi)\f$. It comprises a single domain (nucleus, shells to be added in the future)
3910  * It is defined by \f$\theta=\theta'\f$, \f$\phi=\phi'\f$ and
3911  * \li \f$r=\alpha \xi + \beta\f$, in non-compactified domains,
3912  * where \f$\alpha\f$ and \f$\beta\f$ depend upon the angular direction.
3913  *
3914  *
3915  */
3916 
3917 class Map_star : public Map_radial{
3918 
3919 
3920  // Data :
3921  // ----
3922  private:
3925  Valeur beta ;
3926 
3927 
3928  // Constructors, destructor :
3929  // ------------------------
3930  public:
3940  Map_star(const Mg3d& mgrille, const double* r_limits) ;
3950  Map_star(const Mg3d& mgrille, const Tbl& r_limits) ;
3951 
3952  Map_star(const Map_star& ) ;
3953  Map_star(const Mg3d&, const string&) ;
3954  Map_star(const Mg3d&, FILE* ) ;
3955 
3956 
3957  virtual ~Map_star() ;
3958 
3962  virtual const Map_af& mp_angu(int) const ;
3963 
3964  // Assignment
3965  // ----------
3966  public:
3968  virtual void operator=(const Map_af& ) ;
3970  virtual void operator=(const Map_star& ) ;
3971 
3972  // Memory management
3973  // -----------------
3974  private:
3976  void set_coord() ;
3977  //protected:
3978  //virtual void reset_coord() ; ///< Resets all the member \c Coords
3979 
3980  // Extraction of information
3981  // -------------------------
3982  public:
3984  const Valeur& get_alpha() const ;
3985  const Valeur& get_beta() const ;
3986 
3987 
3989  void set_alpha(const Tbl& alpha0, int l) ;
3990  void set_beta(const Tbl& beta0, int l) ;
3991 
3992  void set_alpha(const Valeur& alpha0) ;
3993  void set_beta(const Valeur& beta0) ;
3994 
4004  virtual double val_r(int l, double xi, double theta, double pphi) const ;
4005 
4015  virtual void val_lx(double rr, double theta, double pphi,
4016  int& l, double& xi) const ;
4017 
4027  virtual void val_lx(double rr, double theta, double pphi,
4028  const Param& par, int& l, double& xi) const ;
4029 
4039  virtual double val_r_jk(int l, double xi, int j, int k) const ;
4040 
4050  virtual void val_lx_jk(double rr, int j, int k, const Param& par,
4051  int& l, double& xi) const ;
4052 
4054  virtual bool operator==(const Map& ) const ;
4055 
4062  virtual void dsdr (const Scalar& ci, Scalar& resu) const ;
4063 
4071  virtual void srstdsdp (const Scalar&, Scalar&) const ;
4072 
4080  virtual void srdsdt (const Scalar&, Scalar&) const ;
4081 
4086  virtual void dsdt (const Scalar&, Scalar&) const ;
4087 
4088 
4093  virtual void stdsdp (const Scalar&, Scalar&) const ;
4094 
4095  // Outputs
4096  // -------
4097  public:
4098  virtual void sauve(FILE* ) const ;
4099 
4100  private:
4101  virtual ostream& operator>>(ostream &) const ;
4102 
4103  virtual void homothetie (double) ;
4104  virtual void resize (int, double) ;
4105  virtual void adapt (const Cmp&, const Param&, int) ;
4106  virtual void dsdr (const Cmp&, Cmp&) const ;
4107  virtual void dsdxi (const Cmp&, Cmp&) const ;
4108  virtual void dsdxi (const Scalar&, Scalar&) const ;
4109  virtual void dsdradial (const Scalar& uu, Scalar& resu) const ;
4110  virtual void srdsdt (const Cmp&, Cmp&) const ;
4111  virtual void srstdsdp (const Cmp&, Cmp&) const ;
4112  virtual void laplacien (const Scalar&, int, Scalar&) const ;
4113  virtual void laplacien (const Cmp&, int, Cmp&) const ;
4114  virtual void lapang (const Scalar&, Scalar&) const ;
4115  virtual void primr(const Scalar&, Scalar&, bool) const ;
4116  virtual Tbl* integrale (const Cmp&) const ;
4117  virtual void poisson (const Cmp&, Param&, Cmp&) const ;
4118  virtual void poisson_tau (const Cmp&, Param&, Cmp&) const ;
4119  virtual void poisson_falloff(const Cmp&, Param&, Cmp&, int) const ;
4120  virtual void poisson_ylm(const Cmp&, Param&, Cmp&, int, double*) const ;
4121  virtual void poisson_regular (const Cmp&, int, int, double, Param&, Cmp&, Cmp&, Cmp&,
4122  Tenseur&, Cmp&, Cmp&) const ;
4123  virtual void poisson_angu (const Scalar&, Param&, Scalar&, double=0) const ;
4124  virtual void poisson_angu (const Cmp&, Param&, Cmp&, double=0) const ;
4125  virtual Param* donne_para_poisson_vect (Param&, int) const ;
4126  virtual void poisson_frontiere (const Cmp&, const Valeur&, int, int, Cmp&, double = 0., double = 0.) const ;
4127  virtual void poisson_frontiere_double (const Cmp&, const Valeur&, const Valeur&, int, Cmp&) const ;
4128  virtual void poisson_interne (const Cmp&, const Valeur&, Param&, Cmp&) const ;
4129  virtual void poisson2d (const Cmp&, const Cmp&, Param&, Cmp&) const ;
4130  virtual void dalembert (Param&, Scalar&, const Scalar&, const Scalar&, const Scalar&) const ;
4131  // Building functions for the Coord's
4132  // ----------------------------------
4133  friend Mtbl* map_star_fait_r(const Map* ) ;
4134  friend Mtbl* map_star_fait_tet(const Map* ) ;
4135  friend Mtbl* map_star_fait_phi(const Map* ) ;
4136  friend Mtbl* map_star_fait_sint(const Map* ) ;
4137  friend Mtbl* map_star_fait_cost(const Map* ) ;
4138  friend Mtbl* map_star_fait_sinp(const Map* ) ;
4139  friend Mtbl* map_star_fait_cosp(const Map* ) ;
4140 
4141  friend Mtbl* map_star_fait_x(const Map* ) ;
4142  friend Mtbl* map_star_fait_y(const Map* ) ;
4143  friend Mtbl* map_star_fait_z(const Map* ) ;
4144 
4145  friend Mtbl* map_star_fait_xa(const Map* ) ;
4146  friend Mtbl* map_star_fait_ya(const Map* ) ;
4147  friend Mtbl* map_star_fait_za(const Map* ) ;
4148 
4149  friend Mtbl* map_star_fait_xsr(const Map* ) ;
4150  friend Mtbl* map_star_fait_dxdr(const Map* ) ;
4151  friend Mtbl* map_star_fait_drdt(const Map* ) ;
4152  friend Mtbl* map_star_fait_stdrdp(const Map* ) ;
4153  friend Mtbl* map_star_fait_srdrdt(const Map* ) ;
4154  friend Mtbl* map_star_fait_srstdrdp(const Map* ) ;
4155  friend Mtbl* map_star_fait_sr2drdt(const Map* ) ;
4156  friend Mtbl* map_star_fait_sr2stdrdp(const Map* ) ;
4157  friend Mtbl* map_star_fait_d2rdx2(const Map* ) ;
4158  friend Mtbl* map_star_fait_lapr_tp(const Map* ) ;
4159  friend Mtbl* map_star_fait_d2rdtdx(const Map* ) ;
4160  friend Mtbl* map_star_fait_sstd2rdpdx(const Map* ) ;
4161  friend Mtbl* map_star_fait_sr2d2rdt2(const Map* ) ;
4162 };
4163  Mtbl* map_star_fait_r(const Map* ) ;
4164  Mtbl* map_star_fait_tet(const Map* ) ;
4165  Mtbl* map_star_fait_phi(const Map* ) ;
4166  Mtbl* map_star_fait_sint(const Map* ) ;
4167  Mtbl* map_star_fait_cost(const Map* ) ;
4168  Mtbl* map_star_fait_sinp(const Map* ) ;
4169  Mtbl* map_star_fait_cosp(const Map* ) ;
4170 
4171  Mtbl* map_star_fait_x(const Map* ) ;
4172  Mtbl* map_star_fait_y(const Map* ) ;
4173  Mtbl* map_star_fait_z(const Map* ) ;
4174 
4175  Mtbl* map_star_fait_xa(const Map* ) ;
4176  Mtbl* map_star_fait_ya(const Map* ) ;
4177  Mtbl* map_star_fait_za(const Map* ) ;
4178 
4179  Mtbl* map_star_fait_xsr(const Map* ) ;
4180  Mtbl* map_star_fait_dxdr(const Map* ) ;
4181  Mtbl* map_star_fait_drdt(const Map* ) ;
4182  Mtbl* map_star_fait_stdrdp(const Map* ) ;
4183  Mtbl* map_star_fait_srdrdt(const Map* ) ;
4184  Mtbl* map_star_fait_srstdrdp(const Map* ) ;
4185  Mtbl* map_star_fait_sr2drdt(const Map* ) ;
4186  Mtbl* map_star_fait_sr2stdrdp(const Map* ) ;
4187  Mtbl* map_star_fait_d2rdx2(const Map* ) ;
4188  Mtbl* map_star_fait_lapr_tp(const Map* ) ;
4189  Mtbl* map_star_fait_d2rdtdx(const Map* ) ;
4190  Mtbl* map_star_fait_sstd2rdpdx(const Map* ) ;
4191  Mtbl* map_star_fait_sr2d2rdt2(const Map* ) ;
4192 
4193 
4194  //------------------------------------//
4195  // class Map_eps //
4196  //------------------------------------//
4197 
4198 /*
4199  * Affine and starlike radial mapping to describe 3D star. \ingroup (map)
4200  *
4201  * The affine radial mapping is the simplest one between the grid coordinates
4202  * \f$(\xi, \theta', \phi')\f$ and the physical coordinates \f$(r, \theta, \phi)\f$. It comprises a single domain (nucleus, shells to be added in the future)
4203  * It is defined by \f$\theta=\theta'\f$, \f$\phi=\phi'\f$ and
4204  * \li \f$r=\alpha \xi + \beta\f$, in non-compactified domains,
4205  * where \f$\alpha\f$ and \f$\beta\f$ depend upon the angular direction.
4206  *
4207  *
4208  */
4209 
4210 class Map_eps : public Map_radial{
4211 
4212 
4213  // Data :
4214  // ----
4215  private:
4217  double aa, bb, cc ;
4218  Valeur alpha ;
4219  Valeur beta ;
4220 
4221 
4222  // Constructors, destructor :
4223  // ------------------------
4224  public:
4234  Map_eps(const Mg3d& mgrille, const double* r_limits) ;
4244  Map_eps(const Mg3d& mgrille, double a, double b, double c) ;
4245 
4246  Map_eps(const Map_eps& ) ;
4247  Map_eps(const Mg3d&, const string&) ;
4248  Map_eps(const Mg3d&, FILE* ) ;
4249 
4250 
4251  virtual ~Map_eps() ;
4252 
4256  virtual const Map_af& mp_angu(int) const ;
4257 
4258  // Assignment
4259  // ----------
4260  public:
4262  virtual void operator=(const Map_af& ) ;
4264  virtual void operator=(const Map_eps& ) ;
4265 
4266  // Memory management
4267  // -----------------
4268  private:
4270  void set_coord() ;
4271  //protected:
4272  //virtual void reset_coord() ; ///< Resets all the member \c Coords
4273 
4274  // Extraction of information
4275  // -------------------------
4276  public:
4278  const Valeur& get_alpha() const ;
4279  const Valeur& get_beta() const ;
4280  double get_aa() const { return aa;} ;
4281  double get_bb() const { return bb;} ;
4282  double get_cc() const { return cc;} ;
4283 
4284 
4286  void set_alpha(const Tbl& alpha0, int l) ;
4287  void set_beta(const Tbl& beta0, int l) ;
4288 
4289  void set_alpha(const Valeur& alpha0) ;
4290  void set_beta(const Valeur& beta0) ;
4291 
4301  virtual double val_r(int l, double xi, double theta, double pphi) const ;
4302 
4312  virtual void val_lx(double rr, double theta, double pphi,
4313  int& l, double& xi) const ;
4314 
4324  virtual void val_lx(double rr, double theta, double pphi,
4325  const Param& par, int& l, double& xi) const ;
4326 
4336  virtual double val_r_jk(int l, double xi, int j, int k) const ;
4337 
4347  virtual void val_lx_jk(double rr, int j, int k, const Param& par,
4348  int& l, double& xi) const ;
4349 
4351  virtual bool operator==(const Map& ) const ;
4352 
4359  virtual void dsdr (const Scalar& ci, Scalar& resu) const ;
4360 
4368  virtual void srstdsdp (const Scalar&, Scalar&) const ;
4369 
4377  virtual void srdsdt (const Scalar&, Scalar&) const ;
4378 
4383  virtual void dsdt (const Scalar&, Scalar&) const ;
4384 
4385 
4390  virtual void stdsdp (const Scalar&, Scalar&) const ;
4391 
4392  // Outputs
4393  // -------
4394  public:
4395  virtual void sauve(FILE* ) const ;
4396 
4397  private:
4398  virtual ostream& operator>>(ostream &) const ;
4399 
4400  virtual void homothetie (double) ;
4401  virtual void resize (int, double) ;
4402  virtual void adapt (const Cmp&, const Param&, int) ;
4403  virtual void dsdr (const Cmp&, Cmp&) const ;
4404  virtual void dsdxi (const Cmp&, Cmp&) const ;
4405  virtual void dsdxi (const Scalar&, Scalar&) const ;
4406  virtual void dsdradial (const Scalar& uu, Scalar& resu) const ;
4407  virtual void srdsdt (const Cmp&, Cmp&) const ;
4408  virtual void srstdsdp (const Cmp&, Cmp&) const ;
4409  virtual void laplacien (const Scalar&, int, Scalar&) const ;
4410  virtual void laplacien (const Cmp&, int, Cmp&) const ;
4411  virtual void lapang (const Scalar&, Scalar&) const ;
4412  virtual void primr(const Scalar&, Scalar&, bool) const ;
4413  virtual Tbl* integrale (const Cmp&) const ;
4414  virtual void poisson (const Cmp&, Param&, Cmp&) const ;
4415  virtual void poisson_tau (const Cmp&, Param&, Cmp&) const ;
4416  virtual void poisson_falloff(const Cmp&, Param&, Cmp&, int) const ;
4417  virtual void poisson_ylm(const Cmp&, Param&, Cmp&, int, double*) const ;
4418  virtual void poisson_regular (const Cmp&, int, int, double, Param&, Cmp&, Cmp&, Cmp&,
4419  Tenseur&, Cmp&, Cmp&) const ;
4420  virtual void poisson_angu (const Scalar&, Param&, Scalar&, double=0) const ;
4421  virtual void poisson_angu (const Cmp&, Param&, Cmp&, double=0) const ;
4422  virtual Param* donne_para_poisson_vect (Param&, int) const ;
4423  virtual void poisson_frontiere (const Cmp&, const Valeur&, int, int, Cmp&, double = 0., double = 0.) const ;
4424  virtual void poisson_frontiere_double (const Cmp&, const Valeur&, const Valeur&, int, Cmp&) const ;
4425  virtual void poisson_interne (const Cmp&, const Valeur&, Param&, Cmp&) const ;
4426  virtual void poisson2d (const Cmp&, const Cmp&, Param&, Cmp&) const ;
4427  virtual void dalembert (Param&, Scalar&, const Scalar&, const Scalar&, const Scalar&) const ;
4428  // Building functions for the Coord's
4429  // ----------------------------------
4430  friend Mtbl* map_eps_fait_r(const Map* ) ;
4431  friend Mtbl* map_eps_fait_tet(const Map* ) ;
4432  friend Mtbl* map_eps_fait_phi(const Map* ) ;
4433  friend Mtbl* map_eps_fait_sint(const Map* ) ;
4434  friend Mtbl* map_eps_fait_cost(const Map* ) ;
4435  friend Mtbl* map_eps_fait_sinp(const Map* ) ;
4436  friend Mtbl* map_eps_fait_cosp(const Map* ) ;
4437 
4438  friend Mtbl* map_eps_fait_x(const Map* ) ;
4439  friend Mtbl* map_eps_fait_y(const Map* ) ;
4440  friend Mtbl* map_eps_fait_z(const Map* ) ;
4441 
4442  friend Mtbl* map_eps_fait_xa(const Map* ) ;
4443  friend Mtbl* map_eps_fait_ya(const Map* ) ;
4444  friend Mtbl* map_eps_fait_za(const Map* ) ;
4445 
4446  friend Mtbl* map_eps_fait_xsr(const Map* ) ;
4447  friend Mtbl* map_eps_fait_dxdr(const Map* ) ;
4448  friend Mtbl* map_eps_fait_drdt(const Map* ) ;
4449  friend Mtbl* map_eps_fait_stdrdp(const Map* ) ;
4450  friend Mtbl* map_eps_fait_srdrdt(const Map* ) ;
4451  friend Mtbl* map_eps_fait_srstdrdp(const Map* ) ;
4452  friend Mtbl* map_eps_fait_sr2drdt(const Map* ) ;
4453  friend Mtbl* map_eps_fait_sr2stdrdp(const Map* ) ;
4454  friend Mtbl* map_eps_fait_d2rdx2(const Map* ) ;
4455  friend Mtbl* map_eps_fait_lapr_tp(const Map* ) ;
4456  friend Mtbl* map_eps_fait_d2rdtdx(const Map* ) ;
4457  friend Mtbl* map_eps_fait_sstd2rdpdx(const Map* ) ;
4458  friend Mtbl* map_eps_fait_sr2d2rdt2(const Map* ) ;
4459 };
4460  Mtbl* map_eps_fait_r(const Map* ) ;
4461  Mtbl* map_eps_fait_tet(const Map* ) ;
4462  Mtbl* map_eps_fait_phi(const Map* ) ;
4463  Mtbl* map_eps_fait_sint(const Map* ) ;
4464  Mtbl* map_eps_fait_cost(const Map* ) ;
4465  Mtbl* map_eps_fait_sinp(const Map* ) ;
4466  Mtbl* map_eps_fait_cosp(const Map* ) ;
4467 
4468  Mtbl* map_eps_fait_x(const Map* ) ;
4469  Mtbl* map_eps_fait_y(const Map* ) ;
4470  Mtbl* map_eps_fait_z(const Map* ) ;
4471 
4472  Mtbl* map_eps_fait_xa(const Map* ) ;
4473  Mtbl* map_eps_fait_ya(const Map* ) ;
4474  Mtbl* map_eps_fait_za(const Map* ) ;
4475 
4476  Mtbl* map_eps_fait_xsr(const Map* ) ;
4477  Mtbl* map_eps_fait_dxdr(const Map* ) ;
4478  Mtbl* map_eps_fait_drdt(const Map* ) ;
4479  Mtbl* map_eps_fait_stdrdp(const Map* ) ;
4480  Mtbl* map_eps_fait_srdrdt(const Map* ) ;
4481  Mtbl* map_eps_fait_srstdrdp(const Map* ) ;
4482  Mtbl* map_eps_fait_sr2drdt(const Map* ) ;
4483  Mtbl* map_eps_fait_sr2stdrdp(const Map* ) ;
4484  Mtbl* map_eps_fait_d2rdx2(const Map* ) ;
4485  Mtbl* map_eps_fait_lapr_tp(const Map* ) ;
4486  Mtbl* map_eps_fait_d2rdtdx(const Map* ) ;
4487  Mtbl* map_eps_fait_sstd2rdpdx(const Map* ) ;
4488  Mtbl* map_eps_fait_sr2d2rdt2(const Map* ) ;
4489 }
4490 #endif
virtual ostream & operator>>(ostream &) const
Operator >>
Definition: map_eps.C:267
Coord xa
Absolute x coordinate.
Definition: map.h:742
virtual void dsdradial(const Scalar &uu, Scalar &resu) const
< Not implemented
virtual double val_r(int l, double xi, double theta, double pphi) const
Returns the value of the radial coordinate r for a given in a given domain.
void set_coord()
Assignment of the building functions to the member Coords.
Definition: map_af.C:530
virtual void sauve(FILE *) const
Save in a file.
Definition: map_af.C:616
Tbl beta
Array (size: mg->nzone ) of the values of in each domain.
Definition: map.h:3611
virtual Param * donne_para_poisson_vect(Param &, int) const
< Not implemented
virtual bool operator==(const Map &) const
Comparison operator (egality)
Definition: map_log.C:175
Coord d2rdx2
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1634
virtual const Map_af & mp_angu(int) const
Returns the "angular" mapping for the outside of domain l_zone.
virtual void val_lx_jk(double rr, int j, int k, const Param &par, int &l, double &xi) const
Computes the domain index l and the value of corresponding to a point of arbitrary r but collocation...
Tbl ** bb
Array (size: mg->nzone ) of Tbl which stores the values of in each domain.
Definition: map.h:2814
Coord sr2d2rdt2
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1672
Coord sr2stdrdp
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1623
friend Mtbl * map_eps_fait_r(const Map *)
< Not implemented
Definition: map_eps_fait.C:43
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Definition: cmp.h:446
virtual void stdsdp(const Scalar &, Scalar &) const
< Not implemented
Tbl zaasx
Values at the nr collocation points of in the outermost compactified domain.
Definition: map.h:2804
virtual void srstdsdp(const Cmp &ci, Cmp &resu) const
Computes of a Cmp.
Definition: map_af_deriv.C:636
const double * get_alpha() const
Returns the pointer on the array alpha.
Definition: map_af.C:604
virtual void primr(const Scalar &uu, Scalar &resu, bool null_infty) const
Computes the radial primitive which vanishes for .
Definition: map_af_primr.C:86
void fait_poly()
Construction of the polynomials and .
Definition: map_et.C:668
double integrale_surface(const Cmp &ci, double rayon) const
Performs the surface integration of ci on the sphere of radius rayon .
void set_gg(const Valeur &)
Assigns a given value to the function .
Definition: map_et.C:593
Radial mapping of rather general form.
Definition: map.h:2770
virtual const Map_af & mp_angu(int) const =0
Returns the "angular" mapping for the outside of domain l_zone.
virtual void primr(const Scalar &uu, Scalar &resu, bool null_infty) const
Computes the radial primitive which vanishes for .
Definition: map_et_integ.C:113
const double * get_alpha() const
Returns a pointer on the array alpha (values of in each domain)
Definition: map_et.C:1049
virtual void mult_sint(Scalar &) const =0
Multiplication by of a Scalar.
virtual void sauve(FILE *) const
Save in a file.
Definition: map.C:227
virtual void mult_cost(Scalar &) const
Multiplication by of a Scalar.
const Cmp & cmp_zero() const
Returns the null Cmp defined on *this.
Definition: map.h:819
const double * get_beta() const
Returns a pointer on the array beta (values of in each domain)
Definition: map_et.C:1053
virtual bool operator==(const Map &) const
Comparison operator (egality)
Definition: map_star.C:201
virtual void dsdt(const Scalar &uu, Scalar &resu) const
Computes of a Scalar.
Definition: map_et_deriv.C:632
virtual void poisson_tau(const Cmp &, Param &, Cmp &) const
< Not implemented
virtual void dsdxi(const Cmp &ci, Cmp &resu) const =0
Computes of a Cmp .
virtual void val_lx(double rr, double theta, double pphi, int &l, double &xi) const
Computes the domain index l and the value of corresponding to a point given by its physical coordina...
void set_rot_phi(double phi0)
Sets a new rotation angle.
Definition: map.C:266
virtual const Map_af & mp_angu(int) const
Returns the "angular" mapping for the outside of domain l_zone.
virtual ostream & operator>>(ostream &) const =0
Operator >>
double integrale_surface_infini(const Cmp &ci) const
Performs the surface integration of ci at infinity.
virtual void homothetie(double lambda)
Sets a new radial scale.
Definition: map_af.C:664
Multi-domain array.
Definition: mtbl.h:118
double * alpha
Array (size: mg->nzone ) of the values of in each domain.
Definition: map.h:2048
virtual void div_tant(Scalar &) const
Division by of a Scalar.
double get_ori_y() const
Returns the y coordinate of the origin.
Definition: map.h:782
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:795
double * alpha
Array (size: mg->nzone ) of the values of in each domain.
Definition: map.h:2776
virtual void dsdt(const Scalar &uu, Scalar &resu) const =0
Computes of a Scalar .
virtual void poisson2d(const Cmp &source_mat, const Cmp &source_quad, Param &par, Cmp &uu) const
Computes the solution of a 2-D Poisson equation.
virtual void val_lx_jk(double rr, int j, int k, const Param &par, int &l, double &xi) const
Computes the domain index l and the value of corresponding to a point of arbitrary r but collocation...
double get_alpha(int l) const
Returns in the domain l.
Definition: map.h:3657
Lorene prototypes.
Definition: app_hor.h:67
virtual void resize(int, double)
< Not implemented
virtual void dsdradial(const Scalar &, Scalar &) const
Computes of a Scalar.
Definition: map_af_deriv.C:420
void sol_elliptic_only_zec(Param_elliptic &params, const Scalar &so, Scalar &uu, double val) const
General elliptic solver.
Cmp * p_cmp_zero
The null Cmp.
Definition: map.h:725
virtual void srdsdt(const Cmp &ci, Cmp &resu) const
Computes of a Cmp.
Definition: map_af_deriv.C:478
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:777
virtual double val_r(int l, double xi, double theta, double pphi) const
Returns the value of the radial coordinate r for a given in a given domain.
Definition: map_et_radius.C:95
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:1615
int get_type(int l) const
Returns the type of description in the domain l.
Definition: map.h:3661
virtual void poisson(const Cmp &, Param &, Cmp &) const
< Not implemented
Tbl bbsx
Values at the nr collocation points of in the nucleus.
Definition: map.h:2827
Tensor field of valence 0 (or component of a tensorial field).
Definition: scalar.h:393
virtual void srstdsdp(const Cmp &ci, Cmp &resu) const
Computes of a Cmp.
Definition: map_et_deriv.C:488
virtual Param * donne_para_poisson_vect(Param &, int) const
< Not implemented
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:682
double get_ori_x() const
Returns the x coordinate of the origin.
Definition: map.h:780
const Valeur & get_gg() const
Returns a (constant) reference to the function .
Definition: map_et.C:1061
void sol_elliptic_2d(Param_elliptic &, const Scalar &, Scalar &) const
General elliptic solver in a 2D case.
virtual void homothetie(double)
Sets a new radial scale.
virtual void poisson_frontiere_double(const Cmp &source, const Valeur &lim_func, const Valeur &lim_der, int num_zone, Cmp &pot) const
Solver of the Poisson equation with boundary condition for the affine mapping case, cases with boundary conditions of both Dirichlet and Neumann type (no condition imposed at infinity).
virtual void div_tant(Scalar &) const =0
Division by of a Scalar.
virtual void dec_dzpuis(Scalar &) const
Decreases by 1 the value of dzpuis of a Scalar and changes accordingly its values in the compactified...
virtual Tbl * integrale(const Cmp &) const
< Not implemented
friend Mtbl * map_star_fait_r(const Map *)
< Not implemented
Definition: map_star_fait.C:43
virtual double val_r(int l, double xi, double theta, double pphi) const
Returns the value of the radial coordinate r for a given in a given domain.
Definition: map_af_radius.C:99
virtual void adapt(const Cmp &ent, const Param &par, int nbr=0)=0
Adaptation of the mapping to a given scalar field.
virtual void operator=(const Map_af &)
Assignment to an affine mapping.
Definition: map_eps.C:161
virtual void comp_y_from_spherical(const Scalar &v_r, const Scalar &v_theta, const Scalar &v_phi, Scalar &v_y) const
Computes the Cartesian y component (with respect to bvect_cart ) of a vector given by its spherical c...
virtual const Map_af & mp_angu(int) const
Returns the "angular" mapping for the outside of domain l_zone.
Definition: map_af.C:783
virtual void laplacien(const Scalar &, int, Scalar &) const
< Not implemented
virtual void poisson_falloff(const Cmp &, Param &, Cmp &, int) const
< Not implemented
Basic integer array class.
Definition: itbl.h:122
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
Computes the solution of a scalar Poisson equation.
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 laplacien(const Scalar &, int, Scalar &) const
< Not implemented
virtual void dsdxi(const Cmp &ci, Cmp &resu) const
Computes of a Cmp.
Definition: map_et_deriv.C:98
virtual void inc_dzpuis(Scalar &) const =0
Increases by 1 the value of dzpuis of a Scalar and changes accordingly its values in the compactifi...
virtual void dec2_dzpuis(Scalar &) const
Decreases by 2 the value of dzpuis of a Scalar and changes accordingly its values in the compactifi...
virtual void adapt(const Cmp &, const Param &, int)
< Not implemented
virtual void poisson_regular(const Cmp &, int, int, double, Param &, Cmp &, Cmp &, Cmp &, Tenseur &, Cmp &, Cmp &) const
< Not implemented
virtual ostream & operator>>(ostream &) const
Operator >>
Definition: map_log.C:207
Values and coefficients of a (real-value) function.
Definition: valeur.h:297
virtual void inc_dzpuis(Scalar &) const
Increases by 1 the value of dzpuis of a Scalar and changes accordingly its values in the compactifi...
virtual void operator=(const Map_af &)
Assignment to another affine mapping.
Definition: map_af.C:507
void set_alpha(const Tbl &alpha0, int l)
Modifies the value of in domain no. l.
Definition: map_eps.C:314
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:727
virtual void srdsdt(const Scalar &, Scalar &) const
Computes of a Scalar.
virtual Tbl * integrale(const Cmp &) const
Computes the integral over all space of a Cmp.
Definition: map_af_integ.C:84
virtual bool operator==(const Map &) const
Comparison operator (egality)
Definition: map_af.C:566
virtual void val_lx(double rr, double theta, double pphi, int &l, double &xi) const
Computes the domain index l and the value of corresponding to a point given by its physical coordina...
double get_rot_phi() const
Returns the angle between the x –axis and X –axis.
Definition: map.h:787
virtual double val_r_jk(int l, double xi, int j, int k) const
Returns the value of the radial coordinate r for a given and a given collocation point in in a give...
virtual void lapang(const Scalar &, Scalar &) const
< Not implemented
Tbl ** ddbb
Array (size: mg->nzone ) of Tbl which stores the values of in each domain.
Definition: map.h:2824
virtual void dalembert(Param &, Scalar &, const Scalar &, const Scalar &, const Scalar &) const
< Not implemented
Itbl type_var
Array (size: mg->nzone ) of the type of variable in each domain.
Definition: map.h:3615
Map_eps(const Mg3d &mgrille, const double *r_limits)
Standard Constructor.
Definition: map_eps.C:52
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:334
Tbl ** daa
Array (size: mg->nzone ) of Tbl which stores the values of in each domain.
Definition: map.h:2788
virtual bool operator==(const Map &) const
Comparison operator (egality)
Definition: map_eps.C:207
virtual void dalembert(Param &par, Scalar &fJp1, const Scalar &fJ, const Scalar &fJm1, const Scalar &source) const
Performs one time-step integration of the d&#39;Alembert scalar equation.
Coord srstdrdp
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1607
virtual void div_r_zec(Scalar &) const =0
Division by r (in the compactified external domain only) of a Scalar.
virtual void poisson(const Cmp &, Param &, Cmp &) const
< Not implemented
virtual void poisson_frontiere(const Cmp &, const Valeur &, int, int, Cmp &, double=0., double=0.) const
< Not implemented
virtual double val_r_jk(int l, double xi, int j, int k) const
Returns the value of the radial coordinate r for a given and a given collocation point in in a give...
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:731
virtual void srstdsdp(const Cmp &, Cmp &) const
< Not implemented
virtual void stdsdp(const Scalar &uu, Scalar &resu) const
Computes of a Scalar.
Definition: map_af_deriv.C:826
virtual void dsdt(const Scalar &, Scalar &) const
< Not implemented
virtual ostream & operator>>(ostream &) const
Operator >>
Definition: map_af.C:630
void set_ori(double xa0, double ya0, double za0)
Sets a new origin.
Definition: map.C:256
virtual void stdsdp(const Scalar &uu, Scalar &resu) const
Computes of a Scalar.
Definition: map_et_deriv.C:677
Coord phi
coordinate centered on the grid
Definition: map.h:732
void set_beta(double beta0, int l)
Modifies the value of in domain no. l.
Definition: map_af.C:768
virtual void operator=(const Map_af &)
Assignment to an affine mapping.
Definition: map_star.C:155
virtual void poisson_frontiere(const Cmp &, const Valeur &, int, int, Cmp &, double=0., double=0.) const
< Not implemented
virtual void poisson_tau(const Cmp &, Param &, Cmp &) const
< Not implemented
virtual void div_r(Scalar &) const
Division by r of a Scalar.
virtual void comp_z_from_spherical(const Scalar &v_r, const Scalar &v_theta, Scalar &v_z) const
Computes the Cartesian z component (with respect to bvect_cart ) of a vector given by its spherical c...
virtual void dsdxi(const Cmp &ci, Cmp &resu) const
Computes of a Cmp.
Definition: map_af_deriv.C:139
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...
virtual Param * donne_para_poisson_vect(Param &para, int i) const
Internal function intended to be used by Map::poisson_vect and Map::poisson_vect_oohara ...
Coord sint
Definition: map.h:733
virtual void dec2_dzpuis(Scalar &) const =0
Decreases by 2 the value of dzpuis of a Scalar and changes accordingly its values in the compactifi...
virtual void comp_t_from_cartesian(const Scalar &v_x, const Scalar &v_y, const Scalar &v_z, Scalar &v_t) const
Computes the Spherical component (with respect to bvect_spher ) of a vector given by its cartesian c...
virtual void poisson(const Cmp &source, Param &par, Cmp &uu) const
Computes the solution of a scalar Poisson equation.
Coord dxdlnr
Same as dxdr if the domains where the description is affine and where it is logarithmic.
Definition: map.h:3623
virtual ~Map_af()
Destructor.
Definition: map_af.C:495
virtual void comp_r_from_cartesian(const Scalar &v_x, const Scalar &v_y, const Scalar &v_z, Scalar &v_r) const
Computes the Spherical r component (with respect to bvect_spher ) of a vector given by its cartesian ...
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 void poisson_frontiere(const Cmp &, const Valeur &, int, int, Cmp &, double=0., double=0.) const
Not yet implemented.
virtual void laplacien(const Scalar &, int, Scalar &) const
< Not implemented
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 val_lx(double rr, double theta, double pphi, int &l, double &xi) const
Computes the domain index l and the value of corresponding to a point given by its physical coordina...
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:714
Map_af(const Mg3d &mgrille, const double *r_limits)
Standard Constructor.
Definition: map_af.C:213
virtual void resize(int, double)
< Not implemented
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...
const Valeur & get_ff() const
Returns a (constant) reference to the function .
Definition: map_et.C:1057
virtual void mult_r_zec(Scalar &) const
Multiplication by r (in the compactified external domain only) of a Scalar.
virtual void sauve(FILE *) const
Save in a file.
Definition: map_et.C:802
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:2799
virtual void poisson_interne(const Cmp &, const Valeur &, Param &, Cmp &) const
< Not implemented
Valeur ff
Values of the function at the nt*np angular collocation points in each domain.
Definition: map.h:2837
Coord stdrdp
in the nucleus and in the non-compactified shells; \ in the compactified external domain (CED)...
Definition: map.h:1591
virtual void div_rsint(Scalar &) const =0
Division by of a Scalar.
virtual void poisson(const Cmp &source, Param &par, Cmp &uu) const
Computes the solution of a scalar Poisson equation.
virtual void homothetie(double lambda)=0
Sets a new radial scale.
void set_alpha(const Tbl &alpha0, int l)
Modifies the value of in domain no. l.
Definition: map_star.C:307
virtual void operator=(const Map_af &mpa)
Assignment to an affine mapping.
Definition: map_log.C:233
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
Computes the solution of a scalar Poisson equation.
virtual void adapt(const Cmp &, const Param &, int)
< Not implemented
virtual void reevaluate(const Map *mp_prev, int nzet, Cmp &uu) const
Recomputes the values of a Cmp at the collocation points after a change in the mapping.
virtual void div_cost(Scalar &) const
Division by of a Scalar.
virtual void poisson_falloff(const Cmp &, Param &, Cmp &, int) const
< Not implemented
Logarithmic radial mapping.
Definition: map.h:3603
Coord dxdr
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1575
virtual void div_rsint(Scalar &) const
Division by of a Scalar.
virtual void stdsdp(const Scalar &, Scalar &) const
Computes of a Scalar .
void sol_elliptic(Param_elliptic &params, const Scalar &so, Scalar &uu) const
General elliptic solver.
const Valeur & get_alpha() const
Returns the reference on the Tbl alpha.
Definition: map_eps.C:243
virtual Tbl * integrale(const Cmp &) const
< Not implemented
double ori_y
Absolute coordinate y of the origin.
Definition: map.h:691
const double * get_beta() const
Returns the pointer on the array beta.
Definition: map_af.C:608
virtual void poisson_frontiere(const Cmp &, const Valeur &, int, int, Cmp &, double=0., double=0.) const
Solver of the Poisson equation with boundary condition for the affine mapping case.
double ori_z
Absolute coordinate z of the origin.
Definition: map.h:692
void sol_elliptic_no_zec(Param_elliptic &params, const Scalar &so, Scalar &uu, double val) const
General elliptic solver.
virtual void mult_sint(Scalar &) const
Multiplication by of a Scalar.
virtual void laplacien(const Scalar &uu, int zec_mult_r, Scalar &lap) const
Computes the Laplacian of a scalar field.
Definition: map_et_lap.C:78
virtual void homothetie(double)
Sets a new radial scale.
Tbl alpha
Array (size: mg->nzone ) of the values of in each domain.
Definition: map.h:3609
virtual void resize(int l, double lambda)
Rescales the outer boundary of one domain.
Definition: map_et.C:951
Coord rsx2drdx
in the nucleus and the shells; \ in the outermost compactified domain.
Definition: map.h:2859
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:1551
virtual void dsdr(const Cmp &ci, Cmp &resu) const
Computes of a Cmp.
Definition: map_et_deriv.C:190
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:2050
Map_star(const Mg3d &mgrille, const double *r_limits)
Standard Constructor.
Definition: map_star.C:52
Coord sinp
Definition: map.h:735
Tbl ** aa
Array (size: mg->nzone ) of Tbl which stores the values of in each domain.
Definition: map.h:2783
void set_alpha(double alpha0, int l)
Modifies the value of in domain no. l.
Definition: map_et.C:447
virtual double val_r_jk(int l, double xi, int j, int k) const =0
Returns the value of the radial coordinate r for a given and a given collocation point in in a give...
virtual void adapt(const Cmp &, const Param &, int)
< Not implemented
virtual void homothetie(double lambda)
Sets a new radial scale.
Definition: map_et.C:928
virtual void poisson2d(const Cmp &, const Cmp &, Param &, Cmp &) const
< Not implemented
virtual void reevaluate_symy(const Map *mp_prev, int nzet, Cmp &uu) const
Recomputes the values of a Cmp at the collocation points after a change in the mapping.
Coord sstd2rdpdx
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1663
void set_coord()
Assignment of the building functions to the member Coords.
Definition: map_eps.C:171
virtual void poisson_angu(const Scalar &, Param &, Scalar &, double=0) const
< Not implemented
virtual void sauve(FILE *) const
Save in a file.
Definition: map_radial.C:119
void set_alpha(double alpha0, int l)
Modifies the value of in domain no. l.
Definition: map_af.C:757
virtual void val_lx(double rr, double theta, double pphi, int &l, double &xi) const
Computes the domain index l and the value of corresponding to a point given by its physical coordina...
virtual void poisson_interne(const Cmp &, const Valeur &, Param &, Cmp &) const
< Not implemented
virtual Tbl * integrale(const Cmp &) const
< Not implemented
virtual void poisson_ylm(const Cmp &, Param &, Cmp &, int, double *) const
< Not implemented
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:1564
Metric_flat * p_flat_met_cart
Pointer onto the flat metric associated with the Cartesian coordinates and with components expressed ...
Definition: map.h:719
virtual void poisson_interne(const Cmp &source, const Valeur &limite, Param &par, Cmp &pot) const
Computes the solution of a Poisson equation in the shell .
const Valeur & get_alpha() const
Returns the reference on the Tbl alpha.
Definition: map_star.C:237
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 .
virtual void poisson2d(const Cmp &source_mat, const Cmp &source_quad, Param &par, Cmp &uu) const
Computes the solution of a 2-D Poisson equation.
This class contains the parameters needed to call the general elliptic solver.
virtual void reset_coord()
Resets all the member Coords.
Definition: map.C:279
Coord drdt
in the nucleus and in the non-compactified shells; \ in the compactified external domain (CED)...
Definition: map.h:1583
virtual void dsdr(const Scalar &ci, Scalar &resu) const
Computes of a Scalar.
virtual void sauve(FILE *) const
Save in a file.
Definition: map_eps.C:254
virtual void poisson_compact(const Cmp &source, const Cmp &aa, const Tenseur &bb, const Param &par, Cmp &psi) const
Resolution of the elliptic equation in the case where the stellar interior is covered by a single do...
virtual void val_lx_jk(double rr, int j, int k, const Param &par, int &l, double &xi) const
Computes the domain index l and the value of corresponding to a point of arbitrary r but collocation...
virtual void lapang(const Scalar &uu, Scalar &lap) const
Computes the angular Laplacian of a scalar field.
Definition: map_af_lap.C:552
virtual void resize(int l, double lambda)=0
Rescales the outer boundary of one domain.
virtual void poisson2d(const Cmp &, const Cmp &, Param &, Cmp &) const
< Not implemented
virtual void poisson_regular(const Cmp &, int, int, double, Param &, Cmp &, Cmp &, Cmp &, Tenseur &, Cmp &, Cmp &) const
< Not implemented
Active physical coordinates and mapping derivatives.
Definition: coord.h:90
Map_log(const Mg3d &mgrille, const Tbl &r_limits, const Itbl &typevar)
Standard Constructor.
Definition: map_log.C:70
virtual void dsdxi(const Cmp &, Cmp &) const
< Not implemented
virtual ~Map_eps()
Destructor.
Definition: map_eps.C:134
void set_coord()
Assignment of the building functions to the member Coords.
Definition: map_star.C:165
void sol_elliptic_no_zec(Param_elliptic &params, const Scalar &so, Scalar &uu, double) const
General elliptic solver.
virtual void val_lx_jk(double rr, int j, int k, const Param &par, int &l, double &xi) const =0
Computes the domain index l and the value of corresponding to a point of arbitrary r but collocation...
Cartesian vectorial bases (triads).
Definition: base_vect.h:201
virtual void dsdradial(const Scalar &uu, Scalar &resu) const
Computes of a Scalar if the description is affine and if it is logarithmic.
Definition: map_et_deriv.C:277
void sol_elliptic(Param_elliptic &params, const Scalar &so, Scalar &uu) const
General elliptic solver.
virtual void primr(const Scalar &, Scalar &, bool) const
< Not implemented
Spherical orthonormal vectorial bases (triads).
Definition: base_vect.h:308
virtual void poisson_regular(const Cmp &, int, int, double, Param &, Cmp &, Cmp &, Cmp &, Tenseur &, Cmp &, Cmp &) const
< Not implemented
Coord rsxdxdr
in the nucleus; \ in the shells; \ in the outermost compactified domain.
Definition: map.h:2852
virtual void primr(const Scalar &, Scalar &, bool) const
< Not implemented
virtual void reset_coord()
Resets all the member Coords.
Definition: map_et.C:651
virtual void mult_r(Scalar &uu) const
Multiplication by r of a Scalar, the dzpuis of uu is not changed.
virtual void poisson_tau(const Cmp &source, Param &par, Cmp &uu) const
Computes the solution of a scalar Poisson equation using a Tau method.
friend Mtbl * map_log_fait_r(const Map *)
< Not implemented
Definition: map_log_fait.C:60
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 compactifi...
virtual void poisson_ylm(const Cmp &, Param &, Cmp &, int, double *) const
< Not implemented
virtual void poisson_angu(const Scalar &, Param &, Scalar &, double=0) const
< Not implemented
virtual void lapang(const Scalar &, Scalar &) const
< Not implemented
Coord ya
Absolute y coordinate.
Definition: map.h:743
virtual void poisson_angu(const Scalar &source, Param &par, Scalar &uu, double lambda=0) const
Computes the solution of the generalized angular Poisson equation.
virtual void poisson_falloff(const Cmp &, Param &, Cmp &, int) const
< Not implemented
const Mg3d * mg
Pointer on the multi-grid Mgd3 on which this is defined.
Definition: map.h:688
Multi-domain grid.
Definition: grilles.h:279
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 .
virtual void adapt(const Cmp &ent, const Param &par, int nbr_filtre=0)
Adaptation of the mapping to a given scalar field.
Definition: map_et_adapt.C:111
virtual double val_r(int l, double xi, double theta, double pphi) const
Returns the value of the radial coordinate r for a given in a given domain.
virtual void dalembert(Param &par, Scalar &fJp1, const Scalar &fJ, const Scalar &fJm1, const Scalar &source) const
Not yet implemented.
double ori_x
Absolute coordinate x of the origin.
Definition: map.h:690
virtual void srdsdt(const Scalar &, Scalar &) const
Computes of a Scalar.
Affine radial mapping.
Definition: map.h:2042
Tbl zaasx2
Values at the nr collocation points of in the outermost compactified domain.
Definition: map.h:2809
virtual void dalembert(Param &, Scalar &, const Scalar &, const Scalar &, const Scalar &) const
< Not implemented
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.
void sol_elliptic_fixe_der_zero(double val, Param_elliptic &params, const Scalar &so, Scalar &uu) const
General elliptic solver fixing the derivative at the origin and relaxing the continuity of the first ...
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:803
virtual void poisson_angu(const Scalar &source, Param &par, Scalar &uu, double lambda=0) const
Computes the solution of the generalized angular Poisson equation.
virtual void div_r_zec(Scalar &) const
Division by r (in the compactified external domain only) of a Scalar.
Map_radial(const Mg3d &mgrid)
Constructor from a grid (protected to make Map_radial an abstract class)
Definition: map_radial.C:92
virtual void poisson2d(const Cmp &, const Cmp &, Param &, Cmp &) const
< Not implemented
virtual void dsdradial(const Scalar &uu, Scalar &resu) const
< Not implemented
virtual void stdsdp(const Scalar &, Scalar &) const
Computes of a Scalar .
Definition: map_eps_deriv.C:95
Valeur gg
Values of the function at the nt*np angular collocation points in each domain.
Definition: map.h:2844
Coord y
y coordinate centered on the grid
Definition: map.h:739
virtual void val_lx_jk(double rr, int j, int k, const Param &par, int &l, double &xi) const
Computes the domain index l and the value of corresponding to a point of arbitrary r but collocation...
virtual void dsdradial(const Scalar &uu, Scalar &resu) const
Computes of a Scalar if the description is affine and if it is logarithmic.
virtual void inc2_dzpuis(Scalar &) const
Increases by 2 the value of dzpuis of a Scalar and changes accordingly its values in the compactifi...
virtual void comp_x_from_spherical(const Scalar &v_r, const Scalar &v_theta, const Scalar &v_phi, Scalar &v_x) const
Computes the Cartesian x component (with respect to bvect_cart) of a vector given by its spherical co...
virtual void operator=(const Map_af &)=0
Assignment to an affine mapping.
virtual void poisson_ylm(const Cmp &, Param &, Cmp &, int, double *) const
< Not implemented
virtual void homothetie(double)
Sets a new radial scale.
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.
virtual void poisson_frontiere_double(const Cmp &, const Valeur &, const Valeur &, int, Cmp &) const
< Not implemented
Coord za
Absolute z coordinate.
Definition: map.h:744
Coord lapr_tp
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1646
virtual const Map_af & mp_angu(int) const
Returns the "angular" mapping for the outside of domain l_zone.
Definition: map_et.C:1068
virtual ~Map_et()
Destructor.
Definition: map_et.C:509
double get_beta(int l) const
Returns in the domain l.
Definition: map.h:3659
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:736
virtual void poisson(const Cmp &source, Param &par, Cmp &uu) const =0
Computes the solution of a scalar Poisson equation.
virtual double val_r_jk(int l, double xi, int j, int k) const
Returns the value of the radial coordinate r for a given and a given collocation point in in a give...
virtual void srstdsdp(const Scalar &, Scalar &) const
Computes of a Scalar.
double * beta
Array (size: mg->nzone ) of the values of in each domain.
Definition: map.h:2778
virtual void resize(int, double)
< Not implemented
Coefficients storage for the multi-domain spectral method.
Definition: mtbl_cf.h:196
void resize_extr(double lambda)
Rescales the outer boundary of the outermost domain in the case of non-compactified external domain...
virtual void srstdsdp(const Scalar &, Scalar &) const
Computes of a Scalar.
virtual void poisson_angu(const Scalar &, Param &, Scalar &, double=0) const
< Not implemented
virtual void primr(const Scalar &, Scalar &, bool) const
< Not implemented
virtual Tbl * integrale(const Cmp &) const
Computes the integral over all space of a Cmp.
Definition: map_et_integ.C:77
virtual void poisson_interne(const Cmp &, const Valeur &, Param &, Cmp &) const
< Not implemented
virtual void dsdxi(const Scalar &ci, Scalar &resu) const
Computes of a Scalar.
Definition: map_log_deriv.C:57
virtual void operator=(const Map_et &mp)
Assignment to another Map_et.
Definition: map_et.C:536
virtual void poisson_interne(const Cmp &source, const Valeur &limite, Param &par, Cmp &pot) const
Computes the solution of a Poisson equation in the shell, imposing a boundary condition at the surfac...
virtual double val_r(int l, double xi, double theta, double pphi) const
Returns the value of the radial coordinate r for a given in a given domain.
Coord x
x coordinate centered on the grid
Definition: map.h:738
Base_vect_spher bvect_spher
Orthonormal vectorial basis associated with the coordinates of the mapping.
Definition: map.h:701
virtual void dsdr(const Scalar &ci, Scalar &resu) const
Computes of a Scalar.
Definition: map_eps_deriv.C:39
virtual void div_sint(Scalar &) const
Division by of a Scalar.
Map_et(const Mg3d &mgrille, const double *r_limits)
Standard Constructor.
Definition: map_et.C:155
double get_ori_z() const
Returns the z coordinate of the origin.
Definition: map.h:784
virtual void poisson(const Cmp &, Param &, Cmp &) const
< Not implemented
virtual void val_lx_jk(double rr, int j, int k, const Param &par, int &l, double &xi) const
Computes the domain index l and the value of corresponding to a point of arbitrary r but collocation...
virtual void srdsdt(const Cmp &ci, Cmp &resu) const
Computes of a Cmp.
Definition: map_et_deriv.C:340
virtual void reset_coord()
Resets all the member Coords.
Definition: map_radial.C:129
virtual void mult_r_zec(Scalar &) const =0
Multiplication by r (in the compactified external domain only) of a Scalar.
void sol_elliptic_pseudo_1d(Param_elliptic &, const Scalar &, Scalar &) const
General elliptic solver in a pseudo 1d case.
void sol_elliptic_boundary(Param_elliptic &params, const Scalar &so, Scalar &uu, const Mtbl_cf &bound, double fact_dir, double fact_neu) const
General elliptic solver including inner boundary conditions.
void set_ff(const Valeur &)
Assigns a given value to the function .
Definition: map_et.C:585
Basic array class.
Definition: tbl.h:164
virtual void mult_rsint(Scalar &) const
Multiplication by of a Scalar.
void set_coord()
Assignement of the building functions to the member Coords.
Definition: map_et.C:607
void homothetie_interne(double lambda)
Sets a new radial scale at the bondary between the nucleus and the first shell.
Definition: map_af.C:741
virtual void laplacien(const Scalar &uu, int zec_mult_r, Scalar &lap) const
Computes the Laplacian of a scalar field.
Definition: map_af_lap.C:182
virtual bool operator==(const Map &) const
Comparison operator (egality)
Definition: map_et.C:1007
virtual void poisson_frontiere(const Cmp &, const Valeur &, int, int, Cmp &, double=0., double=0.) const
< Not implemented
virtual void dsdradial(const Scalar &uu, Scalar &resu) const =0
Computes of a Scalar if the description is affine and if it is logarithmic.
virtual void poisson_tau(const Cmp &, Param &, Cmp &) const
< Not implemented
virtual void srdsdt(const Cmp &, Cmp &) const
< Not implemented
virtual ostream & operator>>(ostream &) const
Operator >>
Definition: map_star.C:261
Tbl bbsx2
Values at the nr collocation points of in the nucleus.
Definition: map.h:2830
Map(const Mg3d &)
Constructor from a multi-domain 3D grid.
Definition: map.C:142
void set_beta(double beta0, int l)
Modifies the value of in domain no. l.
Definition: map_et.C:458
void sol_elliptic_boundary(Param_elliptic &params, const Scalar &so, Scalar &uu, const Mtbl_cf &bound, double fact_dir, double fact_neu) const
General elliptic solver including inner boundary conditions.
virtual ostream & operator>>(ostream &) const
Operator >>
Definition: map_et.C:821
virtual void dec_dzpuis(Scalar &) const =0
Decreases by 1 the value of dzpuis of a Scalar and changes accordingly its values in the compactifi...
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:305
virtual void dalembert(Param &, Scalar &, const Scalar &, const Scalar &, const Scalar &) const
< Not implemented
virtual void div_cost(Scalar &) const =0
Division by of a Scalar.
virtual void val_lx(double rr, double theta, double pphi, int &l, double &xi) const
Computes the domain index l and the value of corresponding to a point given by its physical coordina...
Coord srdrdt
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1599
virtual void poisson_frontiere_double(const Cmp &, const Valeur &, const Valeur &, int, Cmp &) const
< Not implemented
virtual ~Map_log()
Destructor.
Definition: map_log.C:163
virtual ~Map_star()
Destructor.
Definition: map_star.C:128
double aa
Array (size: mg->nzone*Nt*Np ) of the values of in each domain.
Definition: map.h:4217
virtual void adapt(const Cmp &ent, const Param &par, int nbr=0)
Adaptation of the mapping to a given scalar field.
Definition: map_af.C:800
virtual ~Map()
Destructor.
Definition: map.C:216
virtual void sauve(FILE *) const
Save in a file.
Definition: map_log.C:166
virtual void resize(int l, double lambda)
Rescales the outer boundary of one domain.
Definition: map_af.C:687
virtual void poisson_frontiere_double(const Cmp &, const Valeur &, const Valeur &, int, Cmp &) const
< Not implemented
Coord z
z coordinate centered on the grid
Definition: map.h:740
virtual void div_r(Scalar &) const =0
Division by r of a Scalar.
virtual void dsdr(const Scalar &ci, Scalar &resu) const
Computes of a Scalar.
double rot_phi
Angle between the x –axis and X –axis.
Definition: map.h:693
virtual void lapang(const Scalar &uu, Scalar &lap) const
Computes the angular Laplacian of a scalar field.
Definition: map_et_lap.C:286
void sol_elliptic_sin_zec(Param_elliptic &params, const Scalar &so, Scalar &uu, double *coefs, double *) const
General elliptic solver.
Tbl ** dbb
Array (size: mg->nzone ) of Tbl which stores the values of in each domain.
Definition: map.h:2819
virtual Param * donne_para_poisson_vect(Param &, int) const
< Not implemented
virtual void comp_p_from_cartesian(const Scalar &v_x, const Scalar &v_y, Scalar &v_p) const
Computes the Spherical component (with respect to bvect_spher ) of a vector given by its cartesian c...
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:324
virtual void dsdr(const Cmp &ci, Cmp &resu) const
Computes of a Cmp.
Definition: map_af_deriv.C:282
Tbl aasx
Values at the nr collocation points of in the nucleus.
Definition: map.h:2796
virtual void dsdt(const Scalar &uu, Scalar &resu) const
Computes of a Scalar.
Definition: map_af_deriv.C:800
virtual double val_r_jk(int l, double xi, int j, int k) const
< Comparison operator
Tensor handling *** DEPRECATED : use class Tensor instead ***.
Definition: tenseur.h:304
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...
virtual void dsdt(const Scalar &, Scalar &) const
Computes of a Scalar .
Base_vect_cart bvect_cart
Cartesian basis associated with the coordinates (x,y,z) of the mapping, i.e.
Definition: map.h:709
Valeur alpha
Array (size: mg->nzone*Nt*Np ) of the values of in each domain.
Definition: map.h:3924
virtual ~Map_radial()
Destructor.
Definition: map_radial.C:113
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:2793
virtual Param * donne_para_poisson_vect(Param &par, int i) const
Internal function intended to be used by Map::poisson_vect and Map::poisson_vect_oohara ...
Coord r
r coordinate centered on the grid
Definition: map.h:730
Coord d2rdtdx
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1655
virtual void dsdxi(const Cmp &, Cmp &) const
< Not implemented
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:242
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 lapang(const Scalar &, Scalar &) const
< Not implemented
virtual void poisson_tau(const Cmp &source, Param &par, Cmp &uu) const
Computes the solution of a scalar Poisson equation with a Tau method.
virtual void stdsdp(const Scalar &uu, Scalar &resu) const =0
Computes of a Scalar .
virtual double val_r_jk(int l, double xi, int j, int k) const
Returns the value of the radial coordinate r for a given and a given collocation point in in a give...
virtual void sauve(FILE *) const
Save in a file.
Definition: map_star.C:248
virtual bool operator==(const Map &) const =0
Comparison operator (egality)
virtual const Map_af & mp_angu(int) const
Returns the "angular" mapping for the outside of domain l_zone.
Coord cost
Definition: map.h:734
virtual void dsdt(const Scalar &, Scalar &) const
Computes of a Scalar .