23char bhole_equations_bin_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Bhole_binaire/bhole_equations_bin.C,v 1.5 2014/10/13 08:52:40 j_novak Exp $" ;
79#include "utilitaires.h"
86 assert ((relax >0) && (relax<=1)) ;
88 cout <<
"-----------------------------------------------" << endl ;
89 cout <<
"Resolution LAPSE" << endl ;
95 Cmp kk_un (auxi_un(0, 0)+auxi_un(1, 1)+auxi_un(2, 2)) ;
98 Cmp kk_deux (auxi_deux(0, 0)+auxi_deux(1, 1)+auxi_deux(2, 2)) ;
116 dirichlet_binaire (source_un, source_deux, -1., -1.,
hole1.
n_auto.
set(),
136 assert ((relax>0) && (relax<=1)) ;
138 cout <<
"-----------------------------------------------" << endl ;
139 cout <<
"Resolution PSI" << endl ;
145 Cmp kk_un (auxi_un(0, 0)+auxi_un(1, 1)+auxi_un(2, 2)) ;
148 Cmp kk_deux (auxi_deux(0, 0)+auxi_deux(1, 1)+auxi_deux(2, 2)) ;
162 for (
int k=0 ; k<np_un ; k++)
163 for (
int j=0 ; j<nt_un ; j++)
171 for (
int k=0 ; k<np_deux ; k++)
172 for (
int j=0 ; j<nt_deux ; j++)
177 neumann_binaire (source_un, source_deux, lim_un, lim_deux,
198 cout <<
"------------------------------------------------" << endl ;
199 cout <<
"Resolution shift : Omega = " <<
omega << endl ;
205 if (source_un.
get_etat() == ETATZERO) {
207 for (
int i=0 ; i<3 ; i++)
215 if (source_deux.
get_etat() == ETATZERO) {
217 for (
int i=0 ; i<3 ; i++)
223 for (
int i=0 ; i<3 ; i++) {
224 if (source_un(i).get_etat() != ETATZERO)
226 if (source_deux(i).get_etat() != ETATZERO)
232 assert ((orientation_un==0) || (orientation_un == M_PI)) ;
235 assert ((orientation_deux==0) || (orientation_deux == M_PI)) ;
237 int aligne_un = (orientation_un == 0) ? 1 : -1 ;
238 int aligne_deux = (orientation_deux == 0) ? 1 : -1 ;
243 for (
int i=0 ; i<3 ; i++) {
244 if (source_un(i).get_etat() == ETATQCQ)
246 if (source_deux(i).get_etat() == ETATQCQ)
264 xa_mtbl_un = source_un.
get_mp()->
xa ;
265 ya_mtbl_un = source_un.
get_mp()->
ya ;
272 x_mtbl_un = source_un.
get_mp()->
x ;
273 y_mtbl_un = source_un.
get_mp()->
y ;
282 for (
int k=0 ; k<np_un ; k++)
283 for (
int j=0 ; j<nt_un ; j++)
284 lim_x_un.
set(0, k, j, 0) = aligne_un*
omega*ya_mtbl_un(0, 0, 0, 0) + aligne_un*
hole1.
omega_local*y_mtbl_un(1,k,j,0) ;
285 lim_x_un.
base = *bases_un[0] ;
290 for (
int k=0 ; k<np_un ; k++)
291 for (
int j=0 ; j<nt_un ; j++)
292 lim_y_un.
set(0, k, j, 0) = -aligne_un*
omega*xa_mtbl_un(0, 0, 0, 0) - aligne_un*
hole1.
omega_local*x_mtbl_un(1,k,j,0) ;;
293 lim_y_un.
base = *bases_un[1] ;
297 for (
int k=0 ; k<np_un ; k++)
298 for (
int j=0 ; j<nt_un ; j++)
299 lim_z_un.
set(0, k, j, 0) = 0 ;
300 lim_z_un.
base = *bases_un[2] ;
311 xa_mtbl_deux = source_deux.
get_mp()->
xa ;
312 ya_mtbl_deux = source_deux.
get_mp()->
ya ;
319 x_mtbl_deux = source_deux.
get_mp()->
x ;
320 y_mtbl_deux = source_deux.
get_mp()->
y ;
325 for (
int k=0 ; k<np_deux ; k++)
326 for (
int j=0 ; j<nt_deux ; j++)
327 lim_x_deux.
set(0, k, j, 0) = aligne_deux*
omega*ya_mtbl_deux(0, 0, 0, 0) + aligne_deux*
hole2.
omega_local*y_mtbl_deux(1,k,j,0) ;
328 lim_x_deux.
base = *bases_deux[0] ;
333 for (
int k=0 ; k<np_deux ; k++)
334 for (
int j=0 ; j<nt_deux ; j++)
335 lim_y_deux.
set(0, k, j, 0) = -aligne_deux*
omega*xa_mtbl_deux(0, 0, 0, 0) - aligne_deux*
hole2.
omega_local*x_mtbl_deux(1,k,j,0) ;
336 lim_y_deux.
base = *bases_deux[1] ;
340 for (
int k=0 ; k<np_deux ; k++)
341 for (
int j=0 ; j<nt_deux ; j++)
342 lim_z_deux.
set(0, k, j, 0) = 0 ;
343 lim_z_deux.
base = *bases_deux[2] ;
345 for (
int i=0 ; i<3 ; i++) {
347 delete bases_deux[i] ;
350 delete [] bases_deux ;
356 poisson_vect_binaire (1./3., source_un, source_deux,
357 lim_x_un, lim_y_un, lim_z_un,
358 lim_x_deux, lim_y_deux, lim_z_deux,
361 for (
int i=0 ; i<3 ; i++) {
368 (1-relax)*shift_un_old ;
370 (1-relax)*shift_deux_old ;
377 cout <<
"Difference relatives : " << diff_un <<
" " << diff_deux << endl ;
Bases of the spectral expansions.
double omega
Position of the axis of rotation.
Bhole hole1
Black hole one.
void solve_shift(double precis, double relax)
Solves the equation for the shift, using the Oohara-Nakarmure scheme~:
Bhole hole2
Black hole two.
void solve_psi(double precis, double relax)
Solves the equation for the conformal factor~:
void solve_lapse(double precis, double relax)
Solves the equation for the lapse~:
Tenseur psi_auto
Part of generated by the hole.
Tenseur shift_auto
Part of generated by the hole.
double omega_local
local angular velocity
Tenseur_sym tkij_auto
Auto .
double regul
Intensity of the correction on the shift vector.
Tenseur grad_n_tot
Total gradient of N .
Tenseur n_auto
Part of N generated by the hole.
double rayon
Radius of the horizon in LORENE's units.
Map_af & mp
Affine mapping.
Tenseur_sym taij_tot
Total , which must be zero on the horizon of the regularisation on the shift has been done.
void fait_psi_comp(const Bhole &comp)
Imports the part of due to the companion hole comp .
Tenseur_sym tkij_tot
Total .
void fait_n_comp(const Bhole &comp)
Imports the part of N due to the companion hole comp .
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
void std_base_scal()
Sets the spectral bases of the Valeur va to the standard ones for a scalar.
void set_etat_zero()
Sets the logical state to ETATZERO (zero).
void filtre(int n)
Sets the n lasts coefficients in r to 0 in the external domain.
void raccord(int n)
Performs the matching of the nucleus with respect to the first shell.
Coord y
y coordinate centered on the grid
Coord ya
Absolute y coordinate.
Coord x
x coordinate centered on the grid
double get_rot_phi() const
Returns the angle between the x –axis and X –axis.
Coord xa
Absolute x coordinate.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
const Mg3d * get_angu() const
Returns the pointer on the associated angular grid.
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
Base_val ** std_base_vect_cart() const
Returns the standard spectral bases for the Cartesian components of a vector.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Tensor handling *** DEPRECATED : use class Tensor instead ***.
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
const Map * get_mp() const
Returns pointer on the mapping.
const Tenseur & gradient() const
Returns the gradient of *this (Cartesian coordinates)
void set_std_base()
Set the standard spectal basis of decomposition for each component.
void set_etat_zero()
Sets the logical state to ETATZERO (zero state).
int get_etat() const
Returns the logical state.
Values and coefficients of a (real-value) function.
void set_etat_c_qcq()
Sets the logical state to ETATQCQ (ordinary state) for values in the configuration space (Mtbl c ).
Tbl & set(int l)
Read/write of the value in a given domain (configuration space).
Base_val base
Bases on which the spectral expansion is performed.
void std_base_scal()
Sets the bases for spectral expansions (member base ) to the standard ones for a scalar.
Cmp pow(const Cmp &, int)
Power .
Tenseur flat_scalar_prod(const Tenseur &t1, const Tenseur &t2)
Scalar product of two Tenseur when the metric is : performs the contraction of the last index of t1 w...