27char bin_ns_bh_kij_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Bin_ns_bh/bin_ns_bh_kij.C,v 1.11 2014/10/13 08:52:43 j_novak Exp $" ;
84#include "utilitaires.h"
109 for (
int i=0 ; i<3 ; i++)
110 for (
int j=i ; j<3 ; j++)
112 for (
int i=0 ; i<3 ; i++)
126 double lim_ns = distance/2. ;
127 double lim_bh = distance/2. ;
128 double int_ns = lim_ns/3. ;
129 double int_bh = lim_bh/3. ;
145 double xabs, yabs, zabs, air_ns, air_bh, theta, phi ;
148 for (
int l=0 ; l<nz_ns ; l++) {
157 for (
int k=0 ; k<np ; k++)
158 for (
int j=0 ; j<nt ; j++)
159 for (
int i=0 ; i<nr ; i++) {
161 xabs = xabs_ns (l, k, j, i) ;
162 yabs = yabs_ns (l, k, j, i) ;
163 zabs = zabs_ns (l, k, j, i) ;
167 (xabs, yabs, zabs, air_ns, theta, phi) ;
169 (xabs, yabs, zabs, air_bh, theta, phi) ;
171 if (air_ns <= lim_ns)
173 decouple_ns.
set(l, k, j, i) = 1 ;
175 decouple_ns.
set(l, k, j, i) =
176 0.5*
pow(
cos((air_ns-int_ns)*M_PI/2./(lim_ns-int_ns)), 2.)+0.5
179 if (air_bh <= lim_bh)
181 decouple_ns.
set(l, k, j, i) = 0 ;
183 decouple_ns.
set(l, k, j, i) = 0.5*
184 pow(
sin((air_bh-int_bh)*M_PI/2./(lim_bh-int_bh)), 2.)
188 decouple_ns.
set(l, k, j, i) = 0.5 ;
193 for (
int k=0 ; k<np ; k++)
194 for (
int j=0 ; j<nt ; j++)
195 decouple_ns.
set(nz_ns-1, k, j, nr) = 0.5 ;
198 for (
int l=0 ; l<nz_bh ; l++) {
207 for (
int k=0 ; k<np ; k++)
208 for (
int j=0 ; j<nt ; j++)
209 for (
int i=0 ; i<nr ; i++) {
211 xabs = xabs_bh (l, k, j, i) ;
212 yabs = yabs_bh (l, k, j, i) ;
213 zabs = zabs_bh (l, k, j, i) ;
217 (xabs, yabs, zabs, air_ns, theta, phi) ;
219 (xabs, yabs, zabs, air_bh, theta, phi) ;
221 if (air_bh <= lim_bh)
223 decouple_bh.
set(l, k, j, i) = 1 ;
225 decouple_bh.
set(l, k, j, i) = 0.5*
226 pow(
cos((air_bh-int_bh)*M_PI/2./(lim_bh-int_bh)), 2.)+0.5 ;
228 if (air_ns <= lim_ns)
230 decouple_bh.
set(l, k, j, i) = 0 ;
232 decouple_bh.
set(l, k, j, i) = 0.5*
233 pow(
sin((air_ns-int_ns)*M_PI/2./(lim_ns-int_ns)), 2.) ;
237 decouple_bh.
set(l, k, j, i) = 0.5 ;
242 for (
int k=0 ; k<np ; k++)
243 for (
int j=0 ; j<nt ; j++)
244 decouple_bh.
set(nz_bh-1, k, j, nr) = 0.5 ;
261 double norme_hole = 0 ;
262 double norme_star = 0 ;
264 for (
int i=0 ; i<3 ; i++) {
270 bool zero_shift_hole = (norme_hole <1e-14) ?
true : false ;
272 bool zero_shift_star = (norme_star <1e-14) ?
true : false ;
274 assert (zero_shift_hole == zero_shift_star) ;
276 if (zero_shift_star ==
true) {
295 for (
int k=0; k<nnp; k++)
296 for (
int j=0; j<nnt; j++){
305 if (bound_nn != 0 || lim_nn != 0){
325 ns_taij_comp.
set(0, 0).
import(copie_bh(0, 0)) ;
326 ns_taij_comp.
set(0, 1).
import(copie_bh(0, 1)) ;
327 ns_taij_comp.
set(0, 2).
import(copie_bh(0, 2)) ;
328 ns_taij_comp.
set(1, 1).
import(copie_bh(1, 1)) ;
329 ns_taij_comp.
set(1, 2).
import(copie_bh(1, 2)) ;
330 ns_taij_comp.
set(2, 2).
import(copie_bh(2, 2)) ;
365 for (
int i = 0 ; i<3 ; i++)
366 for (
int j = i ; j<3 ; j++) {
374 for (
int lig=0 ; lig<3 ; lig++)
375 for (
int col=lig ; col<3 ; col++) {
450 ntot_bh = division_xpun (ntot_bh, 0) ;
456 for (
int lig = 0 ; lig<3 ; lig++)
457 for (
int col = lig ; col<3 ; col++) {
462 auxi_bh = division_xpun (auxi_bh, 0) ;
465 auxi_bh = auxi_bh / ntot_bh ;
473 Cmp copie_ns_bis (ns_taij_tot(lig, col)) ;
483 double xabs, yabs, zabs, air, theta, phi ;
486 for (
int l=0 ; l<nz_ns ; l++) {
496 for (
int k=0 ; k<np ; k++)
497 for (
int j=0 ; j<nt ; j++)
498 for (
int i=0 ; i<nr ; i++) {
500 xabs = xabs_ns (l, k, j, i) ;
501 yabs = yabs_ns (l, k, j, i) ;
502 zabs = zabs_ns (l, k, j, i) ;
506 (xabs, yabs, zabs, air, theta, phi) ;
510 auxi_ns.
set(l, k, j, i) =
511 copie_ns_bis(l, k, j, i) / ntot_ns (l, k, j, i)/2. ;
514 auxi_ns.
set(l, k, j, i) = auxi_bh.
val_point (air, theta, phi) ;
519 for (
int k=0 ; k<np ; k++)
520 for (
int j=0 ; j<nt ; j++)
521 auxi_ns.
set(nz_ns-1, k, j, nr) = 0 ;
544 for (
int lig=0 ; lig<3 ; lig++)
545 for (
int col=lig ; col<3 ; col++) {
563 for (
int i=0; i<3; i++)
564 for (
int j=0; j<3; j++)
573 for (
int i=0; i<3; i++)
574 for (
int j=0; j<3; j++)
Tenseur_sym tkij_auto
Auto .
Tenseur_sym taij_auto
Part of generated by the hole.
Tenseur n_auto
Part of N generated by the hole.
Tenseur_sym taij_comp
Part of generated by the companion hole.
Tenseur n_comp
Part of N generated by the companion hole.
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.
const Tenseur & get_shift_auto() const
Returns the part of generated by the hole.
Tenseur_sym tkij_tot
Total .
void fait_taij_auto()
Calculates the part of generated by shift_auto .
Cmp decouple
Function used to construct the part of generated by the hole from the total .
void fait_decouple()
Function used to compute the {\tt decouple} functions for both the NS and the BH.
void fait_tkij(int bound_nn=-1, double lim_nn=0)
Computation of the extrinsic curvature tensor for both {\tt star} and {\tt bhole}.
Et_bin_nsbh star
The neutron star.
Bhole hole
The black hole.
const Base_vect_cart ref_triad
Cartesian triad of the absolute reference frame.
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
void import(const Cmp &ci)
Assignment to another Cmp defined on a different mapping.
void allocate_all()
Sets the logical state to ETATQCQ (ordinary state) and performs the memory allocation of all the elem...
void std_base_scal()
Sets the spectral bases of the Valeur va to the standard ones for a scalar.
Tbl & set(int l)
Read/write of the value in a given domain.
void import_symy(const Cmp &ci)
Assignment to another Cmp defined on a different mapping.
void dec2_dzpuis()
Decreases by 2 the value of dzpuis and changes accordingly the values of the Cmp in the external comp...
double val_point(double r, double theta, double phi) const
Computes the value of the field represented by *this at an arbitrary point , by means of the spectral...
void raccord(int n)
Performs the matching of the nucleus with respect to the first shell.
void import_asymy(const Cmp &ci)
Assignment to another Cmp defined on a different mapping.
Tenseur_sym tkij_tot
Total extrinsic curvature tensor $K^{ij}$ generated by {\tt shift_auto} and {\tt shift_comp}.
void fait_taij_auto()
Computes (LB)^{ij} auto.
Tenseur_sym taij_tot
Total extrinsic curvature tensor $\tilde A^{ij} = 2 N K^{ij}$ generated by {\tt shift_auto} and {\tt ...
Tenseur_sym taij_auto
Part of the extrinsic curvature tensor $\tilde A^{ij} = 2 N K^{ij}$ generated by {\tt shift_auto}.
Tenseur_sym tkij_auto
Part of the extrinsic curvature tensor $K^{ij}$ generated by {\tt shift_auto}.
Tenseur akcar_comp
Part of the scalar generated by shift_auto and shift_comp , i.e.
const Base_vect & ref_triad
Reference triad ("absolute frame"), with respect to which the components of all the member Tenseur 's...
const Tenseur & get_shift_auto() const
Returns the part of the shift vector generated principaly by the star.
Tenseur shift_auto
Part of the shift vector generated principaly by the star.
Tenseur akcar_auto
Part of the scalar generated by shift_auto , i.e.
Cmp decouple
Function used to construct the part of generated by the star from the total .
Tenseur_sym tkij_comp
Part of the extrinsic curvature tensor generated by shift_comp .
const Tenseur & get_nnn() const
Returns the total lapse function N.
Tenseur nnn
Total lapse function.
Map & mp
Mapping associated with the star.
Tenseur a_car
Total conformal factor .
const double * get_beta() const
Returns the pointer on the array beta.
const double * get_alpha() const
Returns the pointer on the array alpha.
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping,...
Coord ya
Absolute y coordinate.
void convert_absolute(double xx, double yy, double zz, double &rr, double &theta, double &pphi) const
Determines the coordinates corresponding to given absolute Cartesian coordinates (X,...
Coord za
Absolute z coordinate.
double get_ori_x() const
Returns the x coordinate of the origin.
Coord xa
Absolute x coordinate.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
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.
int get_nzone() const
Returns the number of domains.
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
Class intended to describe tensors with a symmetry on the two last indices *** DEPRECATED : use class...
Tensor handling *** DEPRECATED : use class Tensor instead ***.
const Base_vect * get_triad() const
Returns the vectorial basis (triad) on which the components are defined.
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
void dec2_dzpuis()
dzpuis -= 2 ;
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).
void inc2_dzpuis()
dzpuis += 2 ;
void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
void set_triad(const Base_vect &new_triad)
Assigns a new vectorial basis (triad) of decomposition.
int get_etat() const
Returns the logical state.
Cmp sin(const Cmp &)
Sine.
Tbl norme(const Cmp &)
Sums of the absolute values of all the values of the Cmp in each domain.
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
Cmp pow(const Cmp &, int)
Power .
Cmp cos(const Cmp &)
Cosine.
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .