76 #include "utilitaires.h" 88 beta(map_i, CON, map_i.get_bvect_spher()) ,
89 gamma(map_i.flat_met_spher()) ,
91 mom_euler(map_i, CON, map_i.get_bvect_spher()) ,
92 stress_euler(map_i, COV, map_i.get_bvect_spher()) ,
93 kk(map_i, COV, map_i.get_bvect_spher())
117 ener_euler(co.ener_euler) ,
118 mom_euler(co.mom_euler) ,
119 stress_euler(co.stress_euler) ,
131 nn(map_i, *(map_i.get_mg()), fich) ,
132 beta(map_i, map_i.get_bvect_spher(), fich) ,
134 ener_euler(map_i, *(map_i.get_mg()), fich) ,
135 mom_euler(map_i, map_i.get_bvect_spher(), fich) ,
136 stress_euler(map_i, map_i.get_bvect_spher(), fich) ,
137 kk(map_i, COV, map_i.get_bvect_spher())
180 assert( &(co.
mp) == &
mp ) ;
215 FILE* file_out = fopen(file_name,
"w") ;
216 double total_time = 0. ;
218 fwrite_be(&total_time,
sizeof(
double), 1, file_out) ;
230 cout <<
"WRITING TO GYOTO FILE - OK: " << endl ;
236 ostream& operator<<(ostream& ost,
const Compobj& co) {
244 ost << endl <<
"Compact object (class Compobj) " << endl ;
245 ost <<
"Mapping : " <<
mp << endl ;
246 ost <<
"Central values of various fields : " << endl ;
247 ost <<
"-------------------------------- " << endl ;
249 ost <<
" metric components gamma_{ij} : " << endl
250 <<
" ( " <<
gamma.
cov()(1,1).val_grid_point(0,0,0,0) <<
" " 251 <<
gamma.
cov()(1,2).val_grid_point(0,0,0,0) <<
" " 252 <<
gamma.
cov()(1,3).val_grid_point(0,0,0,0) <<
" )" << endl
253 <<
" ( " <<
gamma.
cov()(2,1).val_grid_point(0,0,0,0) <<
" " 254 <<
gamma.
cov()(2,2).val_grid_point(0,0,0,0) <<
" " 255 <<
gamma.
cov()(2,3).val_grid_point(0,0,0,0) <<
" )" << endl
256 <<
" ( " <<
gamma.
cov()(3,1).val_grid_point(0,0,0,0) <<
" " 257 <<
gamma.
cov()(3,2).val_grid_point(0,0,0,0) <<
" " 258 <<
gamma.
cov()(3,3).val_grid_point(0,0,0,0) <<
" )" << endl ;
259 ost <<
" components of the extrinsic curvature K_{ij} : " << endl
260 <<
" ( " <<
kk(1,1).val_grid_point(0,0,0,0) <<
" " 261 <<
kk(1,2).val_grid_point(0,0,0,0) <<
" " 262 <<
kk(1,3).val_grid_point(0,0,0,0) <<
" )" << endl
263 <<
" ( " <<
kk(2,1).val_grid_point(0,0,0,0) <<
" " 264 <<
kk(2,2).val_grid_point(0,0,0,0) <<
" " 265 <<
kk(2,3).val_grid_point(0,0,0,0) <<
" )" << endl
266 <<
" ( " <<
kk(3,1).val_grid_point(0,0,0,0) <<
" " 267 <<
kk(3,2).val_grid_point(0,0,0,0) <<
" " 268 <<
kk(3,3).val_grid_point(0,0,0,0) <<
" )" << endl ;
270 ost <<
" components of the stress tensor S_{ij} / Eulerian observer : " << endl
271 <<
" ( " <<
stress_euler(1,1).val_grid_point(0,0,0,0) <<
" " 273 <<
stress_euler(1,3).val_grid_point(0,0,0,0) <<
" )" << endl
274 <<
" ( " <<
stress_euler(2,1).val_grid_point(0,0,0,0) <<
" " 276 <<
stress_euler(2,3).val_grid_point(0,0,0,0) <<
" )" << endl
277 <<
" ( " <<
stress_euler(3,1).val_grid_point(0,0,0,0) <<
" " 279 <<
stress_euler(3,3).val_grid_point(0,0,0,0) <<
" )" << endl ;
295 cout <<
"WARNING: Compobj::extrinsic_curvature() NOT TESTED !" << endl ;
303 for (
int i=1; i<=3; i++) {
304 for (
int j=i; j<=3; j++) {
305 kk.
set(i, j) = (dn(i, j) + dn(j, i))/(2*
nn) ;
323 p_adm_mass =
new double( ww.
flux(__infinity, ff) / (16.* M_PI) ) ;
virtual void set_etat_qcq()
Sets the logical state of all components to ETATQCQ (ordinary state).
virtual void sauve(FILE *) const
Save in a binary file.
virtual const Sym_tensor & con() const
Read-only access to the contravariant representation.
Vector mom_euler
Total 3-momentum density in the Eulerian frame.
double flux(double radius, const Metric &met) const
Computes the flux of the vector accross a sphere r = const.
virtual void sauve(FILE *) const
Save in a file.
virtual double adm_mass() const
ADM mass (computed as a surface integral at spatial infinity)
Tensor up(int ind, const Metric &gam) const
Computes a new tensor by raising an index of *this.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
Flat metric for tensor calculation.
virtual ~Compobj()
Destructor.
double * p_adm_mass
ADM mass.
Base class for coordinate mappings.
const Tensor_sym & derive_con(const Metric &gam) const
Returns the "contravariant" derivative of this with respect to some metric , by raising the last inde...
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field. ...
virtual void sauve(FILE *) const
Save in a binary file.
Sym_tensor kk
Extrinsic curvature tensor .
Tensor field of valence 1.
virtual void extrinsic_curvature()
Computation of the extrinsic curvature.
void gyoto_data(const char *file_name) const
Save in a file for GYOTO.
double val_grid_point(int l, int k, int j, int i) const
Returns the value of the field at a specified grid point.
virtual void sauve(FILE *) const
Save in a file.
Base class for stationary compact objects (under development).
virtual void sauve(FILE *) const
Save in a file.
void operator=(const Compobj &)
Assignment to another Compobj.
const Base_vect * get_triad() const
Returns the vectorial basis (triad) on which the components are defined.
void sauve(FILE *fd, bool save_base=false) const
Saves into a file.
Vector beta
Shift vector .
virtual void del_deriv() const
Deletes all the derived quantities.
int fwrite_be(const int *aa, int size, int nb, FILE *fich)
Writes integer(s) into a binary file according to the big endian convention.
const Tensor & derive_cov(const Metric &gam) const
Returns the covariant derivative of this with respect to some metric .
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
Compobj(Map &map_i)
Standard constructor.
virtual const Sym_tensor & cov() const
Read-only access to the covariant representation.
const Tensor & derive_con(const Metric &gam) const
Returns the "contravariant" derivative of this with respect to some metric , by raising the last inde...
Scalar & set(const Itbl &ind)
Returns the value of a component (read/write version).
Scalar ener_euler
Total energy density E in the Eulerian frame.
Scalar nn
Lapse function N .
virtual void set_etat_zero()
Sets the logical state of all components to ETATZERO (zero state).
virtual void sauve(FILE *) const
Save in a file.
void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
Class intended to describe valence-2 symmetric tensors.
Tensor trace(int ind1, int ind2) const
Trace on two different type indices.
Map & mp
Mapping describing the coordinate system (r,theta,phi)
Sym_tensor stress_euler
Stress tensor with respect to the Eulerian observer.
Tensor down(int ind, const Metric &gam) const
Computes a new tensor by lowering an index of *this.