24 char binhor_equations_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Bin_hor/binhor_equations.C,v 1.21 2014/10/13 08:52:42 j_novak Exp $" ;
115 #include "isol_hor.h" 117 #include "utilitaires.h" 127 assert ((relax >0) && (relax<=1)) ;
129 cout <<
"-----------------------------------------------" << endl ;
130 cout <<
"Resolution LAPSE" << endl ;
178 source_un += tmp_un ;
214 source_deux += tmp_deux ;
216 cout <<
"source lapse" << endl <<
norme(source_un) << endl ;
231 lim_un =
hole1.boundary_nn_Dir(lim_nn) ;
232 lim_deux =
hole2.boundary_nn_Dir(lim_nn) ;
234 n_un_temp = n_un_temp - 1./2. ;
235 n_deux_temp = n_deux_temp - 1./2. ;
237 dirichlet_binaire (source_un, source_deux, lim_un, lim_deux,
238 n_un_temp, n_deux_temp, 0, precision) ;
244 lim_un =
hole1.boundary_nn_Neu(lim_nn) ;
245 lim_deux =
hole2.boundary_nn_Neu(lim_nn) ;
247 neumann_binaire (source_un, source_deux, lim_un, lim_deux,
248 n_un_temp, n_deux_temp, 0, precision) ;
253 cout <<
"Unexpected type of boundary conditions for the lapse!" 255 <<
" bound_nn = " << bound_nn << endl ;
262 n_un_temp = n_un_temp + 1./2. ;
263 n_deux_temp = n_deux_temp + 1./2. ;
272 cout <<
"lapse auto" << endl <<
norme (n_un_temp) << endl ;
273 Tbl tdiff_nn =
diffrel(n_un_temp.laplacian(), source_un) ;
276 "Relative error in the resolution of the equation for the lapse : " 278 for (
int l=0; l<nz; l++) {
279 cout << tdiff_nn(l) <<
" " ;
286 n_un_temp = relax*n_un_temp + (1-relax)*lapse_un_old ;
287 n_deux_temp = relax*n_deux_temp + (1-relax)*lapse_deux_old ;
303 assert ((relax>0) && (relax<=1)) ;
305 cout <<
"-----------------------------------------------" << endl ;
306 cout <<
"Resolution PSI" << endl ;
376 cout <<
"source psi" << endl <<
norme(source_un) << endl ;
394 neumann_binaire (source_un, source_deux, lim_un, lim_deux,
395 psi_un_temp, psi_deux_temp, 0, precision) ;
400 cout <<
"Unexpected type of boundary conditions for psi!" 402 <<
" bound_psi = " << bound_psi << endl ;
409 psi_un_temp = psi_un_temp + 1./2. ;
410 psi_deux_temp = psi_deux_temp + 1./2. ;
419 cout <<
"psi auto" << endl <<
norme (psi_un_temp) << endl ;
420 Tbl tdiff_psi =
diffrel(psi_un_temp.laplacian(), source_un) ;
423 "Relative error in the resolution of the equation for psi : " 425 for (
int l=0; l<nz; l++) {
426 cout << tdiff_psi(l) <<
" " ;
433 psi_un_temp = relax*psi_un_temp + (1-relax)*psi_un_old ;
434 psi_deux_temp = relax*psi_deux_temp + (1-relax)*psi_deux_old ;
456 cout <<
"------------------------------------------------" << endl ;
457 cout <<
"Resolution shift : Omega = " <<
omega << endl ;
491 source_un += 2.*
hole1.
nn * ( tmp_vect_un
504 source_un -= vtmp_un ;
534 source_deux += 2.*
hole2.
nn * ( tmp_vect_deux
547 source_deux -= vtmp_deux ;
555 Vector source_1 (source_un) ;
556 Vector source_2 (source_deux) ;
560 cout <<
"source shift_x" << endl <<
norme(source_1(1)) << endl ;
561 cout <<
"source shift_y" << endl <<
norme(source_1(2)) << endl ;
562 cout <<
"source shift_z" << endl <<
norme(source_1(3)) << endl ;
565 for (
int i=1 ; i<=3 ; i++) {
566 source_un.
set(i).filtre(4) ;
567 source_deux.set(i).filtre(4) ;
581 switch (bound_beta) {
585 lim_x_un =
hole1.boundary_beta_x(
omega, omega_eff) ;
586 lim_y_un =
hole1.boundary_beta_y(
omega, omega_eff) ;
587 lim_z_un =
hole1.boundary_beta_z() ;
589 lim_x_deux =
hole2.boundary_beta_x(
omega, omega_eff) ;
590 lim_y_deux =
hole2.boundary_beta_y(
omega, omega_eff) ;
591 lim_z_deux =
hole2.boundary_beta_z() ;
596 cout <<
"Unexpected type of boundary conditions for beta!" 598 <<
" bound_beta = " << bound_beta << endl ;
614 poisson_vect_binaire (1./3., source_un, source_deux,
615 lim_x_un, lim_y_un, lim_z_un,
616 lim_x_deux, lim_y_deux, lim_z_deux,
617 beta1, beta2, 0, precision) ;
623 for (
int i=1 ; i<=3 ; i++) {
628 cout <<
"shift_auto x" << endl <<
norme(beta1(1)) << endl ;
629 cout <<
"shift_auto y" << endl <<
norme(beta1(2)) << endl ;
630 cout <<
"shift_auto z" << endl <<
norme(beta1(3)) << endl ;
643 Tbl tdiff_beta_r =
diffrel(lap_beta(1), source_un(1)) ;
644 Tbl tdiff_beta_t =
diffrel(lap_beta(2), source_un(2)) ;
645 Tbl tdiff_beta_p =
diffrel(lap_beta(3), source_un(3)) ;
648 "Relative error in the resolution of the equation for beta : " 650 cout <<
"r component : " ;
651 for (
int l=0; l<nz; l++) {
652 cout << tdiff_beta_r(l) <<
" " ;
655 cout <<
"t component : " ;
656 for (
int l=0; l<nz; l++) {
657 cout << tdiff_beta_t(l) <<
" " ;
660 cout <<
"p component : " ;
661 for (
int l=0; l<nz; l++) {
662 cout << tdiff_beta_p(l) <<
" " ;
685 omdsdp1.set(2) =
omega * xxa1 ;
689 omdsdp1.set(1) =
omega * yya1 ;
690 omdsdp1.set(2) = -
omega * xxa1 ;
694 omdsdp1.set(1).set_spectral_va()
696 omdsdp1.set(2).set_spectral_va()
698 omdsdp1.set(3).set_spectral_va()
701 omdsdp1.annule_domain(nz-1) ;
713 omdsdp2.set(2) =
omega * xxa2 ;
717 omdsdp2.set(1) =
omega * yya2 ;
718 omdsdp2.set(2) = -
omega * xxa2 ;
722 omdsdp2.set(1).set_spectral_va()
724 omdsdp2.set(2).set_spectral_va()
726 omdsdp2.set(3).set_spectral_va()
729 omdsdp2.annule_domain(nz-1) ;
733 beta1_new = relax*(beta1+
hole1.
decouple*omdsdp1) + (1-relax)*beta_un_old ;
734 beta2_new = relax*(beta2+
hole2.
decouple*omdsdp2) + (1-relax)*beta_deux_old ;
750 for (
int k=0; k<nnp; k++)
751 for (
int j=0; j<nnt; j++){
Coord xa
Absolute x coordinate.
void beta_comp_import(const Single_hor &comp)
Imports the part of due to the companion hole comp.
Base_val ** std_base_vect_cart() const
Returns the standard spectral bases for the Cartesian components of a vector.
void solve_shift(double precis, double relax, int bound_beta, double omega_eff)
Solves the equation for the shift, using the Oohara-Nakarmure scheme : The fields are the total value...
double omega
Angular velocity.
Vector dn
Covariant derivative of the lapse with respect to the flat metric .
Metric tgam
3 metric tilde
void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
Scalar decouple
Function used to construct from the total .
const Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
double & set(int i)
Read/write of a particular element (index i) (1D case)
Scalar n_comp
Lapse function .
double regularisation(const Vector &shift_auto, const Vector &shift_comp, double ang_vel)
Corrects shift_auto in such a way that the total is equal to zero in the horizon, which should ensure the regularity of .
Tensor derive_lie(const Vector &v) const
Computes the Lie derivative of this with respect to some vector field v.
Tensor field of valence 0 (or component of a tensorial field).
Single_hor hole1
Black hole one.
Tensor up_down(const Metric &gam) const
Computes a new tensor by raising or lowering all the indices of *this .
const Scalar & get_psi4() const
Conformal factor .
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field. ...
Values and coefficients of a (real-value) function.
virtual void change_triad(const Base_vect &)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
double get_rot_phi() const
Returns the angle between the x –axis and X –axis.
Sym_tensor aa_auto
Components of the conformal representation of the traceless part of the extrinsic curvature: ...
void set(const Map *mp, Mtbl *(*construct)(const Map *))
Semi-constructor from a mapping and a method.
const Vector & derive_con(const Metric &gam) const
Returns the "contravariant" derivative of *this with respect to some metric , by raising the index of...
Tensor field of valence 1.
const Tensor_sym & get_delta() const
Returns the tensor which defines the connection with respect to the flat one: is the difference bet...
Tbl diffrel(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (norme version).
virtual void dec_dzpuis(int dec=1)
Decreases by dec units the value of dzpuis and changes accordingly the values in the compactified ext...
void annule_hard()
Sets the Scalar to zero in a hard way.
Sym_tensor aa
Components of the conformal representation of the traceless part of the extrinsic curvature: ...
void raccord(int n)
Performs the matching of the nucleus with respect to the first shell.
const Vector & divergence(const Metric &) const
Returns the divergence of this with respect to a Metric .
Tbl norme(const Cmp &)
Sums of the absolute values of all the values of the Cmp in each domain.
const Valeur boundary_psi_app_hor() const
Neumann boundary condition for.
Scalar psi
Conformal factor .
Scalar trK
Trace of the extrinsic curvature.
virtual void inc_dzpuis(int inc=1)
Increases by inc units the value of dzpuis and changes accordingly the values of the Scalar in the co...
double regul
Intensity of the correction on the shift vector.
void solve_psi(double precis, double relax, int bound_psi)
Solves the equation for the conformal factor : The fields are the total values excpet those with subs...
Sym_tensor hh
Deviation metric.
virtual const Connection & connect() const
Returns the connection.
Vector beta_auto
Shift function .
int get_nzone() const
Returns the number of domains.
const Scalar & divergence(const Metric &) const
The divergence of this with respect to a Metric .
Scalar n_auto
Lapse function .
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
const Tensor & derive_cov(const Metric &gam) const
Returns the covariant derivative of this with respect to some metric .
Single_hor hole2
Black hole two.
virtual void inc_dzpuis(int inc=1)
Increases by inc units the value of dzpuis and changes accordingly the values in the compactified ext...
Vector dpsi
Covariant derivative of the conformal factor .
Coord ya
Absolute y coordinate.
const Tensor & derive_con(const Metric &gam) const
Returns the "contravariant" derivative of this with respect to some metric , by raising the last inde...
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping, i.e.
void solve_lapse(double precis, double relax, int bound_nn, double lim_nn)
Solves the equation for the lapse : The fields are the total values except those with subscript ...
Map_af & mp
Affine mapping.
Scalar & set(const Itbl &ind)
Returns the value of a component (read/write version).
void n_comp_import(const Single_hor &comp)
Imports the part of N due to the companion hole comp .
Sym_tensor gamt_point
Time derivative of the 3-metric tilde.
void psi_comp_import(const Single_hor &comp)
Imports the part of due to the companion hole comp .
Scalar trK_point
Time derivative of the trace of the extrinsic curvature.
Scalar psi_auto
Conformal factor .
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
Scalar & set(int)
Read/write access to a component.
Metric_flat ff
3 metric flat
const Vector & derive_cov(const Metric &gam) const
Returns the gradient (1-form = covariant vector) of *this.
virtual void std_spectral_base()
Sets the standard spectal bases of decomposition for each component.
Class intended to describe valence-2 symmetric tensors.
Scalar nn
Lapse function .