78 ifstream file(file_name) ;
80 cerr <<
"Problem in opening the file " << file_name << endl ;
93 const Mg3d* mg =
mp.get_mg() ;
95 file.ignore(1000,
'\n') ;
96 file.ignore(1000,
'\n') ;
98 cout <<
"nz : " << nz << endl ;
99 a_car.set_etat_qcq() ;
101 nphi.allocate_all() ;
102 krphi.allocate_all() ;
104 for (
int l=1; l<nz; l++) {
105 cout <<
"l = " << l << endl ;
109 double* r_iso =
new double[nr] ;
110 double* r_areal =
new double[nr] ;
111 double* psi4 =
new double[nr] ;
112 double* alpha =
new double[nr] ;
113 double* Krphi =
new double[nr] ;
114 double* beta_phi =
new double[nr] ;
118 r_areal[nr-1] = __infinity ;
119 r_iso[nr-1] = __infinity ;
125 for (
int i=0; i<nr_max; i++) {
133 file >> beta_phi[i] ;
134 cout <<
"r_iso, psi4, beta_phi : " << r_iso[i] <<
" " << psi4[i] <<
" " << beta_phi[i] << endl ;
137 if (l==1) r_inner = r_iso[0] ;
139 for (
int k=0; k<np; k++) {
140 for (
int j=0; j<nt; j++) {
141 for (
int i=0; i<nr; i++) {
142 a_car.set_grid_point(l,k,j,i) = psi4[i] ;
143 nn.set_grid_point(l,k,j,i) = alpha[i] ;
144 nphi.set_grid_point(l,k,j,i) = -
a_spin * beta_phi[i] / psi4[i] / (r_iso[i]*r_iso[i]) ;
145 krphi.set_grid_point(l,k,j,i) =
a_spin * Krphi[i] / r_iso[i] ;
152 mp.homothetie(r_inner /
mp.val_r(1,-1.,0.,0.)) ;
157 a_car.std_spectral_base() ;
158 nn.std_spectral_base() ;
159 nphi.std_spectral_base() ;
160 krphi.std_spectral_base() ;
164 bbb.std_spectral_base() ;
257 ost << endl <<
"Alternative black hole spacetime in quasi-isotropic coordinates (class AltBH_QI) " << endl ;
276 if ( (
mp.get_mg())->get_np(0) == 1) {
char description2[256]
String describing the model.
void operator=(const AltBH_QI &)
Assignment to another AltBH_QI.
AltBH_QI(Map &mp_i, const char *file_name, double a_spin_i)
Standard constructor.
virtual ~AltBH_QI()
Destructor.
char description1[256]
String describing the model.
virtual void del_deriv() const
Deletes all the derived quantities.
Scalar krphi
K_{(r)(phi)} read in the file.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
double a_spin
Spin parameter of the model.
virtual void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
virtual void extrinsic_curvature()
Computation of the extrinsic curvature.
virtual void sauve(FILE *) const
Save in a file.
void operator=(const Compobj_QI &)
Assignment to another Compobj_QI.
Scalar nphi
Metric coefficient .
virtual void del_deriv() const
Deletes all the derived quantities.
Compobj_QI(Map &map_i)
Standard constructor.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
Scalar b_car
Square of the metric factor B.
Scalar bbb
Metric factor B.
Scalar a_car
Square of the metric factor A.
Sym_tensor kk
Extrinsic curvature tensor .
Scalar nn
Lapse function N .
virtual void extrinsic_curvature()
Computation of the extrinsic curvature.
Map & mp
Mapping describing the coordinate system (r,theta,phi).
Base class for pure radial mappings.
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.
Tensor field of valence 0 (or component of a tensorial field).
void mult_sint()
Multiplication by .
Cmp sqrt(const Cmp &)
Square root.
Map(const Mg3d &)
Constructor from a multi-domain 3D grid.
Standard units of space, time and mass.