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.65 2024/07/03 13:51:02 j_novak Exp $
41  * $Log: map.h,v $
42  * Revision 1.65 2024/07/03 13:51:02 j_novak
43  * Added methods to interpolate a Scalar between Map_af and Map_star efficiently.
44  *
45  * Revision 1.64 2024/06/25 13:56:24 j_novak
46  * Split map.h into map.h and map_star.h.
47  *
48  * Revision 1.63 2023/05/24 09:58:44 g_servignat
49  * Added Map_eps, an ellipsoidal radial mapping
50  *
51  * Revision 1.62 2022/06/20 14:21:55 g_servignat
52  * Implemented shells in Map_star
53  *
54  * Revision 1.61 2022/05/30 12:39:53 g_servignat
55  * New Map_star class for general adaptive domain to star boundaries
56  *
57  * Revision 1.60 2018/12/05 15:43:45 j_novak
58  * New Map_af constructor from a formatted file.
59  *
60  * Revision 1.59 2014/10/13 08:52:35 j_novak
61  * Lorene classes and functions now belong to the namespace Lorene.
62  *
63  * Revision 1.58 2014/10/06 15:09:40 j_novak
64  * Modified #include directives to use c++ syntax.
65  *
66  * Revision 1.57 2014/01/14 13:24:02 b_peres
67  * *** empty log message ***
68  *
69  * Revision 1.56 2012/01/24 14:58:54 j_novak
70  * Removed functions XXX_fait_xi()
71  *
72  * Revision 1.55 2012/01/17 15:34:20 j_penner
73  * *** empty log message ***
74  *
75  * Revision 1.54 2012/01/17 10:20:07 j_penner
76  * added a member cxi that allows for direct access to the computational coordinates in each domain
77  *
78  * Revision 1.53 2008/09/29 13:23:51 j_novak
79  * Implementation of the angular mapping associated with an affine
80  * mapping. Things must be improved to take into account the domain index.
81  *
82  * Revision 1.52 2007/10/16 21:52:10 e_gourgoulhon
83  * Added method poisson_compact for multi-domains.
84  *
85  * Revision 1.51 2007/05/15 12:44:18 p_grandclement
86  * Scalar version of reevaluate
87  *
88  * Revision 1.50 2007/05/06 10:48:08 p_grandclement
89  * Modification of a few operators for the vorton project
90  *
91  * Revision 1.49 2007/01/16 15:05:59 n_vasset
92  * New constructor (taking a Scalar in mono-domain angular grid for
93  * boundary) for function sol_elliptic_boundary
94  *
95  * Revision 1.48 2006/08/31 12:10:51 j_novak
96  * More comments for Map_af::avance_dalembert().
97  *
98  * Revision 1.47 2006/05/26 09:00:09 j_novak
99  * New members for multiplication or division by cos(theta).
100  *
101  * Revision 1.46 2006/04/25 07:21:54 p_grandclement
102  * Various changes for the NS_BH project
103  *
104  * Revision 1.45 2005/11/30 11:09:03 p_grandclement
105  * Changes for the Bin_ns_bh project
106  *
107  * Revision 1.44 2005/11/24 09:25:06 j_novak
108  * Added the Scalar version for the Laplacian
109  *
110  * Revision 1.43 2005/09/15 15:51:25 j_novak
111  * The "rotation" (change of triad) methods take now Scalars as default
112  * arguments.
113  *
114  * Revision 1.42 2005/08/26 14:02:38 p_grandclement
115  * Modification of the elliptic solver that matches with an oscillatory exterior solution
116  * small correction in Poisson tau also...
117  *
118  * Revision 1.41 2005/08/25 12:14:07 p_grandclement
119  * Addition of a new method to solve the scalar Poisson equation, based on a multi-domain Tau-method
120  *
121  * Revision 1.40 2005/06/09 07:56:24 f_limousin
122  * Implement a new function sol_elliptic_boundary() and
123  * Vector::poisson_boundary(...) which solve the vectorial poisson
124  * equation (method 6) with an inner boundary condition.
125  *
126  * Revision 1.39 2005/04/04 21:30:41 e_gourgoulhon
127  * Added argument lambda to method poisson_angu
128  * to treat the generalized angular Poisson equation:
129  * Lap_ang u + lambda u = source.
130  *
131  * Revision 1.38 2004/12/29 16:37:22 k_taniguchi
132  * Addition of some functions with the multipole falloff condition.
133  *
134  * Revision 1.37 2004/12/02 09:33:04 p_grandclement
135  * *** empty log message ***
136  *
137  * Revision 1.36 2004/11/30 20:42:05 k_taniguchi
138  * Addition of some functions with the falloff condition and a method
139  * to resize the external shell.
140  *
141  * Revision 1.35 2004/11/23 12:39:12 f_limousin
142  * Intoduce function poisson_dir_neu(...) to solve a scalar poisson
143  * equation with a mixed boundary condition (Dirichlet + Neumann).
144  *
145  * Revision 1.34 2004/10/11 15:08:59 j_novak
146  * The radial manipulation functions take Scalar as arguments, instead of Cmp.
147  * Added a conversion operator from Scalar to Cmp.
148  * The Cmp radial manipulation function make conversion to Scalar, call to the
149  * Map_radial version with a Scalar argument and back.
150  *
151  * Revision 1.33 2004/10/08 13:34:35 j_novak
152  * Scalar::div_r() does not need to pass through Cmp version anymore.
153  *
154  * Revision 1.32 2004/08/24 09:14:40 p_grandclement
155  * Addition of some new operators, like Poisson in 2d... It now requieres the
156  * GSL library to work.
157  *
158  * Also, the way a variable change is stored by a Param_elliptic is changed and
159  * no longer uses Change_var but rather 2 Scalars. The codes using that feature
160  * will requiere some modification. (It should concern only the ones about monopoles)
161  *
162  * Revision 1.31 2004/07/27 08:24:26 j_novak
163  * Modif. comments
164  *
165  * Revision 1.30 2004/07/26 16:02:21 j_novak
166  * Added a flag to specify whether the primitive should be zero either at r=0
167  * or at r going to infinity.
168  *
169  * Revision 1.29 2004/06/22 08:49:57 p_grandclement
170  * Addition of everything needed for using the logarithmic mapping
171  *
172  * Revision 1.28 2004/06/14 15:23:53 e_gourgoulhon
173  * Added virtual function primr for computation of radial primitives.
174  *
175  * Revision 1.27 2004/03/31 11:22:23 f_limousin
176  * Methods Map_et::poisson_interne and Map_af::poisson_interne have been
177  * implemented to solve the continuity equation for strange stars.
178  *
179  * Revision 1.26 2004/03/22 13:12:41 j_novak
180  * Modification of comments to use doxygen instead of doc++
181  *
182  * Revision 1.24 2004/03/01 09:57:02 j_novak
183  * the wave equation is solved with Scalars. It now accepts a grid with a
184  * compactified external domain, which the solver ignores and where it copies
185  * the values of the field from one time-step to the next.
186  *
187  * Revision 1.23 2004/02/11 09:47:44 p_grandclement
188  * Addition of a new elliptic solver, matching with the homogeneous solution
189  * at the outer shell and not solving in the external domain (more details
190  * coming soon ; check your local Lorene dealer...)
191  *
192  * Revision 1.22 2004/01/29 08:50:01 p_grandclement
193  * Modification of Map::operator==(const Map&) and addition of the surface
194  * integrales using Scalar.
195  *
196  * Revision 1.21 2004/01/28 16:46:22 p_grandclement
197  * Addition of the sol_elliptic_fixe_der_zero stuff
198  *
199  * Revision 1.20 2004/01/28 10:35:52 j_novak
200  * Added new methods mult_r() for Scalars. These do not change the dzpuis flag.
201  *
202  * Revision 1.19 2004/01/27 09:33:46 j_novak
203  * New method Map_radial::div_r_zec
204  *
205  * Revision 1.18 2004/01/26 16:16:15 j_novak
206  * Methods of gradient for Scalar s. The input can have any dzpuis.
207  *
208  * Revision 1.17 2004/01/19 21:38:21 e_gourgoulhon
209  * Corrected sign error in comments of Map_radial::dxdr.
210  *
211  * Revision 1.16 2003/12/30 22:52:47 e_gourgoulhon
212  * Class Map: added methods flat_met_spher() and flat_met_cart() to get
213  * flat metric associated with the coordinates described by the mapping.
214  *
215  * Revision 1.15 2003/12/11 14:48:47 p_grandclement
216  * Addition of ALL (and that is a lot !) the files needed for the general elliptic solver ... UNDER DEVELOPEMENT...
217  *
218  * Revision 1.14 2003/11/06 14:43:37 e_gourgoulhon
219  * Gave a name to const arguments in certain method prototypes (e.g.
220  * constructors) to correct a bug of DOC++.
221  *
222  * Revision 1.13 2003/11/04 22:54:49 e_gourgoulhon
223  * Added new virtual methods mult_cost, mult_sint and div_sint.
224  *
225  * Revision 1.12 2003/10/16 08:49:21 j_novak
226  * Added a flag to decide wether the output is in the Ylm or in the standard base.
227  *
228  * Revision 1.11 2003/10/15 21:08:22 e_gourgoulhon
229  * Added method poisson_angu.
230  *
231  * Revision 1.10 2003/10/15 16:03:35 j_novak
232  * Added the angular Laplace operator for Scalar.
233  *
234  * Revision 1.9 2003/10/15 10:27:33 e_gourgoulhon
235  * Classes Map, Map_af and Map_et: added new methods dsdt, stdsdp and div_tant.
236  * Class Map_radial: added new Coord's : drdt and stdrdp.
237  *
238  * Revision 1.8 2003/06/20 14:14:53 f_limousin
239  * Add the operator== to compare two Cmp.
240  *
241  * Revision 1.7 2003/06/20 09:27:09 j_novak
242  * Modif commentaires.
243  *
244  * Revision 1.6 2002/10/16 14:36:29 j_novak
245  * Reorganization of #include instructions of standard C++, in order to
246  * use experimental version 3 of gcc.
247  *
248  * Revision 1.5 2002/09/13 09:17:33 j_novak
249  * Modif. commentaires
250  *
251  * Revision 1.4 2002/06/17 14:05:16 j_novak
252  * friend functions are now also declared outside the class definition
253  *
254  * Revision 1.3 2002/05/07 07:06:37 e_gourgoulhon
255  * Compatibily with xlC compiler on IBM SP2:
256  * added declaration of functions map_af_fait_* and map_et_fait_*
257  * outside the classes declarations.
258  *
259  * Revision 1.2 2002/01/15 15:53:06 p_grandclement
260  * I have had a constructor fot map_et using the equation of the surface
261  * of the star.
262  *
263  * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
264  * LORENE
265  *
266  * Revision 2.110 2001/10/29 15:31:55 novak
267  * Ajout de Map_radial::div_r
268  *
269  * Revision 2.109 2001/10/16 10:02:49 novak
270  * *** empty log message ***
271  *
272  * Revision 2.108 2001/07/19 14:01:00 novak
273  * new arguments for Map_af::dalembert
274  *
275  * Revision 2.107 2001/02/26 17:28:31 eric
276  * Ajout de la fonction virtuelle resize.
277  *
278  * Revision 2.106 2001/01/10 11:03:00 phil
279  * ajout de homothetie interne
280  *
281  * Revision 2.105 2001/01/02 10:51:55 phil
282  * ajout integrale de surface a l'infini
283  *
284  * Revision 2.104 2000/10/23 13:59:48 eric
285  * Map_et::adapt: changement des arguments (en autre, ajout de nz_search).
286  *
287  * Revision 2.103 2000/10/20 09:39:19 phil
288  * changement commentaires
289  *
290  * Revision 2.102 2000/10/19 14:33:23 novak
291  * corrige oubli pour Map_et?
292  *
293  * Revision 2.101 2000/10/19 14:11:20 novak
294  * Ajout des fonctions membres Map::dalembert et Map_af::dalembert
295  * (etat experimental)
296  *
297  * Revision 2.100 2000/10/09 13:46:39 eric
298  * Ajout de la fonction virtuelle poisson2d.
299  *
300  * Revision 2.99 2000/09/19 15:28:55 phil
301  * *** empty log message ***
302  *
303  * Revision 2.98 2000/09/19 15:24:19 phil
304  * ajout du passage de cartesienne en spheriques
305  *
306  * Revision 2.97 2000/09/19 13:05:38 phil
307  * ajout integrale_surface
308  *
309  * Revision 2.96 2000/09/11 15:54:03 eric
310  * Suppression des methodes deriv_x, deriv_y et deriv_z.
311  * Introduction des methodes comp_x_from_spherical, etc...
312  *
313  * Revision 2.95 2000/09/07 15:27:58 keisuke
314  * Add a new argument Cmp& uu in Map_af::poisson_regular and Map_et::poisson_regular.
315  *
316  * Revision 2.94 2000/09/04 15:30:56 keisuke
317  * Modify the arguments of Map_af::poisson_regular and Map_et::poisson_regular.
318  *
319  * Revision 2.93 2000/09/04 13:36:19 keisuke
320  * Modify the explanation for "uu_div" in Map_et::poisson_regular.
321  *
322  * Revision 2.92 2000/08/31 15:50:12 keisuke
323  * Modify Map_af::poisson_regular.
324  * Add Map_et::poisson_regular and Map::poisson_regular.
325  *
326  * Revision 2.91 2000/08/31 13:03:22 eric
327  * Ajout de la fonction virtuelle mult_rsint.
328  *
329  * Revision 2.90 2000/08/28 16:17:37 keisuke
330  * Add "int nzet" in the argumant of Map_af::poisson_regular.
331  *
332  * Revision 2.89 2000/08/18 11:10:12 eric
333  * Classe Map_et: ajout de l'operateur d'affectation a un autre Map_et.
334  *
335  * Revision 2.88 2000/08/11 08:50:18 keisuke
336  * Modif Map_af::poisson_regular
337  *
338  * Revision 2.87 2000/08/10 12:54:00 keisuke
339  * Ajout de Map_af::poisson_regular
340  *
341  * Revision 2.86 2000/07/20 14:21:07 eric
342  * Ajout de la fonction div_rsint.
343  *
344  * Revision 2.85 2000/05/25 13:54:41 eric
345  * Modif commentaires
346  *
347  * Revision 2.84 2000/05/22 14:38:51 phil
348  * ajout de inc_dzpuis et dec_dzpuis
349  *
350  * Revision 2.83 2000/04/27 15:18:54 phil
351  * *** empty log message ***
352  *
353  * Revision 2.82 2000/03/20 13:33:23 phil
354  * commentaires
355  *
356  * Revision 2.81 2000/03/17 17:32:48 phil
357  * *** empty log message ***
358  *
359  * Revision 2.80 2000/03/17 17:01:54 phil
360  * *** empty log message ***
361  *
362  * Revision 2.79 2000/03/17 16:58:48 phil
363  * ajout de poisson_frontiere
364  *
365  * Revision 2.78 2000/03/06 11:29:51 eric
366  * Ajout du membre reeavaluate_symy.
367  *
368  * Revision 2.77 2000/02/15 15:08:21 eric
369  * Changement du Param dans Map_et::adapt : fact_echelle est desormais
370  * passe en double_mod.
371  *
372  * Revision 2.76 2000/02/15 10:26:25 phil
373  * commentaire +
374  * suppression de poisson_vect et poisson_vect_oohara
375  *
376  * Revision 2.75 2000/02/11 13:37:43 eric
377  * Ajout de la fonction convert_absolute.
378  *
379  * Revision 2.74 2000/02/09 09:53:37 phil
380  * ajout de poisson_vect_oohara
381  *
382  * Revision 2.73 2000/01/26 13:07:02 eric
383  * Reprototypage complet des routines de derivation:
384  * le resultat est desormais suppose alloue a l'exterieur de la routine
385  * et est passe en argument (Cmp& resu), si bien que le prototypage
386  * complet devient:
387  * void DERIV(const Cmp& ci, Cmp& resu)
388  *
389  * Revision 2.72 2000/01/24 17:08:21 eric
390  * Class Map_af : suppression de la fonction convert.
391  * suppression du constructeur par convertion d'un Map_et.
392  * ajout du constructeur par conversion d'un Map.
393  *
394  * Revision 2.71 2000/01/24 16:41:43 eric
395  * Ajout de la fonction virtuelle operator=(const Map_af& ).
396  * Classe Map_af : ajout de la fonction convert(const Map& ).
397  *
398  * Revision 2.70 2000/01/21 12:48:34 phil
399  * changement prototypage de Map::poisson_vect
400  *
401  * Revision 2.69 2000/01/20 16:35:05 phil
402  * *** empty log message ***
403  *
404  * Revision 2.68 2000/01/20 15:44:42 phil
405  * *** empty log message ***
406  *
407  * Revision 2.67 2000/01/20 15:31:56 phil
408  * *** empty log message ***
409  *
410  * Revision 2.66 2000/01/20 14:18:06 phil
411  * *** empty log message ***
412  *
413  * Revision 2.65 2000/01/20 13:16:34 phil
414  * *** empty log message ***
415  *
416  * Revision 2.64 2000/01/20 12:51:24 phil
417  * *** empty log message ***
418  *
419  * Revision 2.63 2000/01/20 12:45:28 phil
420  * *** empty log message ***
421  *
422  * Revision 2.62 2000/01/20 12:40:27 phil
423  * *** empty log message ***
424  *
425  * Revision 2.61 2000/01/20 11:27:54 phil
426  * ajout de poisson_vect
427  *
428  * Revision 2.60 2000/01/13 15:31:55 eric
429  * Modif commentaires/
430  *
431  * Revision 2.59 2000/01/12 16:02:57 eric
432  * Modif commentaires poisson_compact.
433  *
434  * Revision 2.58 2000/01/12 12:54:23 eric
435  * Ajout du Cmp null, *p_cmp_zero, et de la methode associee cmp_zero().
436  *
437  * Revision 2.57 2000/01/10 13:27:43 eric
438  * Ajout des bases vectorielles associees aux coordonnees :
439  * membres bvect_spher et bvect_cart.
440  *
441  * Revision 2.56 2000/01/10 09:12:47 eric
442  * Reprototypage de poisson_compact : Valeur -> Cmp, Tenseur.
443  * Suppression de poisson_compact_boucle.
444  * poisson_compact est desormais implementee au niveau Map_radial.
445  *
446  * Revision 2.55 2000/01/04 15:23:11 eric
447  * Classe Map_radial : les data sont listees en premier
448  * Introduction de la fonction reevalutate.
449  *
450  * Revision 2.54 2000/01/03 13:30:32 eric
451  * Ajout de la fonction adapt.
452  *
453  * Revision 2.53 1999/12/22 17:09:52 eric
454  * Modif commentaires.
455  *
456  * Revision 2.52 1999/12/21 16:26:25 eric
457  * Ajout du constructeur par conversion Map_af::Map_af(const Map_et&).
458  * Ajout des fonctions Map_af::set_alpha et Map_af::set_beta.
459  *
460  * Revision 2.51 1999/12/21 13:01:29 eric
461  * Changement de prototype de la routine poisson : la solution est
462  * desormais passee en argument (et non plus en valeur de retour)
463  * pour permettre l'initialisation de methodes de resolution iterative.
464  *
465  * Revision 2.50 1999/12/21 10:12:09 eric
466  * Modif commentaires.
467  *
468  * Revision 2.49 1999/12/21 10:06:05 eric
469  * Ajout de l'argument Param& a poisson.
470  *
471  * Revision 2.48 1999/12/20 15:44:35 eric
472  * Modif commentaires.
473  *
474  * Revision 2.47 1999/12/20 10:47:45 eric
475  * Modif commentaires.
476  *
477  * Revision 2.46 1999/12/20 10:24:12 eric
478  * Ajout des fonctions de lecture des parametres de Map_et:
479  * get_alpha(), get_beta(), get_ff(), get_gg().
480  *
481  * Revision 2.45 1999/12/16 14:50:08 eric
482  * Modif commentaires.
483  *
484  * Revision 2.44 1999/12/16 14:17:54 eric
485  * Introduction de l'argument const Param& par dans val_lx et val_lx_jk.
486  * (en remplacement de l'argument Tbl& param).
487  *
488  * Revision 2.43 1999/12/09 10:45:24 eric
489  * Ajout de la fonction virtuelle integrale.
490  *
491  * Revision 2.42 1999/12/07 14:50:47 eric
492  * Changement ordre des arguments val_r, val_lx
493  * val_r_kj --> val_r_jk
494  * val_lx_kj -->val_lx_jk
495  *
496  * Revision 2.41 1999/12/06 16:45:20 eric
497  * Surcharge de val_lx avec la version sans param.
498  *
499  * Revision 2.40 1999/12/06 15:33:44 eric
500  * Ajout des fonctions val_r_kj et val_lx_kj.
501  *
502  * Revision 2.39 1999/12/06 13:11:54 eric
503  * Introduction des fonctions val_r, val_lx et homothetie.
504  *
505  * Revision 2.38 1999/12/02 14:28:22 eric
506  * Reprototypage de la fonction poisson: Valeur -> Cmp.
507  *
508  * Revision 2.37 1999/11/30 14:19:33 eric
509  * Reprototypage complet des fonctions membres mult_r, mult_r_zec,
510  * dec2_dzpuis et inc2_dzpuis : Valeur --> Cmp
511  *
512  * Revision 2.36 1999/11/29 13:17:57 eric
513  * Modif commentaires.
514  *
515  * Revision 2.35 1999/11/29 12:55:42 eric
516  * Changement prototype de la fonction laplacien : Valeur --> Cmp.
517  *
518  * Revision 2.34 1999/11/25 16:27:27 eric
519  * Reorganisation complete du calcul des derivees partielles.
520  *
521  * Revision 2.33 1999/11/24 16:31:17 eric
522  * Map_et: ajout des fonctions set_ff et set_gg.
523  *
524  * Revision 2.32 1999/11/24 14:31:48 eric
525  * Map_af: les membres alpha et beta deviennent prives.
526  * Map_af: introduction des fonctions get_alpha() et get_beta().
527  *
528  * Revision 2.31 1999/11/24 11:22:09 eric
529  * Map_et : Coords rendus publics
530  * Map_et : fonctions de constructions amies.
531  *
532  * Revision 2.30 1999/11/22 10:32:39 eric
533  * Introduction de la classe Map_et.
534  * Constructeurs de Map rendus protected.
535  * Fonction del_coord() rebaptisee reset_coord().
536  *
537  * Revision 2.29 1999/10/27 16:44:41 phil
538  * ajout de mult_r_zec
539  *
540  * Revision 2.28 1999/10/19 14:40:37 phil
541  * ajout de inc2_dzpuis()
542  *
543  * Revision 2.27 1999/10/15 14:12:20 eric
544  * *** empty log message ***
545  *
546  * Revision 2.26 1999/10/14 14:26:06 eric
547  * Depoussierage.
548  * Documentation.
549  *
550  * Revision 2.25 1999/10/11 11:16:29 phil
551  * changement prototypage de poisson_compact_boucle
552  *
553  * Revision 2.24 1999/10/11 10:48:51 phil
554  * changement de nom pour poisson a support compact
555  *
556  * Revision 2.23 1999/10/04 09:20:58 phil
557  * changement de prototypage de void Map_af::poisson_nul
558  *
559  * Revision 2.22 1999/09/30 18:38:32 phil
560  * *** empty log message ***
561  *
562  * Revision 2.21 1999/09/30 18:33:10 phil
563  * ajout de poisson_nul et poisson_nul_boucle
564  *
565  * Revision 2.20 1999/09/30 16:45:54 phil
566  * ajout de Map_af::poisson_nul(const Valeur&, int, int)
567  *
568  * Revision 2.19 1999/09/16 13:15:40 phil
569  * ajout de Valeur mult_r (const Valeur &)
570  *
571  * Revision 2.18 1999/09/15 10:42:11 phil
572  * ajout de Valeur dec2_dzpuis(const Valeur&)
573  *
574  * Revision 2.17 1999/09/14 13:45:45 phil
575  * suppression de la divergence
576  *
577  * Revision 2.16 1999/09/13 15:09:07 phil
578  * ajout de Map_af::divergence
579  *
580  * Revision 2.15 1999/09/13 13:52:23 phil
581  * ajout des derivations partielles par rapport a x,y et z.
582  *
583  * Revision 2.14 1999/09/07 14:35:20 phil
584  * ajout de la fonction Valeur** gradient(const Valeur&)
585  *
586  * Revision 2.13 1999/04/26 16:37:43 phil
587  * *** empty log message ***
588  *
589  * Revision 2.12 1999/04/26 16:33:28 phil
590  * *** empty log message ***
591  *
592  * Revision 2.11 1999/04/26 13:53:04 phil
593  * *** empty log message ***
594  *
595  * Revision 2.10 1999/04/26 13:51:19 phil
596  * ajout de Map_af::laplacien (2versions)
597  *
598  * Revision 2.9 1999/04/14 09:04:01 phil
599  * *** empty log message ***
600  *
601  * Revision 2.8 1999/04/14 08:53:27 phil
602  * *** empty log message ***
603  *
604  * Revision 2.7 1999/04/13 17:45:25 phil
605  * *** empty log message ***
606  *
607  * Revision 2.6 1999/04/13 17:02:41 phil
608  * ,
609  *
610  * Revision 2.5 1999/04/13 17:00:41 phil
611  * ajout de la resolution de poisson affine
612  *
613  * Revision 2.4 1999/03/04 13:10:53 eric
614  * Ajout des Coord representant les derivees du changement de variable
615  * dans la classe Map_radial.
616  *
617  * Revision 2.3 1999/03/01 17:00:38 eric
618  * *** empty log message ***
619  *
620  * Revision 2.2 1999/03/01 16:44:41 eric
621  * Operateurs << et >> sur les ostream.
622  * L'operateur >> est virtuel.
623  *
624  * Revision 2.1 1999/02/22 15:21:45 hyc
625  * *** empty log message ***
626  *
627  *
628  * Revision 2.0 1999/01/15 09:10:39 hyc
629  * *** empty log message ***
630  *
631  * $Header: /cvsroot/Lorene/C++/Include/map.h,v 1.65 2024/07/03 13:51:02 j_novak Exp $
632  *
633  */
634 
635 #include <cstdio>
636 
637 #include "coord.h"
638 #include "base_vect.h"
639 #include "valeur.h"
640 #include "tbl.h"
641 #include "itbl.h"
642 
643 namespace Lorene {
644 class Scalar ;
645 class Cmp ;
646 class Param ;
647 class Map_af ;
648 class Map_et ;
649 class Tenseur ;
650 class Param_elliptic ;
651 class Metric_flat ;
652 class Tbl ;
653 class Itbl ;
654 
655  //------------------------------------//
656  // class Map //
657  //------------------------------------//
658 
688 class Map {
689 
690  // Data :
691  // ----
692  protected:
694  const Mg3d* mg ;
695 
696  double ori_x ;
697  double ori_y ;
698  double ori_z ;
699  double rot_phi ;
700 
708 
716 
721 
726 
732 
733  mutable Map_af* p_mp_angu ;
734 
735  public:
736  Coord r ;
743 
744  Coord x ;
745  Coord y ;
746  Coord z ;
747 
751 
752 
753  // Constructors, destructor :
754  // ------------------------
755 
756  protected:
757  explicit Map(const Mg3d& ) ;
758  Map(const Map &) ;
759  Map(const Mg3d&, FILE* ) ;
760 
761  public:
762  virtual ~Map() ;
763 
764  // Memory management
765  // -----------------
766  protected:
767  virtual void reset_coord() ;
768 
769  // Outputs
770  // -------
771  private:
772  virtual ostream& operator>>(ostream &) const = 0 ;
773 
774  public:
775  virtual void sauve(FILE* ) const ;
776 
777 
778  // Extraction of information
779  // -------------------------
780 
781  public:
783  const Mg3d* get_mg() const {return mg; };
784 
786  double get_ori_x() const {return ori_x;} ;
788  double get_ori_y() const {return ori_y;} ;
790  double get_ori_z() const {return ori_z;} ;
791 
793  double get_rot_phi() const {return rot_phi;} ;
794 
801  const Base_vect_spher& get_bvect_spher() const {return bvect_spher;} ;
802 
809  const Base_vect_cart& get_bvect_cart() const {return bvect_cart;} ;
810 
814  const Metric_flat& flat_met_spher() const ;
815 
819  const Metric_flat& flat_met_cart() const ;
820 
825  const Cmp& cmp_zero() const {return *p_cmp_zero;} ;
826 
830  virtual const Map_af& mp_angu(int) const = 0 ;
831 
842  void convert_absolute(double xx, double yy, double zz,
843  double& rr, double& theta, double& pphi) const ;
844 
853  virtual double val_r(int l, double xi, double theta, double pphi)
854  const = 0 ;
855 
864  virtual void val_lx(double rr, double theta, double pphi,
865  int& l, double& xi) const = 0 ;
866 
879  virtual void val_lx(double rr, double theta, double pphi,
880  const Param& par, int& l, double& xi) const = 0 ;
881 
882 
884  virtual bool operator==(const Map& ) const = 0;
885 
886 
887 
888  // Modification of the origin, the orientation and the radial scale:
889  // ----------------------------------------------------------------
890  public:
891  void set_ori(double xa0, double ya0, double za0) ;
892  void set_rot_phi(double phi0) ;
893 
898  virtual void homothetie(double lambda) = 0 ;
899 
909  virtual void resize(int l, double lambda) = 0 ;
910 
911  // Modification of the mapping
912  // ---------------------------
913  public:
915  virtual void operator=(const Map_af& ) = 0 ;
916 
922  virtual void adapt(const Cmp& ent, const Param& par, int nbr=0) = 0 ;
923 
924  // Values of a Cmp at the new grid points
925  // --------------------------------------
926 
939  virtual void reevaluate(const Map* mp_prev, int nzet,
940  Cmp& uu) const = 0 ;
941 
955  virtual void reevaluate_symy(const Map* mp_prev, int nzet,
956  Cmp& uu) const = 0 ;
957 
970  virtual void reevaluate(const Map* mp_prev, int nzet,
971  Scalar& uu) const = 0 ;
972 
986  virtual void reevaluate_symy(const Map* mp_prev, int nzet,
987  Scalar& uu) const = 0 ;
988 
989  // Differential operators:
990  // ----------------------
991  public:
998  virtual void dsdxi(const Cmp& ci, Cmp& resu) const = 0 ;
999 
1006  virtual void dsdr(const Cmp& ci, Cmp& resu) const = 0 ;
1007 
1014  virtual void srdsdt(const Cmp& ci, Cmp& resu) const = 0 ;
1015 
1023  virtual void srstdsdp(const Cmp& ci, Cmp& resu) const = 0 ;
1024 
1032  virtual void dsdxi(const Scalar& uu, Scalar& resu) const = 0 ;
1033 
1041  virtual void dsdr(const Scalar& uu, Scalar& resu) const = 0 ;
1042 
1051  virtual void dsdradial(const Scalar& uu, Scalar& resu) const = 0 ;
1052 
1060  virtual void srdsdt(const Scalar& uu, Scalar& resu) const = 0 ;
1061 
1069  virtual void srstdsdp(const Scalar& uu, Scalar& resu) const = 0 ;
1070 
1075  virtual void dsdt(const Scalar& uu, Scalar& resu) const = 0 ;
1076 
1081  virtual void stdsdp(const Scalar& uu, Scalar& resu) const = 0 ;
1082 
1093  virtual void laplacien(const Scalar& uu, int zec_mult_r,
1094  Scalar& lap) const = 0 ;
1095 
1097  virtual void laplacien(const Cmp& uu, int zec_mult_r,
1098  Cmp& lap) const = 0 ;
1099 
1106  virtual void lapang(const Scalar& uu, Scalar& lap) const = 0 ;
1107 
1108 
1119  virtual void primr(const Scalar& uu, Scalar& resu,
1120  bool null_infty) const = 0 ;
1121 
1122 
1123  // Various linear operators
1124  // ------------------------
1125  public:
1129  virtual void mult_r(Scalar& uu) const = 0 ;
1130 
1134  virtual void mult_r(Cmp& ci) const = 0 ;
1135 
1139  virtual void mult_r_zec(Scalar& ) const = 0 ;
1140 
1143  virtual void mult_rsint(Scalar& ) const = 0 ;
1144 
1147  virtual void div_rsint(Scalar& ) const = 0 ;
1148 
1151  virtual void div_r(Scalar& ) const = 0 ;
1152 
1156  virtual void div_r_zec(Scalar& ) const = 0 ;
1157 
1160  virtual void mult_cost(Scalar& ) const = 0 ;
1161 
1164  virtual void div_cost(Scalar& ) const = 0 ;
1165 
1168  virtual void mult_sint(Scalar& ) const = 0 ;
1169 
1172  virtual void div_sint(Scalar& ) const = 0 ;
1173 
1176  virtual void div_tant(Scalar& ) const = 0 ;
1177 
1187  virtual void comp_x_from_spherical(const Scalar& v_r, const Scalar& v_theta,
1188  const Scalar& v_phi, Scalar& v_x) const = 0 ;
1190  virtual void comp_x_from_spherical(const Cmp& v_r, const Cmp& v_theta,
1191  const Cmp& v_phi, Cmp& v_x) const = 0 ;
1192 
1202  virtual void comp_y_from_spherical(const Scalar& v_r, const Scalar& v_theta,
1203  const Scalar& v_phi, Scalar& v_y) const = 0 ;
1204 
1206  virtual void comp_y_from_spherical(const Cmp& v_r, const Cmp& v_theta,
1207  const Cmp& v_phi, Cmp& v_y) const = 0 ;
1208 
1217  virtual void comp_z_from_spherical(const Scalar& v_r, const Scalar& v_theta,
1218  Scalar& v_z) const = 0 ;
1219 
1221  virtual void comp_z_from_spherical(const Cmp& v_r, const Cmp& v_theta,
1222  Cmp& v_z) const = 0 ;
1223 
1233  virtual void comp_r_from_cartesian(const Scalar& v_x, const Scalar& v_y,
1234  const Scalar& v_z, Scalar& v_r) const = 0 ;
1236  virtual void comp_r_from_cartesian(const Cmp& v_x, const Cmp& v_y,
1237  const Cmp& v_z, Cmp& v_r) const = 0 ;
1238 
1248  virtual void comp_t_from_cartesian(const Scalar& v_x, const Scalar& v_y,
1249  const Scalar& v_z, Scalar& v_t) const = 0 ;
1250 
1252  virtual void comp_t_from_cartesian(const Cmp& v_x, const Cmp& v_y,
1253  const Cmp& v_z, Cmp& v_t) const = 0 ;
1254 
1263  virtual void comp_p_from_cartesian(const Scalar& v_x, const Scalar& v_y,
1264  Scalar& v_p) const = 0 ;
1265 
1267  virtual void comp_p_from_cartesian(const Cmp& v_x, const Cmp& v_y,
1268  Cmp& v_p) const = 0 ;
1269 
1274  virtual void dec_dzpuis(Scalar& ) const = 0 ;
1275 
1280  virtual void dec2_dzpuis(Scalar& ) const = 0 ;
1281 
1286  virtual void inc_dzpuis(Scalar& ) const = 0 ;
1287 
1292  virtual void inc2_dzpuis(Scalar& ) const = 0 ;
1293 
1301  virtual Tbl* integrale(const Cmp&) const = 0 ;
1302 
1303  // PDE resolution :
1304  // --------------
1305  public:
1316  virtual void poisson(const Cmp& source, Param& par, Cmp& uu) const = 0 ;
1317 
1328  virtual void poisson_tau(const Cmp& source, Param& par, Cmp& uu) const = 0 ;
1329 
1330  virtual void poisson_falloff(const Cmp& source, Param& par, Cmp& uu,
1331  int k_falloff) const = 0 ;
1332 
1333  virtual void poisson_ylm(const Cmp& source, Param& par, Cmp& pot,
1334  int nylm, double* intvec) const = 0 ;
1335 
1358  virtual void poisson_regular(const Cmp& source, int k_div, int nzet,
1359  double unsgam1, Param& par, Cmp& uu,
1360  Cmp& uu_regu, Cmp& uu_div,
1361  Tenseur& duu_div, Cmp& source_regu,
1362  Cmp& source_div) const = 0 ;
1363 
1377  virtual void poisson_compact(const Cmp& source, const Cmp& aa,
1378  const Tenseur& bb, const Param& par,
1379  Cmp& psi) const = 0 ;
1380 
1395  virtual void poisson_compact(int nzet, const Cmp& source, const Cmp& aa,
1396  const Tenseur& bb, const Param& par,
1397  Cmp& psi) const = 0 ;
1398 
1416  virtual void poisson_angu(const Scalar& source, Param& par,
1417  Scalar& uu, double lambda=0) const = 0 ;
1418 
1419  virtual void poisson_angu(const Cmp& source, Param& par,
1420  Cmp& uu, double lambda=0) const = 0 ;
1421 
1422 
1423  public:
1447  virtual Param* donne_para_poisson_vect (Param& para, int i) const = 0;
1448 
1469  virtual void poisson_frontiere (const Cmp& source,const Valeur& limite,
1470  int raccord, int num_front, Cmp& pot,
1471  double = 0., double = 0.) const = 0 ;
1472 
1473  virtual void poisson_frontiere_double (const Cmp& source, const Valeur& lim_func,
1474  const Valeur& lim_der, int num_zone, Cmp& pot) const = 0 ;
1475 
1476 
1487  virtual void poisson_interne (const Cmp& source, const Valeur& limite,
1488  Param& par, Cmp& pot) const = 0 ;
1489 
1490 
1512  virtual void poisson2d(const Cmp& source_mat, const Cmp& source_quad,
1513  Param& par, Cmp& uu) const = 0 ;
1514 
1528  virtual void dalembert(Param& par, Scalar& fJp1, const Scalar& fJ,
1529  const Scalar& fJm1, const Scalar& source) const = 0 ;
1530 
1531  // Friend functions :
1532  // ----------------
1533  friend ostream& operator<<(ostream& , const Map& ) ;
1534 };
1535 ostream& operator<<(ostream& , const Map& ) ;
1536 
1537 
1538 
1539  //------------------------------------//
1540  // class Map_radial //
1541  //------------------------------------//
1542 
1543 
1544 
1557 class Map_radial : public Map {
1558 
1559  // Data :
1560  // ----
1561 
1562  // 0th order derivatives of the mapping
1563  // - - - - - - - - - - - - - - - - - -
1564  public:
1571 
1572  // 1st order derivatives of the mapping
1573  // - - - - - - - - - - - - - - - - - -
1574  public:
1582 
1590 
1598 
1606 
1614 
1622 
1630 
1631  // 2nd order derivatives of the mapping
1632  // - - - - - - - - - - - - - - - - - -
1633  public:
1641 
1653 
1654 
1662 
1670 
1671 
1679 
1680 
1681  // Constructors, destructor :
1682  // ------------------------
1683 
1684  protected:
1686  Map_radial(const Mg3d& mgrid ) ;
1687  Map_radial(const Map_radial& mp) ;
1688  Map_radial (const Mg3d&, FILE* ) ;
1689 
1690  public:
1691  virtual ~Map_radial() ;
1692 
1693  // Memory management
1694  // -----------------
1695  protected:
1696  virtual void reset_coord() ;
1697  // Modification of the mapping
1698  // ---------------------------
1699  public:
1701  virtual void operator=(const Map_af& ) = 0 ;
1702 
1703  // Outputs
1704  // -------
1705  public:
1706  virtual void sauve(FILE* ) const ;
1707 
1708  // Extraction of information
1709  // -------------------------
1719  virtual double val_r_jk(int l, double xi, int j, int k) const = 0 ;
1720 
1731  virtual void val_lx_jk(double rr, int j, int k, const Param& par,
1732  int& l, double& xi) const = 0 ;
1733 
1735  virtual bool operator==(const Map& ) const = 0;
1736 
1737  // Values of a Cmp at the new grid points
1738  // --------------------------------------
1751  virtual void reevaluate(const Map* mp_prev, int nzet, Cmp& uu) const ;
1752 
1766  virtual void reevaluate_symy(const Map* mp_prev, int nzet, Cmp& uu)
1767  const ;
1768 
1781  virtual void reevaluate(const Map* mp_prev, int nzet, Scalar& uu) const ;
1782 
1796  virtual void reevaluate_symy(const Map* mp_prev, int nzet, Scalar& uu)
1797  const ;
1798 
1799  // Various linear operators
1800  // ------------------------
1801  public:
1805  virtual void mult_r(Scalar& uu) const ;
1806 
1810  virtual void mult_r(Cmp& ci) const ;
1811 
1816  virtual void mult_r_zec(Scalar& ) const ;
1817 
1820  virtual void mult_rsint(Scalar& ) const ;
1821 
1824  virtual void div_rsint(Scalar& ) const ;
1825 
1828  virtual void div_r(Scalar& ) const ;
1829 
1833  virtual void div_r_zec(Scalar& ) const ;
1834 
1837  virtual void mult_cost(Scalar& ) const ;
1838 
1841  virtual void div_cost(Scalar& ) const ;
1842 
1845  virtual void mult_sint(Scalar& ) const ;
1846 
1849  virtual void div_sint(Scalar& ) const ;
1850 
1853  virtual void div_tant(Scalar& ) const ;
1854 
1864  virtual void comp_x_from_spherical(const Scalar& v_r, const Scalar& v_theta,
1865  const Scalar& v_phi, Scalar& v_x) const ;
1866 
1868  virtual void comp_x_from_spherical(const Cmp& v_r, const Cmp& v_theta,
1869  const Cmp& v_phi, Cmp& v_x) const ;
1870 
1880  virtual void comp_y_from_spherical(const Scalar& v_r, const Scalar& v_theta,
1881  const Scalar& v_phi, Scalar& v_y) const ;
1882 
1884  virtual void comp_y_from_spherical(const Cmp& v_r, const Cmp& v_theta,
1885  const Cmp& v_phi, Cmp& v_y) const ;
1886 
1895  virtual void comp_z_from_spherical(const Scalar& v_r, const Scalar& v_theta,
1896  Scalar& v_z) const ;
1897 
1899  virtual void comp_z_from_spherical(const Cmp& v_r, const Cmp& v_theta,
1900  Cmp& v_z) const ;
1901 
1911  virtual void comp_r_from_cartesian(const Scalar& v_x, const Scalar& v_y,
1912  const Scalar& v_z, Scalar& v_r) const ;
1913 
1915  virtual void comp_r_from_cartesian(const Cmp& v_x, const Cmp& v_y,
1916  const Cmp& v_z, Cmp& v_r) const ;
1917 
1927  virtual void comp_t_from_cartesian(const Scalar& v_x, const Scalar& v_y,
1928  const Scalar& v_z, Scalar& v_t) const ;
1929 
1931  virtual void comp_t_from_cartesian(const Cmp& v_x, const Cmp& v_y,
1932  const Cmp& v_z, Cmp& v_t) const ;
1933 
1942  virtual void comp_p_from_cartesian(const Scalar& v_x, const Scalar& v_y,
1943  Scalar& v_p) const ;
1944 
1946  virtual void comp_p_from_cartesian(const Cmp& v_x, const Cmp& v_y,
1947  Cmp& v_p) const ;
1948 
1954  virtual void dec_dzpuis(Scalar& ) const ;
1955 
1961  virtual void dec2_dzpuis(Scalar& ) const ;
1962 
1968  virtual void inc_dzpuis(Scalar& ) const ;
1969 
1975  virtual void inc2_dzpuis(Scalar& ) const ;
1976 
1977 
1978  // PDE resolution :
1979  // --------------
1980  public:
2003  virtual void poisson_compact(const Cmp& source, const Cmp& aa,
2004  const Tenseur& bb, const Param& par,
2005  Cmp& psi) const ;
2006 
2021  virtual void poisson_compact(int nzet, const Cmp& source, const Cmp& aa,
2022  const Tenseur& bb, const Param& par,
2023  Cmp& psi) const ;
2024 
2025 };
2026 
2027 
2028  //------------------------------------//
2029  // class Map_af //
2030  //------------------------------------//
2031 
2032 
2033 
2048 class Map_af : public Map_radial {
2049 
2050  // Data :
2051  // ----
2052  private:
2054  double* alpha ;
2056  double* beta ;
2057 
2058  // Constructors, destructor :
2059  // ------------------------
2060  public:
2072  Map_af(const Mg3d& mgrille, const double* r_limits) ;
2085  Map_af(const Mg3d& mgrille, const Tbl& r_limits) ;
2086 
2087  Map_af(const Map_af& ) ;
2088  Map_af(const Mg3d&, const string&) ;
2089  Map_af(const Mg3d&, FILE* ) ;
2090 
2102  explicit Map_af(const Map& ) ;
2103 
2104  virtual ~Map_af() ;
2105 
2106  // Assignment
2107  // ----------
2108  public:
2110  virtual void operator=(const Map_af& ) ;
2111 
2112  // Memory management
2113  // -----------------
2114  private:
2116  void set_coord() ;
2117 
2118  // Extraction of information
2119  // -------------------------
2120  public:
2122  const double* get_alpha() const ;
2123 
2125  const double* get_beta() const ;
2126 
2130  virtual const Map_af& mp_angu(int) const ;
2131 
2141  virtual double val_r(int l, double xi, double theta, double pphi) const ;
2142 
2152  virtual void val_lx(double rr, double theta, double pphi,
2153  int& l, double& xi) const ;
2154 
2164  virtual void val_lx(double rr, double theta, double pphi,
2165  const Param& par, int& l, double& xi) const ;
2166 
2176  virtual double val_r_jk(int l, double xi, int j, int k) const ;
2177 
2187  virtual void val_lx_jk(double rr, int j, int k, const Param& par,
2188  int& l, double& xi) const ;
2189 
2191  virtual bool operator==(const Map& ) const ;
2192 
2193 
2194  // Outputs
2195  // -------
2196  public:
2197  virtual void sauve(FILE* ) const ;
2198 
2199  private:
2200  virtual ostream& operator>>(ostream &) const ;
2201 
2202  // Modification of the mapping
2203  // ---------------------------
2204  public:
2209  virtual void homothetie(double lambda) ;
2210 
2220  virtual void resize(int l, double lambda) ;
2221 
2227  void homothetie_interne(double lambda) ;
2228 
2231  virtual void adapt(const Cmp& ent, const Param& par, int nbr=0) ;
2232 
2234  void set_alpha(double alpha0, int l) ;
2235 
2237  void set_beta(double beta0, int l) ;
2238 
2239  // Differential operators:
2240  // ----------------------
2241  public:
2248  virtual void dsdxi(const Cmp& ci, Cmp& resu) const ;
2249 
2256  virtual void dsdr(const Cmp& ci, Cmp& resu) const ;
2257 
2264  virtual void srdsdt(const Cmp& ci, Cmp& resu) const ;
2265 
2273  virtual void srstdsdp(const Cmp& ci, Cmp& resu) const ;
2274 
2282  virtual void dsdr(const Scalar& uu, Scalar& resu) const ;
2283 
2291  virtual void dsdxi(const Scalar& uu, Scalar& resu) const ;
2292 
2300  virtual void dsdradial(const Scalar&, Scalar&) const ;
2301 
2309  virtual void srdsdt(const Scalar& uu, Scalar& resu) const ;
2310 
2318  virtual void srstdsdp(const Scalar& uu, Scalar& resu) const ;
2319 
2324  virtual void dsdt(const Scalar& uu, Scalar& resu) const ;
2325 
2330  virtual void stdsdp(const Scalar& uu, Scalar& resu) const ;
2331 
2342  virtual void laplacien(const Scalar& uu, int zec_mult_r,
2343  Scalar& lap) const ;
2344 
2346  virtual void laplacien(const Cmp& uu, int zec_mult_r,
2347  Cmp& lap) const ;
2348 
2355  virtual void lapang(const Scalar& uu, Scalar& lap) const ;
2356 
2357 
2368  virtual void primr(const Scalar& uu, Scalar& resu,
2369  bool null_infty) const ;
2370 
2371 
2379  virtual Tbl* integrale(const Cmp&) const ;
2380 
2381 
2382  // PDE resolution :
2383  // --------------
2384  public:
2392  virtual void poisson(const Cmp& source, Param& par, Cmp& uu) const ;
2393 
2401  virtual void poisson_tau(const Cmp& source, Param& par, Cmp& uu) const ;
2402 
2403  virtual void poisson_falloff(const Cmp& source, Param& par, Cmp& uu,
2404  int k_falloff) const ;
2405 
2406  virtual void poisson_ylm(const Cmp& source, Param& par, Cmp& pot,
2407  int nylm, double* intvec) const ;
2408 
2430  virtual void poisson_regular(const Cmp& source, int k_div, int nzet,
2431  double unsgam1, Param& par, Cmp& uu,
2432  Cmp& uu_regu, Cmp& uu_div,
2433  Tenseur& duu_div, Cmp& source_regu,
2434  Cmp& source_div) const ;
2435 
2453  virtual void poisson_angu(const Scalar& source, Param& par,
2454  Scalar& uu, double lambda=0) const ;
2455  virtual void poisson_angu(const Cmp& source, Param& par,
2456  Cmp& uu, double lambda=0) const ;
2457 
2467  virtual Param* donne_para_poisson_vect (Param& par, int i) const ;
2468 
2473  virtual void poisson_frontiere (const Cmp&, const Valeur&, int, int, Cmp&, double = 0., double = 0.) const ;
2474 
2480  virtual void poisson_frontiere_double (const Cmp& source, const Valeur& lim_func,
2481  const Valeur& lim_der, int num_zone, Cmp& pot) const ;
2482 
2493  virtual void poisson_interne (const Cmp& source, const Valeur& limite,
2494  Param& par, Cmp& pot) const ;
2495 
2500  double integrale_surface (const Cmp& ci, double rayon) const ;
2501 
2506  double integrale_surface (const Scalar& ci, double rayon) const ;
2507 
2508  double integrale_surface_falloff (const Cmp& ci) const ;
2509 
2514  double integrale_surface_infini (const Cmp& ci) const ;
2515 
2520  double integrale_surface_infini (const Scalar& ci) const ;
2521 
2529  void sol_elliptic (Param_elliptic& params,
2530  const Scalar& so, Scalar& uu) const ;
2531 
2532 
2544  void sol_elliptic_boundary (Param_elliptic& params,
2545  const Scalar& so, Scalar& uu, const Mtbl_cf& bound,
2546  double fact_dir, double fact_neu ) const ;
2547 
2552  void sol_elliptic_boundary (Param_elliptic& params,
2553  const Scalar& so, Scalar& uu, const Scalar& bound,
2554  double fact_dir, double fact_neu ) const ;
2555 
2565  void sol_elliptic_no_zec (Param_elliptic& params,
2566  const Scalar& so, Scalar& uu, double val) const ;
2567 
2577  void sol_elliptic_only_zec (Param_elliptic& params,
2578  const Scalar& so, Scalar& uu, double val) const ;
2579 
2585  void sol_elliptic_sin_zec (Param_elliptic& params,
2586  const Scalar& so, Scalar& uu,
2587  double* coefs, double*) const ;
2598  void sol_elliptic_fixe_der_zero (double val,
2599  Param_elliptic& params,
2600  const Scalar& so, Scalar& uu) const ;
2601 
2626  virtual void poisson2d(const Cmp& source_mat, const Cmp& source_quad,
2627  Param& par, Cmp& uu) const ;
2636  const Scalar&, Scalar&) const ;
2645  const Scalar&, Scalar&) const ;
2646 
2675  virtual void dalembert(Param& par, Scalar& fJp1, const Scalar& fJ,
2676  const Scalar& fJm1, const Scalar& source) const ;
2677 
2683  Scalar interpolate_from_map_star(const Scalar& f_s) const ;
2684 
2685  // Building functions for the Coord's
2686  // ----------------------------------
2687  friend Mtbl* map_af_fait_r(const Map* ) ;
2688  friend Mtbl* map_af_fait_tet(const Map* ) ;
2689  friend Mtbl* map_af_fait_phi(const Map* ) ;
2690  friend Mtbl* map_af_fait_sint(const Map* ) ;
2691  friend Mtbl* map_af_fait_cost(const Map* ) ;
2692  friend Mtbl* map_af_fait_sinp(const Map* ) ;
2693  friend Mtbl* map_af_fait_cosp(const Map* ) ;
2694 
2695  friend Mtbl* map_af_fait_x(const Map* ) ;
2696  friend Mtbl* map_af_fait_y(const Map* ) ;
2697  friend Mtbl* map_af_fait_z(const Map* ) ;
2698 
2699  friend Mtbl* map_af_fait_xa(const Map* ) ;
2700  friend Mtbl* map_af_fait_ya(const Map* ) ;
2701  friend Mtbl* map_af_fait_za(const Map* ) ;
2702 
2703  friend Mtbl* map_af_fait_xsr(const Map* ) ;
2704  friend Mtbl* map_af_fait_dxdr(const Map* ) ;
2705  friend Mtbl* map_af_fait_drdt(const Map* ) ;
2706  friend Mtbl* map_af_fait_stdrdp(const Map* ) ;
2707  friend Mtbl* map_af_fait_srdrdt(const Map* ) ;
2708  friend Mtbl* map_af_fait_srstdrdp(const Map* ) ;
2709  friend Mtbl* map_af_fait_sr2drdt(const Map* ) ;
2710  friend Mtbl* map_af_fait_sr2stdrdp(const Map* ) ;
2711  friend Mtbl* map_af_fait_d2rdx2(const Map* ) ;
2712  friend Mtbl* map_af_fait_lapr_tp(const Map* ) ;
2713  friend Mtbl* map_af_fait_d2rdtdx(const Map* ) ;
2714  friend Mtbl* map_af_fait_sstd2rdpdx(const Map* ) ;
2715  friend Mtbl* map_af_fait_sr2d2rdt2(const Map* ) ;
2716 
2717 };
2718 
2719  Mtbl* map_af_fait_r(const Map* ) ;
2720  Mtbl* map_af_fait_tet(const Map* ) ;
2721  Mtbl* map_af_fait_phi(const Map* ) ;
2722  Mtbl* map_af_fait_sint(const Map* ) ;
2723  Mtbl* map_af_fait_cost(const Map* ) ;
2724  Mtbl* map_af_fait_sinp(const Map* ) ;
2725  Mtbl* map_af_fait_cosp(const Map* ) ;
2726 
2727  Mtbl* map_af_fait_x(const Map* ) ;
2728  Mtbl* map_af_fait_y(const Map* ) ;
2729  Mtbl* map_af_fait_z(const Map* ) ;
2730 
2731  Mtbl* map_af_fait_xa(const Map* ) ;
2732  Mtbl* map_af_fait_ya(const Map* ) ;
2733  Mtbl* map_af_fait_za(const Map* ) ;
2734 
2735  Mtbl* map_af_fait_xsr(const Map* ) ;
2736  Mtbl* map_af_fait_dxdr(const Map* ) ;
2737  Mtbl* map_af_fait_drdt(const Map* ) ;
2738  Mtbl* map_af_fait_stdrdp(const Map* ) ;
2739  Mtbl* map_af_fait_srdrdt(const Map* ) ;
2740  Mtbl* map_af_fait_srstdrdp(const Map* ) ;
2741  Mtbl* map_af_fait_sr2drdt(const Map* ) ;
2742  Mtbl* map_af_fait_sr2stdrdp(const Map* ) ;
2743  Mtbl* map_af_fait_d2rdx2(const Map* ) ;
2744  Mtbl* map_af_fait_lapr_tp(const Map* ) ;
2745  Mtbl* map_af_fait_d2rdtdx(const Map* ) ;
2746  Mtbl* map_af_fait_sstd2rdpdx(const Map* ) ;
2747  Mtbl* map_af_fait_sr2d2rdt2(const Map* ) ;
2748 
2749 
2750 
2751 
2752  //------------------------------------//
2753  // class Map_et //
2754  //------------------------------------//
2755 
2756 
2757 
2783 class Map_et : public Map_radial {
2784 
2785  // Data :
2786  // ----
2787  private:
2789  double* alpha ;
2791  double* beta ;
2792 
2796  Tbl** aa ;
2797 
2801  Tbl** daa ;
2802 
2806  Tbl** ddaa ;
2807 
2810 
2813 
2818 
2823 
2827  Tbl** bb ;
2828 
2832  Tbl** dbb ;
2833 
2837  Tbl** ddbb ;
2838 
2841 
2844 
2851 
2858 
2859  public:
2866 
2873 
2874  // Constructors, destructor :
2875  // ------------------------
2876  public:
2888  Map_et(const Mg3d& mgrille, const double* r_limits) ;
2889 
2907  Map_et(const Mg3d& mgrille, const double* r_limits,const Tbl& tab);
2908  Map_et(const Map_et& ) ;
2909  Map_et(const Mg3d&, FILE* ) ;
2910 
2911  virtual ~Map_et() ;
2912 
2913  // Assignment
2914  // ----------
2915  public:
2917  virtual void operator=(const Map_et& mp) ;
2918 
2920  virtual void operator=(const Map_af& mpa) ;
2921 
2923  void set_ff(const Valeur& ) ;
2925  void set_gg(const Valeur& ) ;
2926 
2927  // Memory management
2928  // -----------------
2929  private:
2931  void set_coord() ;
2932  protected:
2934  virtual void reset_coord() ;
2935 
2936  private:
2938  void fait_poly() ;
2939 
2940  // Extraction of information
2941  // -------------------------
2942  public:
2946  virtual const Map_af& mp_angu(int) const ;
2947 
2951  const double* get_alpha() const ;
2952 
2956  const double* get_beta() const ;
2957 
2959  const Valeur& get_ff() const ;
2960 
2962  const Valeur& get_gg() const ;
2963 
2973  virtual double val_r(int l, double xi, double theta, double pphi) const ;
2974 
2984  virtual void val_lx(double rr, double theta, double pphi,
2985  int& l, double& xi) const ;
2986 
3005  virtual void val_lx(double rr, double theta, double pphi,
3006  const Param& par, int& l, double& xi) const ;
3007 
3009  virtual bool operator==(const Map& ) const ;
3010 
3020  virtual double val_r_jk(int l, double xi, int j, int k) const ;
3021 
3038  virtual void val_lx_jk(double rr, int j, int k, const Param& par,
3039  int& l, double& xi) const ;
3040 
3041 
3042 
3043  // Outputs
3044  // -------
3045  public:
3046  virtual void sauve(FILE* ) const ;
3047 
3048  private:
3049  virtual ostream& operator>>(ostream &) const ;
3050 
3051  // Modification of the radial scale
3052  // --------------------------------
3053  public:
3058  virtual void homothetie(double lambda) ;
3059 
3069  virtual void resize(int l, double lambda) ;
3070 
3077  void resize_extr(double lambda) ;
3078 
3080  void set_alpha(double alpha0, int l) ;
3081 
3083  void set_beta(double beta0, int l) ;
3084 
3085  // Modification of the mapping
3086  // ---------------------------
3131  virtual void adapt(const Cmp& ent, const Param& par, int nbr_filtre = 0) ;
3132 
3133  // Differential operators:
3134  // ----------------------
3135  public:
3142  virtual void dsdxi(const Cmp& ci, Cmp& resu) const ;
3143 
3150  virtual void dsdr(const Cmp& ci, Cmp& resu) const ;
3151 
3158  virtual void srdsdt(const Cmp& ci, Cmp& resu) const ;
3159 
3167  virtual void srstdsdp(const Cmp& ci, Cmp& resu) const ;
3168 
3176  virtual void dsdxi(const Scalar& uu, Scalar& resu) const ;
3177 
3185  virtual void dsdr(const Scalar& uu, Scalar& resu) const ;
3186 
3195  virtual void dsdradial(const Scalar& uu, Scalar& resu) const ;
3196 
3204  virtual void srdsdt(const Scalar& uu, Scalar& resu) const ;
3205 
3213  virtual void srstdsdp(const Scalar& uu, Scalar& resu) const ;
3214 
3219  virtual void dsdt(const Scalar& uu, Scalar& resu) const ;
3220 
3225  virtual void stdsdp(const Scalar& uu, Scalar& resu) const ;
3226 
3237  virtual void laplacien(const Scalar& uu, int zec_mult_r,
3238  Scalar& lap) const ;
3239 
3241  virtual void laplacien(const Cmp& uu, int zec_mult_r,
3242  Cmp& lap) const ;
3243 
3250  virtual void lapang(const Scalar& uu, Scalar& lap) const ;
3251 
3252 
3263  virtual void primr(const Scalar& uu, Scalar& resu,
3264  bool null_infty) const ;
3265 
3266 
3274  virtual Tbl* integrale(const Cmp&) const ;
3275 
3276 
3277  // PDE resolution :
3278  // --------------
3279  public:
3317  virtual void poisson(const Cmp& source, Param& par, Cmp& uu) const ;
3318 
3356  virtual void poisson_tau(const Cmp& source, Param& par, Cmp& uu) const ;
3357 
3358  virtual void poisson_falloff(const Cmp& source, Param& par, Cmp& uu,
3359  int k_falloff) const ;
3360 
3361  virtual void poisson_ylm(const Cmp& source, Param& par, Cmp& uu,
3362  int nylm, double* intvec) const ;
3363 
3399  virtual void poisson_regular(const Cmp& source, int k_div, int nzet,
3400  double unsgam1, Param& par, Cmp& uu,
3401  Cmp& uu_regu, Cmp& uu_div,
3402  Tenseur& duu_div, Cmp& source_regu,
3403  Cmp& source_div) const ;
3404 
3422  virtual void poisson_angu(const Scalar& source, Param& par,
3423  Scalar& uu, double lambda=0) const ;
3424  virtual void poisson_angu(const Cmp& source, Param& par,
3425  Cmp& uu, double lambda=0) const ;
3426 
3450  virtual Param* donne_para_poisson_vect (Param& para, int i) const ;
3451 
3455  virtual void poisson_frontiere (const Cmp&, const Valeur&, int, int,
3456  Cmp&, double = 0., double = 0.) const ;
3457  virtual void poisson_frontiere_double (const Cmp& source,
3458  const Valeur& lim_func, const Valeur& lim_der,
3459  int num_zone, Cmp& pot) const ;
3460 
3471  virtual void poisson_interne (const Cmp& source, const Valeur& limite,
3472  Param& par, Cmp& pot) const ;
3473 
3474 
3513  virtual void poisson2d(const Cmp& source_mat, const Cmp& source_quad,
3514  Param& par, Cmp& uu) const ;
3515 
3519  virtual void dalembert(Param& par, Scalar& fJp1, const Scalar& fJ,
3520  const Scalar& fJm1, const Scalar& source) const ;
3521 
3522 
3523 
3524 
3525  // Building functions for the Coord's
3526  // ----------------------------------
3527  friend Mtbl* map_et_fait_r(const Map* ) ;
3528  friend Mtbl* map_et_fait_tet(const Map* ) ;
3529  friend Mtbl* map_et_fait_phi(const Map* ) ;
3530  friend Mtbl* map_et_fait_sint(const Map* ) ;
3531  friend Mtbl* map_et_fait_cost(const Map* ) ;
3532  friend Mtbl* map_et_fait_sinp(const Map* ) ;
3533  friend Mtbl* map_et_fait_cosp(const Map* ) ;
3534 
3535  friend Mtbl* map_et_fait_x(const Map* ) ;
3536  friend Mtbl* map_et_fait_y(const Map* ) ;
3537  friend Mtbl* map_et_fait_z(const Map* ) ;
3538 
3539  friend Mtbl* map_et_fait_xa(const Map* ) ;
3540  friend Mtbl* map_et_fait_ya(const Map* ) ;
3541  friend Mtbl* map_et_fait_za(const Map* ) ;
3542 
3543  friend Mtbl* map_et_fait_xsr(const Map* ) ;
3544  friend Mtbl* map_et_fait_dxdr(const Map* ) ;
3545  friend Mtbl* map_et_fait_drdt(const Map* ) ;
3546  friend Mtbl* map_et_fait_stdrdp(const Map* ) ;
3547  friend Mtbl* map_et_fait_srdrdt(const Map* ) ;
3548  friend Mtbl* map_et_fait_srstdrdp(const Map* ) ;
3549  friend Mtbl* map_et_fait_sr2drdt(const Map* ) ;
3550  friend Mtbl* map_et_fait_sr2stdrdp(const Map* ) ;
3551  friend Mtbl* map_et_fait_d2rdx2(const Map* ) ;
3552  friend Mtbl* map_et_fait_lapr_tp(const Map* ) ;
3553  friend Mtbl* map_et_fait_d2rdtdx(const Map* ) ;
3554  friend Mtbl* map_et_fait_sstd2rdpdx(const Map* ) ;
3555  friend Mtbl* map_et_fait_sr2d2rdt2(const Map* ) ;
3556 
3557  friend Mtbl* map_et_fait_rsxdxdr(const Map* ) ;
3558  friend Mtbl* map_et_fait_rsx2drdx(const Map* ) ;
3559 
3560 };
3561 
3562  Mtbl* map_et_fait_r(const Map* ) ;
3563  Mtbl* map_et_fait_tet(const Map* ) ;
3564  Mtbl* map_et_fait_phi(const Map* ) ;
3565  Mtbl* map_et_fait_sint(const Map* ) ;
3566  Mtbl* map_et_fait_cost(const Map* ) ;
3567  Mtbl* map_et_fait_sinp(const Map* ) ;
3568  Mtbl* map_et_fait_cosp(const Map* ) ;
3569 
3570  Mtbl* map_et_fait_x(const Map* ) ;
3571  Mtbl* map_et_fait_y(const Map* ) ;
3572  Mtbl* map_et_fait_z(const Map* ) ;
3573 
3574  Mtbl* map_et_fait_xa(const Map* ) ;
3575  Mtbl* map_et_fait_ya(const Map* ) ;
3576  Mtbl* map_et_fait_za(const Map* ) ;
3577 
3578  Mtbl* map_et_fait_xsr(const Map* ) ;
3579  Mtbl* map_et_fait_dxdr(const Map* ) ;
3580  Mtbl* map_et_fait_drdt(const Map* ) ;
3581  Mtbl* map_et_fait_stdrdp(const Map* ) ;
3582  Mtbl* map_et_fait_srdrdt(const Map* ) ;
3583  Mtbl* map_et_fait_srstdrdp(const Map* ) ;
3584  Mtbl* map_et_fait_sr2drdt(const Map* ) ;
3585  Mtbl* map_et_fait_sr2stdrdp(const Map* ) ;
3586  Mtbl* map_et_fait_d2rdx2(const Map* ) ;
3587  Mtbl* map_et_fait_lapr_tp(const Map* ) ;
3588  Mtbl* map_et_fait_d2rdtdx(const Map* ) ;
3589  Mtbl* map_et_fait_sstd2rdpdx(const Map* ) ;
3590  Mtbl* map_et_fait_sr2d2rdt2(const Map* ) ;
3591 
3592  Mtbl* map_et_fait_rsxdxdr(const Map* ) ;
3593  Mtbl* map_et_fait_rsx2drdx(const Map* ) ;
3594 
3595  //------------------------------------//
3596  // class Map_log //
3597  //------------------------------------//
3598 
3599 #define AFFINE 0
3600 #define LOG 1
3601 
3616 class Map_log : public Map_radial {
3617 
3618  // Data :
3619  // ----
3620  private:
3629 
3630  public:
3637 
3638  private:
3639  void set_coord() ;
3640 
3641  // Constructors, destructor :
3642  // ------------------------
3643  public:
3656  Map_log (const Mg3d& mgrille, const Tbl& r_limits, const Itbl& typevar) ;
3657 
3658 
3659  Map_log (const Map_log& ) ;
3660  Map_log (const Mg3d&, FILE* ) ;
3661 
3662  virtual ~Map_log() ;
3663 
3667  virtual const Map_af& mp_angu(int) const ;
3668 
3670  double get_alpha (int l) const {return alpha(l) ;} ;
3672  double get_beta (int l) const {return beta(l) ;} ;
3674  int get_type (int l) const {return type_var(l) ;} ;
3675 
3683  void sol_elliptic (Param_elliptic& params,
3684  const Scalar& so, Scalar& uu) const ;
3685 
3686 
3698  void sol_elliptic_boundary (Param_elliptic& params,
3699  const Scalar& so, Scalar& uu, const Mtbl_cf& bound,
3700  double fact_dir, double fact_neu ) const ;
3701 
3705  void sol_elliptic_boundary (Param_elliptic& params,
3706  const Scalar& so, Scalar& uu, const Scalar& bound,
3707  double fact_dir, double fact_neu ) const ;
3708 
3709 
3719  void sol_elliptic_no_zec (Param_elliptic& params,
3720  const Scalar& so, Scalar& uu, double) const ;
3721 
3722 
3723  virtual void sauve(FILE*) const ;
3724 
3726  virtual void operator=(const Map_af& mpa) ;
3727 
3728 
3729  virtual ostream& operator>> (ostream&) const ;
3730 
3740  virtual double val_r (int l, double xi, double theta, double pphi) const ;
3741 
3751  virtual void val_lx (double rr, double theta, double pphi, int& l, double& xi) const ;
3752 
3762  virtual void val_lx (double rr, double theta, double pphi, const Param& par, int& l, double& xi) const ;
3763 
3764 
3765  virtual bool operator== (const Map&) const ;
3766 
3776  virtual double val_r_jk (int l, double xi, int j, int k) const ;
3777 
3787  virtual void val_lx_jk (double rr, int j, int k, const Param& par, int& l, double& xi) const ;
3788 
3795  virtual void dsdr (const Scalar& ci, Scalar& resu) const ;
3796 
3803  virtual void dsdxi (const Scalar& ci, Scalar& resu) const ;
3804 
3813  virtual void dsdradial (const Scalar& uu, Scalar& resu) const ;
3814 
3815  virtual void homothetie (double) ;
3816  virtual void resize (int, double) ;
3817  virtual void adapt (const Cmp&, const Param&, int) ;
3818  virtual void dsdr (const Cmp&, Cmp&) const ;
3819  virtual void dsdxi (const Cmp&, Cmp&) const ;
3820  virtual void srdsdt (const Cmp&, Cmp&) const ;
3821  virtual void srstdsdp (const Cmp&, Cmp&) const ;
3822  virtual void srstdsdp (const Scalar&, Scalar&) const ;
3823  virtual void srdsdt (const Scalar&, Scalar&) const ;
3824  virtual void dsdt (const Scalar&, Scalar&) const ;
3825  virtual void stdsdp (const Scalar&, Scalar&) const ;
3826  virtual void laplacien (const Scalar&, int, Scalar&) const ;
3827  virtual void laplacien (const Cmp&, int, Cmp&) const ;
3828  virtual void lapang (const Scalar&, Scalar&) const ;
3829  virtual void primr(const Scalar&, Scalar&, bool) const ;
3830  virtual Tbl* integrale (const Cmp&) const ;
3831  virtual void poisson (const Cmp&, Param&, Cmp&) const ;
3832  virtual void poisson_tau (const Cmp&, Param&, Cmp&) const ;
3833  virtual void poisson_falloff(const Cmp&, Param&, Cmp&, int) const ;
3834  virtual void poisson_ylm(const Cmp&, Param&, Cmp&, int, double*) const ;
3835  virtual void poisson_regular (const Cmp&, int, int, double, Param&, Cmp&, Cmp&, Cmp&,
3836  Tenseur&, Cmp&, Cmp&) const ;
3837  virtual void poisson_angu (const Scalar&, Param&, Scalar&, double=0) const ;
3838  virtual void poisson_angu (const Cmp&, Param&, Cmp&, double=0) const ;
3839  virtual Param* donne_para_poisson_vect (Param&, int) const ;
3840  virtual void poisson_frontiere (const Cmp&, const Valeur&, int, int, Cmp&, double = 0., double = 0.) const ;
3841  virtual void poisson_frontiere_double (const Cmp&, const Valeur&, const Valeur&, int, Cmp&) const ;
3842  virtual void poisson_interne (const Cmp&, const Valeur&, Param&, Cmp&) const ;
3843  virtual void poisson2d (const Cmp&, const Cmp&, Param&, Cmp&) const ;
3844  virtual void dalembert (Param&, Scalar&, const Scalar&, const Scalar&, const Scalar&) const ;
3845 
3846 
3847  // Building functions for the Coord's
3848  // ----------------------------------
3849  friend Mtbl* map_log_fait_r(const Map* ) ;
3850  friend Mtbl* map_log_fait_tet(const Map* ) ;
3851  friend Mtbl* map_log_fait_phi(const Map* ) ;
3852  friend Mtbl* map_log_fait_sint(const Map* ) ;
3853  friend Mtbl* map_log_fait_cost(const Map* ) ;
3854  friend Mtbl* map_log_fait_sinp(const Map* ) ;
3855  friend Mtbl* map_log_fait_cosp(const Map* ) ;
3856 
3857  friend Mtbl* map_log_fait_x(const Map* ) ;
3858  friend Mtbl* map_log_fait_y(const Map* ) ;
3859  friend Mtbl* map_log_fait_z(const Map* ) ;
3860 
3861  friend Mtbl* map_log_fait_xa(const Map* ) ;
3862  friend Mtbl* map_log_fait_ya(const Map* ) ;
3863  friend Mtbl* map_log_fait_za(const Map* ) ;
3864 
3865  friend Mtbl* map_log_fait_xsr(const Map* ) ;
3866  friend Mtbl* map_log_fait_dxdr(const Map* ) ;
3867  friend Mtbl* map_log_fait_drdt(const Map* ) ;
3868  friend Mtbl* map_log_fait_stdrdp(const Map* ) ;
3869  friend Mtbl* map_log_fait_srdrdt(const Map* ) ;
3870  friend Mtbl* map_log_fait_srstdrdp(const Map* ) ;
3871  friend Mtbl* map_log_fait_sr2drdt(const Map* ) ;
3872  friend Mtbl* map_log_fait_sr2stdrdp(const Map* ) ;
3873  friend Mtbl* map_log_fait_d2rdx2(const Map* ) ;
3874  friend Mtbl* map_log_fait_lapr_tp(const Map* ) ;
3875  friend Mtbl* map_log_fait_d2rdtdx(const Map* ) ;
3876  friend Mtbl* map_log_fait_sstd2rdpdx(const Map* ) ;
3877  friend Mtbl* map_log_fait_sr2d2rdt2(const Map* ) ;
3878  friend Mtbl* map_log_fait_dxdlnr(const Map* ) ;
3879 
3880 };
3881 
3882 Mtbl* map_log_fait_r(const Map* ) ;
3883 Mtbl* map_log_fait_tet(const Map* ) ;
3884 Mtbl* map_log_fait_phi(const Map* ) ;
3885 Mtbl* map_log_fait_sint(const Map* ) ;
3886 Mtbl* map_log_fait_cost(const Map* ) ;
3887 Mtbl* map_log_fait_sinp(const Map* ) ;
3888 Mtbl* map_log_fait_cosp(const Map* ) ;
3889 
3890 Mtbl* map_log_fait_x(const Map* ) ;
3891 Mtbl* map_log_fait_y(const Map* ) ;
3892 Mtbl* map_log_fait_z(const Map* ) ;
3893 
3894 Mtbl* map_log_fait_xa(const Map* ) ;
3895 Mtbl* map_log_fait_ya(const Map* ) ;
3896 Mtbl* map_log_fait_za(const Map* ) ;
3897 
3898 Mtbl* map_log_fait_xsr(const Map* ) ;
3899 Mtbl* map_log_fait_dxdr(const Map* ) ;
3900 Mtbl* map_log_fait_drdt(const Map* ) ;
3901 Mtbl* map_log_fait_stdrdp(const Map* ) ;
3902 Mtbl* map_log_fait_srdrdt(const Map* ) ;
3903 Mtbl* map_log_fait_srstdrdp(const Map* ) ;
3904 Mtbl* map_log_fait_sr2drdt(const Map* ) ;
3905 Mtbl* map_log_fait_sr2stdrdp(const Map* ) ;
3906 Mtbl* map_log_fait_d2rdx2(const Map* ) ;
3907 Mtbl* map_log_fait_lapr_tp(const Map* ) ;
3908 Mtbl* map_log_fait_d2rdtdx(const Map* ) ;
3909 Mtbl* map_log_fait_sstd2rdpdx(const Map* ) ;
3910 Mtbl* map_log_fait_sr2d2rdt2(const Map* ) ;
3911 
3912 Mtbl* map_log_fait_dxdlnr (const Map*) ;
3913 
3914 }
3915 
3916  //------------------------//
3917  // Remaining Mappings //
3918  //------------------------//
3919 
3920 #include "map_star.h"
3921 
3922 #endif
Coord xa
Absolute x coordinate.
Definition: map.h:748
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:533
virtual void sauve(FILE *) const
Save in a file.
Definition: map_af.C:619
Tbl beta
Array (size: mg->nzone ) of the values of in each domain.
Definition: map.h:3624
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:1640
Tbl ** bb
Array (size: mg->nzone ) of Tbl which stores the values of in each domain.
Definition: map.h:2827
Coord sr2d2rdt2
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1678
Coord sr2stdrdp
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1629
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:2817
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:607
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:2783
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:825
const double * get_beta() const
Returns a pointer on the array beta (values of in each domain)
Definition: map_et.C:1053
virtual void dsdt(const Scalar &uu, Scalar &resu) const
Computes of a Scalar.
Definition: map_et_deriv.C:632
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 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:667
Multi-domain array.
Definition: mtbl.h:118
double * alpha
Array (size: mg->nzone ) of the values of in each domain.
Definition: map.h:2054
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:788
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:801
double * alpha
Array (size: mg->nzone ) of the values of in each domain.
Definition: map.h:2789
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:3670
Lorene prototypes.
Definition: app_hor.h:67
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:731
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:783
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:1621
int get_type(int l) const
Returns the type of description in the domain l.
Definition: map.h:3674
Tbl bbsx
Values at the nr collocation points of in the nucleus.
Definition: map.h:2840
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:688
double get_ori_x() const
Returns the x coordinate of the origin.
Definition: map.h:786
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 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 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 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:786
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 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:510
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:733
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:569
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:793
Tbl ** ddbb
Array (size: mg->nzone ) of Tbl which stores the values of in each domain.
Definition: map.h:2837
Itbl type_var
Array (size: mg->nzone ) of the type of variable in each domain.
Definition: map.h:3628
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:2801
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:1613
virtual void div_r_zec(Scalar &) const =0
Division by r (in the compactified external domain only) 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 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:737
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:633
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:738
void set_beta(double beta0, int l)
Modifies the value of in domain no. l.
Definition: map_af.C:771
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:739
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:3636
virtual ~Map_af()
Destructor.
Definition: map_af.C:498
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 double val_r(int l, double xi, double theta, double pphi) const =0
Returns the value of the radial coordinate r for a given in a given domain.
virtual void operator=(const Map_af &)=0
Assignment to an affine mapping.
virtual void dalembert(Param &par, Scalar &fJp1, const Scalar &fJ, const Scalar &fJm1, const Scalar &source) const =0
Performs one time-step integration of the d&#39;Alembert scalar equation.
Metric_flat * p_flat_met_spher
Pointer onto the flat metric associated with the spherical coordinates and with components expressed ...
Definition: map.h:720
Map_af(const Mg3d &mgrille, const double *r_limits)
Standard Constructor.
Definition: map_af.C:216
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:2812
Valeur ff
Values of the function at the nt*np angular collocation points in each domain.
Definition: map.h:2850
Coord stdrdp
in the nucleus and in the non-compactified shells; \ in the compactified external domain (CED)...
Definition: map.h:1597
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.
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 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.
Logarithmic radial mapping.
Definition: map.h:3616
Coord dxdr
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1581
virtual void div_rsint(Scalar &) const
Division by of a Scalar.
void sol_elliptic(Param_elliptic &params, const Scalar &so, Scalar &uu) const
General elliptic solver.
double ori_y
Absolute coordinate y of the origin.
Definition: map.h:697
const double * get_beta() const
Returns the pointer on the array beta.
Definition: map_af.C:611
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:698
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
Tbl alpha
Array (size: mg->nzone ) of the values of in each domain.
Definition: map.h:3622
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:2872
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:1557
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:2056
Coord sinp
Definition: map.h:741
Tbl ** aa
Array (size: mg->nzone ) of Tbl which stores the values of in each domain.
Definition: map.h:2796
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 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:1669
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:760
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 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:1570
Metric_flat * p_flat_met_cart
Pointer onto the flat metric associated with the Cartesian coordinates and with components expressed ...
Definition: map.h:725
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 .
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:1589
virtual void dsdr(const Scalar &ci, Scalar &resu) const
Computes of a Scalar.
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
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
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:2865
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 lapang(const Scalar &, Scalar &) const
< Not implemented
Coord ya
Absolute y coordinate.
Definition: map.h:749
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:694
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 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:696
Affine radial mapping.
Definition: map.h:2048
Tbl zaasx2
Values at the nr collocation points of in the outermost compactified domain.
Definition: map.h:2822
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:809
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
Valeur gg
Values of the function at the nt*np angular collocation points in each domain.
Definition: map.h:2857
Coord y
y coordinate centered on the grid
Definition: map.h:745
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 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.
Coord za
Absolute z coordinate.
Definition: map.h:750
Coord lapr_tp
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1652
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:3672
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:742
virtual void poisson(const Cmp &source, Param &par, Cmp &uu) const =0
Computes the solution of a scalar Poisson equation.
double * beta
Array (size: mg->nzone ) of the values of in each domain.
Definition: map.h:2791
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 poisson_angu(const Scalar &, Param &, Scalar &, double=0) 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 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...
Coord x
x coordinate centered on the grid
Definition: map.h:744
Base_vect_spher bvect_spher
Orthonormal vectorial basis associated with the coordinates of the mapping.
Definition: map.h:707
Scalar interpolate_from_map_star(const Scalar &f_s) const
Interpolates from a Scalar defined on a Map_star and returns the new Scalar defined on *this...
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:790
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:744
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
Tbl bbsx2
Values at the nr collocation points of in the nucleus.
Definition: map.h:2843
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 div_cost(Scalar &) const =0
Division by of a Scalar.
Coord srdrdt
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1605
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 void adapt(const Cmp &ent, const Param &par, int nbr=0)
Adaptation of the mapping to a given scalar field.
Definition: map_af.C:803
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:690
Coord z
z coordinate centered on the grid
Definition: map.h:746
virtual void div_r(Scalar &) const =0
Division by r of a Scalar.
double rot_phi
Angle between the x –axis and X –axis.
Definition: map.h:699
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:2832
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:2809
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...
Base_vect_cart bvect_cart
Cartesian basis associated with the coordinates (x,y,z) of the mapping, i.e.
Definition: map.h:715
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:2806
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:736
Coord d2rdtdx
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1661
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 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 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:740