LORENE
proto.h
1 /*
2  * Prototypes of non class-member functions
3  *
4  */
5 
6 /*
7  * Copyright (c) 1999-2000 Jean-Alain Marck
8  * Copyright (c) 1999-2001 Philippe Grandclement
9  * Copyright (c) 1999-2002 Eric Gourgoulhon
10  * Copyright (c) 2002-2003 Jerome Novak
11  *
12  * This file is part of LORENE.
13  *
14  * LORENE is free software; you can redistribute it and/or modify
15  * it under the terms of the GNU General Public License as published by
16  * the Free Software Foundation; either version 2 of the License, or
17  * (at your option) any later version.
18  *
19  * LORENE is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU General Public License for more details.
23  *
24  * You should have received a copy of the GNU General Public License
25  * along with LORENE; if not, write to the Free Software
26  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27  *
28  */
29 
30 
31 #ifndef __PROTO_H_
32 #define __PROTO_H_
33 
34 
35 /*
36  * $Id: proto.h,v 1.52 2021/11/24 13:12:17 g_servignat Exp $
37  * $Log: proto.h,v $
38  * Revision 1.52 2021/11/24 13:12:17 g_servignat
39  * Addition of new method mult_xm1_shell(int) to multiply by (\xi +1) in a given shell.
40  *
41  * Revision 1.51 2014/10/13 08:52:36 j_novak
42  * Lorene classes and functions now belong to the namespace Lorene.
43  *
44  * Revision 1.50 2013/06/13 14:18:18 j_novak
45  * Inclusion of new bases R_LEG, R_LEGP and R_LEGI.
46  *
47  * Revision 1.49 2013/06/06 15:31:31 j_novak
48  * Functions to compute Legendre coefficients (not fully tested yet).
49  *
50  * Revision 1.48 2013/06/05 15:06:10 j_novak
51  * Legendre bases are treated as standard bases, when the multi-grid
52  * (Mg3d) is built with BASE_LEG.
53  *
54  * Revision 1.47 2010/10/22 08:08:40 j_novak
55  * Removal of the method Star_rot_dirac::lambda_grv2() and call to the C++ version of integrale2d.
56  *
57  * Revision 1.46 2010/01/20 14:53:50 n_vasset
58  * Adding spectral cutoff functions for use in elliptic tensor equations.
59  *
60  * Revision 1.45 2009/10/23 12:55:46 j_novak
61  * New base T_LEG_MI
62  *
63  * Revision 1.44 2009/10/13 13:50:39 j_novak
64  * New base T_LEG_MP.
65  *
66  * Revision 1.43 2009/08/31 19:39:07 n_vasset
67  * removal of obsolete function get_kerr()
68  *
69  * Revision 1.42 2008/11/27 12:12:38 j_novak
70  * New function to initialize parameters for wave equation.
71  *
72  * Revision 1.41 2008/08/20 11:51:25 n_vasset
73  * new functions to solve the Kerr problem, using degenerate elliptic operators
74  *
75  * Revision 1.40 2008/08/19 06:41:59 j_novak
76  * Minor modifications to avoid warnings with gcc 4.3. Most of them concern
77  * cast-type operations, and constant strings that must be defined as const char*
78  *
79  * Revision 1.39 2008/07/18 12:28:41 j_novak
80  * Corrected some mistakes.
81  *
82  * Revision 1.38 2008/07/18 09:17:35 j_novak
83  * New function tilde_laplacian().
84  *
85  * Revision 1.37 2008/07/11 13:20:08 j_novak
86  * Miscellaneous functions for the system wave equation.
87  *
88  * Revision 1.36 2008/07/10 10:34:35 p_grandclement
89  * forgot this one
90  *
91  * Revision 1.35 2007/12/11 15:28:05 jl_cornou
92  * Jacobi(0,2) polynomials partially implemented
93  *
94  * Revision 1.34 2007/05/06 10:48:08 p_grandclement
95  * Modification of a few operators for the vorton project
96  *
97  * Revision 1.33 2007/01/23 17:08:43 j_novak
98  * New function pois_vect_r0.C to solve the l=0 part of the vector Poisson
99  * equation, which involves only the r-component.
100  *
101  * Revision 1.32 2006/04/27 09:12:29 p_grandclement
102  * First try at irrotational black holes
103  *
104  * Revision 1.31 2006/04/10 15:19:18 j_novak
105  * New definition of 1D operators dsdx and sx in the nucleus (bases R_CHEBP and
106  * R_CHEBI).
107  *
108  * Revision 1.30 2005/11/30 11:09:03 p_grandclement
109  * Changes for the Bin_ns_bh project
110  *
111  * Revision 1.29 2005/08/26 14:02:38 p_grandclement
112  * Modification of the elliptic solver that matches with an oscillatory exterior solution
113  * small correction in Poisson tau also...
114  *
115  * Revision 1.28 2005/06/09 07:56:25 f_limousin
116  * Implement a new function sol_elliptic_boundary() and
117  * Vector::poisson_boundary(...) which solve the vectorial poisson
118  * equation (method 6) with an inner boundary condition.
119  *
120  * Revision 1.27 2005/05/13 08:50:29 j_novak
121  * Added the function int1d_chebi.
122  *
123  * Revision 1.26 2005/02/16 15:04:07 m_forot
124  * Add int1D_cheb function
125  *
126  * Revision 1.25 2005/02/08 10:08:57 f_limousin
127  * Add neumann_binaire(...), dirichlet_binaire(...) and
128  * poisson_vect_binaire(...) with Scalars and Vectors in argument.
129  *
130  * Revision 1.24 2004/12/17 13:35:00 m_forot
131  * Add the case T_LEG
132  *
133  * Revision 1.23 2004/11/23 15:05:40 m_forot
134  * Added prototypes for all new functions in the case there is no
135  * symmetry in theta.
136  *
137  * Revision 1.22 2004/09/28 15:59:47 f_limousin
138  * Add function poisson_vect_boundary which is the same as
139  * poisson_vect_frontiere but for the new classes Tensor and Scalar.
140  *
141  * Revision 1.21 2004/08/24 09:14:40 p_grandclement
142  * Addition of some new operators, like Poisson in 2d... It now requieres the
143  * GSL library to work.
144  *
145  * Also, the way a variable change is stored by a Param_elliptic is changed and
146  * no longer uses Change_var but rather 2 Scalars. The codes using that feature
147  * will requiere some modification. (It should concern only the ones about monopoles)
148  *
149  * Revision 1.20 2004/06/22 08:49:57 p_grandclement
150  * Addition of everything needed for using the logarithmic mapping
151  *
152  * Revision 1.19 2004/03/17 15:58:47 p_grandclement
153  * Slight modification of sol_elliptic_no_zec
154  *
155  * Revision 1.18 2004/02/17 09:21:38 j_novak
156  * New functions for calculating values of the derivatives of a function
157  * using its Chebyshev coefficients.
158  *
159  * Revision 1.17 2004/02/11 09:47:44 p_grandclement
160  * Addition of a new elliptic solver, matching with the homogeneous solution
161  * at the outer shell and not solving in the external domain (more details
162  * coming soon ; check your local Lorene dealer...)
163  *
164  * Revision 1.16 2004/02/09 08:55:30 j_novak
165  * Corrected error in the arguments of _solp_r_chebu_cinq
166  *
167  * Revision 1.15 2004/02/06 10:53:51 j_novak
168  * New dzpuis = 5 -> dzpuis = 3 case (not ready yet).
169  *
170  * Revision 1.14 2004/01/28 16:46:22 p_grandclement
171  * Addition of the sol_elliptic_fixe_der_zero stuff
172  *
173  * Revision 1.13 2004/01/15 09:15:36 p_grandclement
174  * Modification and addition of the Helmholtz operators
175  *
176  * Revision 1.12 2003/12/11 14:48:47 p_grandclement
177  * Addition of ALL (and that is a lot !) the files needed for the general elliptic solver ... UNDER DEVELOPEMENT...
178  *
179  * Revision 1.11 2003/09/16 13:07:40 j_novak
180  * New files for coefficient trnasformation to/from the T_LEG_II base.
181  *
182  * Revision 1.10 2003/09/16 08:53:05 j_novak
183  * Addition of the T_LEG_II base (odd in theta, only for odd m) and the
184  * transformation functions from and to T_SIN_P.
185  *
186  * Revision 1.9 2003/06/18 08:45:26 j_novak
187  * In class Mg3d: added the member get_radial, returning only a radial grid
188  * For dAlembert solver: the way the coefficients of the operator are defined has been changed.
189  *
190  * Revision 1.8 2003/02/13 16:40:24 p_grandclement
191  * Addition of various things for the Bin_ns_bh project, non of them being
192  * completely tested
193  *
194  * Revision 1.7 2002/11/12 17:45:19 j_novak
195  * Added transformation function for T_COS basis.
196  *
197  * Revision 1.6 2002/09/09 13:00:39 e_gourgoulhon
198  * Modification of declaration of Fortran 77 prototypes for
199  * a better portability (in particular on IBM AIX systems):
200  * All Fortran subroutine names are now written F77_* and are
201  * defined in the new file C++/Include/proto_f77.h.
202  *
203  * Revision 1.5 2002/05/11 12:39:08 e_gourgoulhon
204  * Added declaration of som_tet_cossin_si.
205  *
206  * Revision 1.4 2002/05/05 16:24:48 e_gourgoulhon
207  * Added som_tet_cossin_sp
208  *
209  * Revision 1.3 2002/01/03 15:30:27 j_novak
210  * Some comments modified.
211  *
212  * Revision 1.2 2002/01/02 14:07:56 j_novak
213  * Dalembert equation is now solved in the shells. However, the number of
214  * points in theta and phi must be the same in each domain. The solver is not
215  * completely tested (beta version!).
216  *
217  * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
218  * LORENE
219  *
220  * Revision 2.69 2001/05/07 09:11:26 phil
221  * *** empty log message ***
222  *
223  * Revision 2.68 2001/04/03 12:41:23 phil
224  * modification de itemax dans separation
225  *
226  * Revision 2.67 2001/03/22 10:40:13 phil
227  * modification prototypage se separation
228  *
229  * Revision 2.66 2001/03/02 10:21:26 phil
230  * *** empty log message ***
231  *
232  * Revision 2.65 2001/03/02 10:18:47 phil
233  * modif parametrage separation
234  *
235  * Revision 2.64 2001/02/28 11:23:30 phil
236  * ajout separation
237  *
238  * Revision 2.63 2001/01/29 14:30:10 phil
239  * ajout type rotation
240  *
241  * Revision 2.62 2000/12/13 15:42:14 phil
242  * ajout des trucs relatifs a Lindquist
243  *
244  * Revision 2.61 2000/12/04 13:33:28 novak
245  * *** empty log message ***
246  *
247  * Revision 2.60 2000/12/04 13:29:08 novak
248  * Added prototypes for the dalembertian
249  *
250  * Revision 2.59 2000/10/19 10:07:49 phil
251  * ajout de regle
252  *
253  * Revision 2.58 2000/10/19 09:35:44 phil
254  * *** empty log message ***
255  *
256  * Revision 2.57 2000/10/04 14:40:34 eric
257  * *** empty log message ***
258  *
259  * Revision 2.56 2000/09/29 14:02:06 eric
260  * *** empty log message ***
261  *
262  * Revision 2.55 2000/09/28 10:01:36 eric
263  * *** empty log message ***
264  *
265  * Revision 2.54 2000/09/08 16:26:26 eric
266  * *** empty log message ***
267  *
268  * Revision 2.53 2000/09/08 16:07:43 eric
269  * *** empty log message ***
270  *
271  * Revision 2.52 2000/09/07 15:07:40 eric
272  * *** empty log message ***
273  *
274  * Revision 2.51 2000/09/06 13:59:53 eric
275  * *** empty log message ***
276  *
277  * Revision 2.50 2000/06/06 12:42:55 phil
278  * ajout de Cmp division_xpun (const Cmp&,int)
279  *
280  * Revision 2.49 2000/05/22 13:33:15 phil
281  * ajout des trucs pour poisson avec dzpuis == 3
282  *
283  * Revision 2.48 2000/04/03 17:01:01 phil
284  * ajout de sxpun_1d
285  *
286  * Revision 2.47 2000/03/16 16:28:30 phil
287  * *** empty log message ***
288  *
289  * Revision 2.46 2000/03/09 13:52:55 phil
290  * *** empty log message ***
291  *
292  * Revision 2.45 2000/03/09 13:42:34 phil
293  * vire les trucs relatifs a Poisson compacts
294  *
295  * Revision 2.44 2000/03/06 10:27:07 eric
296  * Ajout des protos som_*_symy et som_*_asymy.
297  *
298  * Revision 2.43 2000/01/20 14:07:59 phil
299  * vire poisson_vect et xksk
300  *
301  * Revision 2.42 1999/12/15 09:41:52 eric
302  * *** empty log message ***
303  *
304  *
305  * $Header: /cvsroot/Lorene/C++/Include/proto.h,v 1.52 2021/11/24 13:12:17 g_servignat Exp $
306  *
307  */
308 
309 namespace Lorene {
310 class Param ;
311 class Tbl ;
312 class Mtbl ;
313 class Mtbl_cf ;
314 class Map_af ;
315 class Matrice ;
316 class Valeur ;
317 class Base_val ;
318 class Cmp ;
319 class Tenseur ;
320 class Scalar ;
321 class Tensor ;
322 class Sym_tensor ;
323 class Vector ;
324 class Param_elliptic ;
325 
326 
327 // Routines calcul de coefficients
328 // -------------------------------
329 double* cheb_ini(const int) ;
330 double* chebimp_ini(const int) ;
331 void four1d(const int, double* ) ;
332 void chebyf1d(const int, double* ) ;
333 void chebyr1d(const int, double* ) ;
334 void cfpcossin(const int* ,const int* , double* ) ;
335 void cfpcossini(const int* ,const int* , double* ) ;
336 void cftcos(const int*, const int*, double*, const int*, double*) ;
337 void cftsin(const int*, const int*, double*, const int*, double*) ;
338 void cftcosp(const int*, const int*, double*, const int*, double*) ;
339 void cftcosi(const int*, const int*, double*, const int*, double*) ;
340 void cftsinp(const int*, const int*, double*, const int*, double*) ;
341 void cftsini(const int*, const int*, double*, const int*, double*) ;
342 void cftcossincp(const int*, const int*, double*, const int*, double*) ;
343 void cftcossinsi(const int*, const int*, double*, const int*, double*) ;
344 void cftcossinsp(const int*, const int*, double*, const int*, double*) ;
345 void cftcossinci(const int*, const int*, double*, const int*, double*) ;
346 void cftcossins(const int*, const int*, double*, const int*, double*) ;
347 void cftcossinc(const int*, const int*, double*, const int*, double*) ;
348 void cftleg(const int*, const int*, double*, const int*, double*) ;
349 void cftlegmp(const int*, const int*, double*, const int*, double*) ;
350 void cftlegmi(const int*, const int*, double*, const int*, double*) ;
351 void cftlegp(const int*, const int*, double*, const int*, double*) ;
352 void cftlegpp(const int*, const int*, double*, const int*, double*) ;
353 void cftlegi(const int*, const int*, double*, const int*, double*) ;
354 void cftlegip(const int*, const int*, double*, const int*, double*) ;
355 void cftlegpi(const int*, const int*, double*, const int*, double*) ;
356 void cftlegii(const int*, const int*, double*, const int*, double*) ;
357 void cfrcheb(const int*, const int*, double*, const int*, double*) ;
358 void cfrchebp(const int*, const int*, double*, const int*, double*) ;
359 void cfrchebi(const int*, const int*, double*, const int*, double*) ;
360 void cfrchebpimp(const int*, const int*, double*, const int*, double*) ;
361 void cfrchebpimi(const int*, const int*, double*, const int*, double*) ;
362 void cfrchebpip(const int*, const int*, double*, const int*, double*) ;
363 void cfrchebpii(const int*, const int*, double*, const int*, double*) ;
364 void cipcossin(const int* , const int* , const int* , double* , double* ) ;
365 void cipcossini(const int* , const int* , const int* , double* , double* ) ;
366 void citcos(const int*, const int*, double*, const int*, double*) ;
367 void citcosp(const int*, const int*, double*, const int*, double*) ;
368 void citcosi(const int*, const int*, double*, const int*, double*) ;
369 void citsinp(const int*, const int*, double*, const int*, double*) ;
370 void citsini(const int*, const int*, double*, const int*, double*) ;
371 void citcossincp(const int*, const int*, double*, const int*, double*) ;
372 void citcossinsi(const int*, const int*, double*, const int*, double*) ;
373 void citcossinsp(const int*, const int*, double*, const int*, double*) ;
374 void citcossinci(const int*, const int*, double*, const int*, double*) ;
375 void citcossins(const int*, const int*, double*, const int*, double*) ;
376 void citcossinc(const int*, const int*, double*, const int*, double*) ;
377 void citleg(const int*, const int*, double*, const int*, double*) ;
378 void citlegmp(const int*, const int*, double*, const int*, double*) ;
379 void citlegmi(const int*, const int*, double*, const int*, double*) ;
380 void citlegp(const int*, const int*, double*, const int*, double*) ;
381 void citlegpp(const int*, const int*, double*, const int*, double*) ;
382 void citlegi(const int*, const int*, double*, const int*, double*) ;
383 void citlegip(const int*, const int*, double*, const int*, double*) ;
384 void citlegpi(const int*, const int*, double*, const int*, double*) ;
385 void citlegii(const int*, const int*, double*, const int*, double*) ;
386 void circheb(const int*, const int*, double*, const int*, double*) ;
387 void circhebp(const int*, const int*, double*, const int*, double*) ;
388 void circhebi(const int*, const int*, double*, const int*, double*) ;
389 void cirleg(const int*, const int*, double*, const int*, double*) ;
390 void cirlegp(const int*, const int*, double*, const int*, double*) ;
391 void cirlegi(const int*, const int*, double*, const int*, double*) ;
392 void circhebpimp(const int*, const int*, double*, const int*, double*) ;
393 void circhebpimi(const int*, const int*, double*, const int*, double*) ;
394 void circhebpip(const int*, const int*, double*, const int*, double*) ;
395 void circhebpii(const int*, const int*, double*, const int*, double*) ;
396 double* legendre(int , int ) ;
397 double* legendre_norm(int , int ) ;
398 double* mat_cossincp_legp(int, int) ;
399 double* mat_cossinci_legi(int, int) ;
400 double* mat_cossinc_leg(int, int) ;
401 double* mat_cosp_legpp(int, int) ;
402 double* mat_cosi_legip(int, int) ;
403 double* mat_sini_legpi(int, int) ;
404 double* mat_sinp_legii(int, int) ;
405 double* mat_cos_legmp(int, int) ;
406 double* mat_sin_legmi(int, int) ;
407 double* mat_legp_cossincp(int, int) ;
408 double* mat_legi_cossinci(int, int) ;
409 double* mat_leg_cossinc(int, int) ;
410 double* mat_legpp_cosp(int, int) ;
411 double* mat_legip_cosi(int, int) ;
412 double* mat_legpi_sini(int, int) ;
413 double* mat_legii_sinp(int, int) ;
414 double* mat_legmp_cos(int, int) ;
415 double* mat_legmi_sin(int, int) ;
416 void chb_cossincp_legp(const int* , const double* , double* ) ;
417 void chb_legp_cossincp(const int* , const double* , double* ) ;
418 void chb_cossinc_leg(const int* , const double* , double* ) ;
419 void chb_leg_cossinc(const int* , const double* , double* ) ;
420 void chb_cosp_legpp(const int* , const double* , double* ) ;
421 void chb_legpp_cosp(const int* , const double* , double* ) ;
422 void chb_cosi_legip(const int* , const double* , double* ) ;
423 void chb_legip_cosi(const int* , const double* , double* ) ;
424 void chb_sini_legpi(const int* , const double* , double* ) ;
425 void chb_legpi_sini(const int* , const double* , double* ) ;
426 void chb_cossinci_legi(const int* , const double* , double* ) ;
427 void chb_legi_cossinci(const int* , const double* , double* ) ;
428 void chb_sinp_legii(const int* , const double* , double* ) ;
429 void chb_legii_sinp(const int* , const double* , double* ) ;
430 void chb_cos_legmp(const int* , const double* , double* ) ;
431 void chb_legmp_cos(const int* , const double* , double* ) ;
432 void chb_sin_legmi(const int* , const double* , double* ) ;
433 void chb_legmi_sin(const int* , const double* , double* ) ;
434 
435 double int1d_chebp(int, const double* ) ;
436 double int1d_chebi(int, const double* ) ;
437 double int1d_cheb(int, const double* ) ;
438 
439 //Routines Legendre en r
440 void cirleg(const int*, const int*, double*, const int*, double*) ;
441 void cirlegp(const int*, const int*, double*, const int*, double*) ;
442 void cirlegi(const int*, const int*, double*, const int*, double*) ;
443 void cfrleg(const int*, const int*, double*, const int*, double*) ;
444 void cfrlegp(const int*, const int*, double*, const int*, double*) ;
445 void cfrlegi(const int*, const int*, double*, const int*, double*) ;
446 void legendre_collocation_points(int, double*) ;
447 
448 // Routines Jacobi
449 double* jacobi(int, double) ;
450 double* pointsgausslobatto(int) ;
451 Tbl jacobipointsgl(int) ;
452 double* coeffjaco(int, double*) ;
453 void cfrjaco02(const int*, const int*, double*, const int*, double*);
454 
455 // Routines calcul de coef inverse
456 void cipcossin(const int* , const int* , const int* , double* , double* ) ;
457 void citcosp(const int*, const int*, double*, const int*, double*) ;
458 void citcosi(const int*, const int*, double*, const int*, double*) ;
459 void citcos(const int*, const int*, double*, const int*, double*) ;
460 void citsin(const int*, const int*, double*, const int*, double*) ;
461 void citsinp(const int*, const int*, double*, const int*, double*) ;
462 void citsini(const int*, const int*, double*, const int*, double*) ;
463 void citcossincp(const int*, const int*, double*, const int*, double*) ;
464 void citcossinsi(const int*, const int*, double*, const int*, double*) ;
465 void citcossinsp(const int*, const int*, double*, const int*, double*) ;
466 void citcossinci(const int*, const int*, double*, const int*, double*) ;
467 void citcossins(const int*, const int*, double*, const int*, double*) ;
468 void citcossinc(const int*, const int*, double*, const int*, double*) ;
469 void citlegp(const int*, const int*, double*, const int*, double*) ;
470 void citlegpp(const int*, const int*, double*, const int*, double*) ;
471 void citlegi(const int*, const int*, double*, const int*, double*) ;
472 void circheb(const int*, const int*, double*, const int*, double*) ;
473 void circhebp(const int*, const int*, double*, const int*, double*) ;
474 void circhebi(const int*, const int*, double*, const int*, double*) ;
475 void circhebpimp(const int*, const int*, double*, const int*, double*) ;
476 void circhebpimi(const int*, const int*, double*, const int*, double*) ;
477 void cirjaco02(const int*, const int*, double* , const int*, double*) ;
478 
479 // Routines calculant la matrice du laplacien
480 Matrice _laplacien_mat_pas_prevu(int, int, double, int) ;
481 Matrice _laplacien_mat_r_chebp(int, int, double, int) ;
482 Matrice _laplacien_mat_r_chebi(int, int, double, int) ;
483 Matrice _laplacien_mat_r_chebu(int, int, double, int) ;
484 Matrice _laplacien_mat_r_chebu_deux(int, int) ;
485 Matrice _laplacien_mat_r_chebu_trois(int, int) ;
486 Matrice _laplacien_mat_r_chebu_quatre(int, int) ;
487 Matrice _laplacien_mat_r_chebu_cinq(int, int) ;
488 Matrice _laplacien_mat_r_cheb(int, int, double, int) ;
489 Matrice laplacien_mat(int , int , double , int, int ) ;
490 
491 //Routines de passage a bande versions Matrice et Tbl
492 Matrice _cl_pas_prevu (const Matrice&, int, double, int) ;
493 Matrice _cl_r_cheb (const Matrice&, int, double, int) ;
494 Matrice _cl_r_chebi (const Matrice&, int, double, int) ;
495 Matrice _cl_r_chebu (const Matrice&, int, double, int) ;
496 Matrice _cl_r_chebu_cinq (const Matrice&, int) ;
497 Matrice _cl_r_chebu_quatre (const Matrice&, int) ;
498 Matrice _cl_r_chebu_trois (const Matrice&, int) ;
499 Matrice _cl_r_chebu_deux (const Matrice&, int) ;
500 Matrice _cl_r_chebp (const Matrice&, int, double, int) ;
501 Matrice combinaison (const Matrice&, int, double, int, int) ;
502 
503 Tbl _cl_pas_prevu (const Tbl&, int) ;
504 Tbl _cl_r_cheb (const Tbl&, int) ;
505 Tbl _cl_r_chebi (const Tbl&, int) ;
506 Tbl _cl_r_chebu (const Tbl&, int) ;
507 Tbl _cl_r_chebu_deux (const Tbl&) ;
508 Tbl _cl_r_chebu_trois (const Tbl&) ;
509 Tbl _cl_r_chebu_quatre (const Tbl&) ;
510 Tbl _cl_r_chebu_cinq (const Tbl&) ;
511 Tbl _cl_r_chebp (const Tbl&, int) ;
512 Tbl combinaison (const Tbl&, int, int) ;
513 
514 
515 // Routines de preparation du laplacien inversible
516 Matrice _prepa_nondege_pas_prevu(const Matrice &, int , double, int) ;
517 Matrice _prepa_nondege_r_cheb (const Matrice&, int, double, int) ;
518 Matrice _prepa_nondege_r_chebp (const Matrice&, int, double, int) ;
519 Matrice _prepa_nondege_r_chebi (const Matrice&, int, double, int) ;
520 Matrice _prepa_nondege_r_chebu (const Matrice&, int, double, int) ;
521 Matrice _prepa_nondege_r_chebu_deux (const Matrice&, int) ;
522 Matrice _prepa_nondege_r_chebu_trois (const Matrice&, int) ;
523 Matrice _prepa_nondege_r_chebu_quatre (const Matrice&, int) ;
524 Matrice _prepa_nondege_r_chebu_cinq (const Matrice&, int) ;
525 Matrice prepa_nondege (const Matrice&, int, double, int, int) ;
526 
527 //Routines de calcul de la solution particuliere
528 Tbl _solp_pas_prevu(const Matrice&, const Matrice&, double, double, const Tbl&, int) ;
529 Tbl _solp_r_cheb (const Matrice&, const Matrice&, double, double, const Tbl&, int) ;
530 Tbl _solp_r_chebp (const Matrice&, const Matrice&, double, double, const Tbl&, int) ;
531 Tbl _solp_r_chebi (const Matrice&, const Matrice&, double, double, const Tbl&, int) ;
532 Tbl _solp_r_chebu (const Matrice&, const Matrice&, double, double, const Tbl&, int) ;
533 Tbl _solp_r_chebu_deux (const Matrice&, const Matrice&, const Tbl&) ;
534 Tbl _solp_r_chebu_trois (const Matrice&, const Matrice&, double, const Tbl&) ;
535 Tbl _solp_r_chebu_quatre (const Matrice&, const Matrice&, double, const Tbl&) ;
536 Tbl _solp_r_chebu_cinq (const Matrice&, const Matrice&, const Tbl&) ;
537 Tbl solp (const Matrice&, const Matrice&, double, double, const Tbl&, int, int) ;
538 
539 //Routines de calcul des solutions homogenes
540 Tbl _solh_pas_prevu (int, int, double) ;
541 Tbl _solh_r_cheb (int, int, double) ;
542 Tbl _solh_r_chebp (int, int, double) ;
543 Tbl _solh_r_chebi (int, int, double) ;
544 Tbl _solh_r_chebu (int, int, double) ;
545 Tbl solh (int, int, double, int) ;
546 
547 // Routines helmholtz minus :
548 Matrice helmholtz_minus_mat(int , int, double , double , double, int ) ;
549 Matrice cl_helmholtz_minus (const Matrice&, int) ;
550 Tbl cl_helmholtz_minus (const Tbl&, int) ;
551 Matrice prepa_helmholtz_minus_nondege (const Matrice&, int) ;
552 Tbl solp_helmholtz_minus (const Matrice&, const Matrice&, const Tbl&,
553  double, double, int, int) ;
554 Tbl solh_helmholtz_minus (int, int, double, double, double, int) ;
555 
556 // Routines helmholtz plus :
557 Matrice helmholtz_plus_mat(int , int, double , double , double, int ) ;
558 Matrice cl_helmholtz_plus (const Matrice&, int) ;
559 Tbl cl_helmholtz_plus (const Tbl&, int) ;
560 Matrice prepa_helmholtz_plus_nondege (const Matrice&, int) ;
561 Tbl solp_helmholtz_plus (const Matrice&, const Matrice&, const Tbl&,
562  double, double, int) ;
563 Tbl solh_helmholtz_plus (int, int, double, double, double, int) ;
564 
565 
566 //Routines de calcul des valeurs limites
567 Tbl val_solh (int, double, double, int) ;
568 Tbl val_solp (const Tbl&, double, int) ;
569 
570 double val1_dern_1d (int, const Tbl&, int) ;
571 double valm1_dern_1d (int, const Tbl&, int) ;
572 
573 
574 //Routines de derivations version 1d
575 void _d2sdx2_1d_pas_prevu(int, double*, double* ) ;
576 void _d2sdx2_1d_r_chebu(int, double*, double* ) ;
577 void _d2sdx2_1d_r_cheb(int, double*, double* ) ;
578 void _d2sdx2_1d_r_chebp(int, double*, double* ) ;
579 void _d2sdx2_1d_r_chebi(int, double*, double * ) ;
580 void d2sdx2_1d(int, double** , int) ;
581 
582 void _dsdx_1d_pas_prevu(int, double*, double* ) ;
583 void _dsdx_1d_r_chebu(int, double*, double* ) ;
584 void _dsdx_1d_r_chebp(int, double*, double* ) ;
585 void _dsdx_1d_r_chebi(int, double*, double* ) ;
586 void dsdx_1d(int, double** , int) ;
587 
588 void _multx_1d_pas_prevu(int, double*, double* ) ;
589 void _multx_1d_r_cheb(int, double*, double* ) ;
590 void multx_1d(int, double **, int) ;
591 void multxpun_1d(int, double **, int) ;
592 
593 void _sx_1d_pas_prevu(int, double*, double* ) ;
594 void _sx_1d_r_chebi(int, double*, double* ) ;
595 void _sx_1d_r_chebp(int, double*, double* ) ;
596 void sx_1d(int, double **, int) ;
597 
598 void _sx2_1d_pas_prevu(int, double*, double*) ;
599 void _sx2_1d_identite(int, double*, double*) ;
600 void _sx2_1d_r_chebp(int, double*, double*) ;
601 void _sx2_1d_r_chebi(int, double*, double*) ;
602 void _sxm12_1d_r_chebu(int, double *, double*) ;
603 void sx2_1d(int, double**, int) ;
604 
605 void _sxdsdx_1d_pas_prevu(int, double*, double*) ;
606 void _dsdx_1d_r_cheb(int, double*, double*) ;
607 void _sxdsdx_1d_r_chebi(int, double*, double*) ;
608 void _sxdsdx_1d_r_chebp(int, double*, double*) ;
609 void sxdsdx_1d(int, double** , int) ;
610 
611 //Routines de derivations (pour sol_dalembert)
612 void _dsdx_r_chebp(Tbl *, int &) ;
613 void _dsdx_r_chebi(Tbl *, int &) ;
614 
615 // Resolution de l'equation de Poisson
616 int nullite_plm_sym (int, int, int, int) ;
617 int nullite_plm_nonsym (int, int, int, int) ;
618 int nullite_plm_nonsym_anti (int, int, int, int) ;
619 int nullite_plm (int, int, int, int, Base_val) ;
620 
621 void donne_lm_sym (int, int, int, int, int&, int&, int&) ;
622 void donne_lm_nonsym (int, int, int, int, int&, int&, int&) ;
623 void donne_lm_nonsym_anti (int, int, int, int, int&, int&, int&) ;
624 void donne_lm (int, int, int, int, Base_val, int&, int&, int&) ;
625 
626 
627 // Les sommations en r :
628 void som_r_pas_prevu
629  (double*, const int, const int, const int, const double, double*) ;
630 void som_r_cheb
631  (double*, const int, const int, const int, const double, double*) ;
632 void som_r_chebi
633  (double*, const int, const int, const int, const double, double*) ;
634 void som_r_chebp
635  (double*, const int, const int, const int, const double, double*) ;
636 void som_r_chebu
637  (double*, const int, const int, const int, const double, double*) ;
638 void som_r_chebpim_p
639  (double*, const int, const int, const int, const double, double*) ;
640 void som_r_chebpim_i
641  (double*, const int, const int, const int, const double, double*) ;
642 void som_r_chebpi_p
643  (double*, const int, const int, const int, const double, double*) ;
644 void som_r_chebpi_i
645  (double*, const int, const int, const int, const double, double*) ;
646 void som_r_cheb_symy
647  (double*, const int, const int, const int, const double, double*) ;
648 void som_r_chebu_symy
649  (double*, const int, const int, const int, const double, double*) ;
650 void som_r_chebpim_p_symy
651  (double*, const int, const int, const int, const double, double*) ;
652 void som_r_chebpim_i_symy
653  (double*, const int, const int, const int, const double, double*) ;
654 void som_r_cheb_asymy
655  (double*, const int, const int, const int, const double, double*) ;
656 void som_r_chebu_asymy
657  (double*, const int, const int, const int, const double, double*) ;
658 void som_r_chebpim_p_asymy
659  (double*, const int, const int, const int, const double, double*) ;
660 void som_r_chebpim_i_asymy
661  (double*, const int, const int, const int, const double, double*) ;
662 void som_r_leg
663  (double*, const int, const int, const int, const double, double*) ;
664 void som_r_legi
665  (double*, const int, const int, const int, const double, double*) ;
666 void som_r_legp
667  (double*, const int, const int, const int, const double, double*) ;
668 void som_r_jaco02
669  (double*, const int, const int, const int, const double, double*) ;
670 
671 // Les sommations en theta :
672 void som_tet_pas_prevu
673  (double*, const int, const int, const double, double*) ;
674 void som_tet_cos
675  (double*, const int, const int, const double, double* ) ;
676 void som_tet_cos_p
677  (double*, const int, const int, const double, double* ) ;
678 void som_tet_cos_i
679  (double*, const int, const int, const double, double* ) ;
680 void som_tet_sin
681  (double*, const int, const int, const double, double* ) ;
682 void som_tet_sin_p
683  (double*, const int, const int, const double, double* ) ;
684 void som_tet_sin_i
685  (double*, const int, const int, const double, double* ) ;
686 void som_tet_cossin_cp
687  (double*, const int, const int, const double, double* ) ;
688 void som_tet_cossin_ci
689  (double*, const int, const int, const double, double* ) ;
690 void som_tet_cossin_c
691  (double*, const int, const int, const double, double* ) ;
692 void som_tet_cossin_s
693  (double*, const int, const int, const double, double* ) ;
694 void som_tet_cossin_sp
695  (double*, const int, const int, const double, double* ) ;
696 void som_tet_cossin_si
697  (double*, const int, const int, const double, double* ) ;
698 void som_tet_cossin_cp_symy
699  (double*, const int, const int, const double, double* ) ;
700 void som_tet_cossin_ci_symy
701  (double*, const int, const int, const double, double* ) ;
702 void som_tet_cossin_cp_asymy
703  (double*, const int, const int, const double, double* ) ;
704 void som_tet_cossin_ci_asymy
705  (double*, const int, const int, const double, double* ) ;
706 
707 // Les sommations en phi :
708 void som_phi_pas_prevu
709  (double*, const int, const double, double* ) ;
710 void som_phi_cossin
711  (double*, const int, const double, double* ) ;
712 void som_phi_cossin_p
713  (double*, const int, const double, double* ) ;
714 void som_phi_cossin_i
715  (double*, const int, const double, double* ) ;
716 void som_phi_cossin_symy
717  (double*, const int, const double, double* ) ;
718 void som_phi_cossin_asymy
719  (double*, const int, const double, double* ) ;
720 
721 // les divisions et multiplications par x-1 :
722 void sxm1_1d_cheb(int, double*) ;
723 void mult_xm1_1d_cheb(int, const double*, double*) ;
724 void mult2_xm1_1d_cheb(int, const double*, double*) ;
725 
726 // Multiplication par x+1
727 void mult_xp1_1d_cheb(int, const double*, double*) ;
728 
729 // x * dsdx ...
730 void _xdsdx_1d_pas_prevu (int, double*, double*) ;
731 void _xdsdx_1d_r_cheb (int, double*, double*) ;
732 void _xdsdx_1d_r_chebp (int, double*, double*) ;
733 void _xdsdx_1d_r_chebi (int, double*, double*) ;
734 void xdsdx_1d(int, double**, int) ;
735 
736 // Multiplication par x^2
737 void multx2_1d(int, double **, int) ;
738 void _multx2_1d_r_cheb(int, double* , double *);
739 void _multx2_1d_r_chebp(int, double* , double *);
740 void _multx2_1d_r_chebi(int, double* , double *);
741 void _multx2_1d_pas_prevu(int, double* , double *);
742 
743 // division par (x+1)
744 void sxpun_1d(int, double **, int) ;
745 void _sxpun_1d_r_cheb(int, double* , double *);
746 void _sxpun_1d_pas_prevu(int, double* , double *);
747 Cmp division_xpun (const Cmp&, int) ;
748 
749 // Fonctions liees a la resolution des l'equation des ondes
750 void get_operateur_dal(const Param&, const int&, const int&,
751  int&, Matrice& );
752 Tbl dal_inverse(const int&, const int&, const Matrice&, const Tbl&,
753  const bool) ;
754 Mtbl_cf sol_dalembert(Param&, const Map_af&, const Mtbl_cf&) ;
755 
756 void runge_kutta3_wave_sys(double, const Scalar&, const Scalar&, Scalar& , Scalar&, int dl=0 ) ;
757 void evolve_outgoing_BC(double, int, const Scalar&, Scalar&, Tbl&, Tbl&, Tbl&, int dl=0) ;
758 void tilde_laplacian(const Scalar& B_in, Scalar& tilde_lap, int dl=-1) ;
759 void initialize_outgoing_BC(int, const Scalar& , const Scalar& , Tbl&) ;
760 
761 // Fonctions liees aux operateurs elliptiques degeneres: obtention d'espaces-temps de type Kerr
762 void tensorelliptic ( Scalar source, Scalar& resu, double fitd1, double fit2d1, double fit0d2 = 0., double fit1d2 = 0., double fit0d3 = 0., double fit1d3 = 0.);
763  void tensorellipticBt ( Scalar source, Scalar& resu, double fitd1, double fit2d1, double fit0d2 = 0., double fit1d2 = 0., double fit0d3 = 0., double fit1d3 = 0.);
764 void tensorellipticCt ( Scalar source, Scalar& resu, double fitd1, double fit2d1, double fit0d2, double fit1d2, double fit0d3, double fit1d3);
765 
766  Sym_tensor secmembre_kerr ( const Sym_tensor& hij, const Sym_tensor& aa,const Scalar& nn,const Scalar& ppsi,const Vector& bb);
767 
768  Sym_tensor boundfree_tensBC( Sym_tensor source, Vector Beta, Scalar Psi, Scalar Nn, Sym_tensor hij_guess, double precision , int loopmax = 250) ;
769 
770 // Trucs utilises pour poisson_compact :
771 Matrice lap_cpt_mat(int, int, int) ;
772 Matrice xdsdx_mat(int, int, int) ;
773 Matrice combinaison_cpt (const Matrice &, int, int) ;
774 Tbl combinaison_cpt (const Tbl &, int) ;
775 
776 // Trucs binaires :
777 void dirichlet_binaire (const Cmp& source_un, const Cmp& source_deux,
778  const Valeur& boundary_un, const Valeur& boundary_deux,
779  Cmp& sol_un, Cmp& sol_deux, int num_front,
780  double precision) ;
781 void dirichlet_binaire (const Cmp& source_un, const Cmp& source_deux,
782  double bound_un, double bound_deux,
783  Cmp& sol_un, Cmp& sol_deux, int num_front,
784  double precision) ;
785 void dirichlet_binaire (const Scalar& source_un, const Scalar& source_deux,
786  const Valeur& boundary_un, const Valeur& boundary_deux,
787  Scalar& sol_un, Scalar& sol_deux, int num_front,
788  double precision) ;
789 
790 void neumann_binaire (const Cmp& source_un, const Cmp& source_deux,
791  const Valeur& boundary_un, const Valeur& boundary_deux,
792  Cmp& sol_un, Cmp& sol_deux, int num_front,
793  double precision) ;
794 void neumann_binaire (const Cmp& source_un, const Cmp& source_deux,
795  double bound_un, double bound_deux,
796  Cmp& sol_un, Cmp& sol_deux, int num_front,
797  double precision) ;
798 void neumann_binaire (const Scalar& source_un, const Scalar& source_deux,
799  const Valeur& boundary_un, const Valeur& boundary_deux,
800  Scalar& sol_un, Scalar& sol_deux, int num_front,
801  double precision) ;
802 
803 void poisson_vect_frontiere (double lambda, const Tenseur& source, Tenseur& shift,
804  const Valeur& lim_x, const Valeur& lim_y, const Valeur& lim_z,
805  int num_front, double precision, int itermax) ;
806 void poisson_vect_boundary (double lambda, const Vector& source, Vector& shift,
807  const Valeur& lim_x, const Valeur& lim_y, const Valeur& lim_z,
808  int num_front, double precision, int itermax) ;
809 
810 void poisson_vect_binaire ( double lambda,
811  const Tenseur& source_un, const Tenseur& source_deux,
812  const Valeur& bound_x_un, const Valeur& bound_y_un,
813  const Valeur& bound_z_un, const Valeur& bound_x_deux,
814  const Valeur& bound_y_deux, const Valeur& bound_z_deux,
815  Tenseur& sol_un, Tenseur& sol_deux, int num_front, double precision) ;
816 void poisson_vect_binaire ( double lambda,
817  const Vector& source_un, const Vector& source_deux,
818  const Valeur& bound_x_un, const Valeur& bound_y_un,
819  const Valeur& bound_z_un, const Valeur& bound_x_deux,
820  const Valeur& bound_y_deux, const Valeur& bound_z_deux,
821  Vector& sol_un, Vector& sol_deux, int num_front, double precision) ;
822 
823 // Elliptic solvers :
824 Mtbl_cf elliptic_solver (const Param_elliptic&, const Mtbl_cf&) ;
825 
826 Mtbl_cf elliptic_solver_boundary (const Param_elliptic& ope_var, const Mtbl_cf& source, const Mtbl_cf& bound, double fact_dir, double fact_neu ) ;
827 
828 Mtbl_cf elliptic_solver_no_zec (const Param_elliptic&, const Mtbl_cf&,
829  double val) ;
830 Mtbl_cf elliptic_solver_only_zec (const Param_elliptic&, const Mtbl_cf&,
831  double val) ;
832 Mtbl_cf elliptic_solver_sin_zec (const Param_elliptic&, const Mtbl_cf&, double*, double*) ;
833 Mtbl_cf elliptic_solver_fixe_der_zero (double,
834  const Param_elliptic&,
835  const Mtbl_cf&) ;
836 
837 // Integrale 2D pour les etoiles en rotation
838 double integrale2d(const Scalar&) ;
839 
840 // Solution de la composante r de Poisson vectoriel, pour l=0 uniquement
841 Scalar pois_vect_r0(const Scalar& ) ;
842 
843 // Regularisation du shift :
844 double regle (Tenseur& shift_auto, const Tenseur& shift_comp, double omega, double) ;
845 
846 // Trucs pour la solution de Misner-Lindquist
847 double serie_lindquist_plus (double rayon, double distance, double xa, double ya,
848  double za, double precision, double itemax) ;
849 
850 double serie_lindquist_moins (double rayon, double distance, double xa, double ya,
851  double za, double precision, double itemax) ;
852 
853 double adm_serie (double rayon, double distance, double precision) ;
854 
855 double bare_serie (double rayon, double distance, double precision) ;
856 
857 void set_lindquist (Cmp& psi_un, Cmp& psi_deux, double rayon, double precision) ;
858 
859 void separation (const Cmp& c1, const Cmp& c2, Cmp& res1, Cmp& res2, int decrois,
860  int puiss, int lmax, double precision, const double relax = 0.5, const int itemax = 100, const int flag = 1) ;
861 
862 // Spectral cutoff used in tensor elliptic solvers, and solving for stationary black hole spacetimes
863 
864 void coupe_l_tous( Sym_tensor& hij,Sym_tensor& aa, Scalar& nn,Scalar& ppsi, Vector& bb, int ntt, int cutoff);
865 void tensor_coupe_l( Sym_tensor& ten, int ntt, int cutoff);
866 
867 
868 }
869 #endif
Lorene prototypes.
Definition: app_hor.h:67