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