26 #ifndef __TIME_SLICE_H_ 27 #define __TIME_SLICE_H_ 163 #include "star_rot_dirac.h" 164 #include "evolution.h" 302 bool partial_read,
int depth_in = 3) ;
335 assert ((0<= ord)&&(ord < 4)) ;
405 ostream& ost = cout,
bool verb=
true)
const ;
423 ostream& ost = cout,
bool verb=
true)
const ;
448 const Scalar* energy_density = 0x0,
449 ostream& ost = cout,
bool verb=
true)
const ;
461 virtual ostream&
operator>>(ostream& )
const ;
473 void save(
const char* rootname)
const ;
484 virtual void sauve(FILE* fich,
bool partial_save)
const ;
488 ostream& operator<<(ostream& ,
const Time_slice& ) ;
613 const Scalar& trk_in,
int depth_in = 3) ;
667 bool partial_read,
int depth_in = 3) ;
866 virtual const Vector&
vec_X(
int method_poisson=6)
const ;
876 int iter_max = 200,
double precis = 1.e-12,
877 double relax = 0.8,
int methode_poisson = 6) ;
920 const Scalar& trk_point,
double pdt,
double precis = 1.e-12,
921 int method_poisson_vect = 6,
const char* graph_device = 0x0,
922 const Scalar* ener_dens = 0x0,
const Vector* mom_dens = 0x0,
923 const Scalar* trace_stress = 0x0 ) ;
948 virtual ostream&
operator>>(ostream& )
const ;
958 virtual void sauve(FILE* fich,
bool partial_save)
const ;
1081 bool partial_read,
int depth_in = 3) ;
1144 const Scalar& trk_point,
double pdt,
double precis = 1.e-12,
1145 int method_poisson_vect = 6,
const char* graph_device = 0x0,
1146 const Scalar* ener_dens = 0x0,
const Vector* mom_dens = 0x0,
1147 const Scalar* trace_stress = 0x0 ) ;
1205 const Scalar* trace_stress=0x0)
const ;
1240 void evolve(
double pdt,
int nb_time_steps,
int niter_elliptic,
1241 double relax_elliptic,
int check_mod,
int save_mod,
1242 int method_poisson_vect = 6,
int nopause = 1,
1243 const char* graph_device = 0x0,
bool verbose=
true,
1244 const Scalar* ener_euler = 0x0,
1245 const Vector* mom_euler = 0x0,
const Scalar* s_euler = 0x0,
1336 virtual ostream&
operator>>(ostream& )
const ;
1346 virtual void sauve(FILE* fich,
bool partial_save)
const ;
void operator=(const Time_slice &)
Assignment to another Time_slice.
virtual const Vector & beta() const
shift vector at the current time step (jtime )
void initialize_sources_copy() const
Copy the sources source_A_XXX_evol and source_B_XXX_evol to all time-steps.
virtual const Scalar & psi() const
Conformal factor relating the physical metric to the conformal one: .
const Scalar & psi4() const
Factor at the current time step (jtime ).
Metric for tensor calculation.
Time_slice(const Scalar &lapse_in, const Vector &shift_in, const Sym_tensor &gamma_in, const Sym_tensor &kk_in, int depth_in=3)
General constructor (Hamiltonian-like).
virtual void set_npsi_del_psi(const Scalar &npsi_in)
Sets the factor at the current time step (jtime ) and deletes the value of .
virtual void set_psi_del_npsi(const Scalar &psi_in)
Sets the conformal factor relating the physical metric to the conformal one: .
Evolution_std< Scalar > npsi_evol
Values at successive time steps of the factor .
virtual double adm_mass() const
Returns the ADM mass at (geometrical units) the current step.
virtual const Sym_tensor & gam_uu() const
Induced metric (contravariant components ) at the current time step (jtime )
void operator=(const Time_slice_conf &)
Assignment to another Time_slice_conf.
virtual const Vector & hdirac() const
Vector which vanishes in Dirac gauge.
Evolution_std< Scalar > psi_evol
Values at successive time steps of the conformal factor relating the physical metric to the conform...
virtual const Vector & hdirac() const
Vector which vanishes in Dirac gauge.
virtual const Metric & tgam() const
Conformal metric Returns the value at the current time step (jtime ).
virtual void set_trh(const Scalar &trh_in)
Sets the trace, with respect to the flat metric ff , of .
virtual void del_deriv() const
Deletes all the derived quantities.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator<<).
Scalar * p_ln_psi
Pointer on the logarithm of at the current time step (jtime)
Evolution_full< Tbl > adm_mass_evol
ADM mass at each time step, since the creation of the slice.
virtual void initial_data_cts(const Sym_tensor &uu, const Scalar &trk_in, const Scalar &trk_point, double pdt, double precis=1.e-12, int method_poisson_vect=6, const char *graph_device=0x0, const Scalar *ener_dens=0x0, const Vector *mom_dens=0x0, const Scalar *trace_stress=0x0)
Computes valid initial data by solving the constraint equations in the conformal thin-sandwich approa...
void save(const char *rootname) const
Saves in a binary file.
Tbl check_momentum_constraint(const Vector *momentum_density=0x0, ostream &ost=cout, bool verb=true) const
Checks the level at which the momentum constraints are verified.
Flat metric for tensor calculation.
int scheme_order
Order of the finite-differences scheme for the computation of time derivatives.
Tensor field of valence 0 (or component of a tensorial field).
Evolution_std< Scalar > A_hata_evol
Potential A associated with the symmetric tensor .
Base class for coordinate mappings.
void operator=(const Tslice_dirac_max &)
Assignment to another Tslice_dirac_max.
int jtime
Time step index of the latest slice.
virtual void set_psi_del_n(const Scalar &psi_in)
Sets the conformal factor relating the physical metric to the conformal one: .
Evolution_std< Sym_tensor > gam_dd_evol
Values at successive time steps of the covariant components of the induced metric ...
virtual void set_hh(const Sym_tensor &hh_in)
Sets the deviation of the conformal metric from the flat metric : .
void compute_X_from_momentum_constraint(const Vector &hat_S, const Sym_tensor_tt &hata_tt, int iter_max=200, double precis=1.e-12, double relax=0.8, int methode_poisson=6)
Computes the vector from the conformally-rescaled momentum , using the momentum constraint.
virtual void initial_data_cts(const Sym_tensor &uu, const Scalar &trk_in, const Scalar &trk_point, double pdt, double precis=1.e-12, int method_poisson_vect=6, const char *graph_device=0x0, const Scalar *ener_dens=0x0, const Vector *mom_dens=0x0, const Scalar *trace_stress=0x0)
Computes valid initial data by solving the constraint equations in the conformal thin-sandwich approa...
virtual void set_hh(const Sym_tensor &hh_in)
Sets the deviation of the conformal metric from the flat metric : .
virtual void set_npsi_del_n(const Scalar &npsi_in)
Sets the factor at the current time step (jtime ) and deletes the value of N.
Tensor field of valence 1.
void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
Vectorial bases (triads) with respect to which the tensorial components are defined.
virtual const Sym_tensor & gam_dd() const
Induced metric (covariant components ) at the current time step (jtime )
virtual const Sym_tensor & hh(Param *=0x0, Param *=0x0) const
Deviation of the conformal metric from the flat metric : .
Vector * p_hdirac
Pointer on the vector (which vanishes in Dirac gauge), at the current time step (jtime).
Evolution_std< Scalar > B_hata_evol
Potential associated with the symmetric tensor .
virtual const Sym_tensor & gam_dd() const
Induced metric (covariant components ) at the current time step (jtime )
Evolution_std< Sym_tensor > k_uu_evol
Values at successive time steps of the contravariant components of the extrinsic curvature tensor ...
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator<<).
virtual const Scalar & trk() const
Trace K of the extrinsic curvature at the current time step (jtime )
virtual const Sym_tensor & k_uu() const
Extrinsic curvature tensor (contravariant components ) at the current time step (jtime ) ...
virtual void set_hata(const Sym_tensor &hata_in)
Sets the conformal representation of the traceless part of the extrinsic curvature: ...
virtual Scalar solve_psi(const Scalar *ener_dens=0x0) const
Solves the elliptic equation for the conformal factor $$ (Hamiltonian constraint).
friend ostream & operator<<(ostream &, const Time_slice &)
Display.
Spacelike time slice of a 3+1 spacetime.
virtual const Scalar & trk() const
Trace K of the extrinsic curvature at the current time step (jtime )
Evolution_std< Scalar > source_A_hata_evol
The potential A of the source of equation for .
Evolution_std< Scalar > source_A_hh_evol
The A potential of the source of equation for .
virtual const Scalar & A_hata() const
Returns the potential A of .
virtual void set_khi_mu(const Scalar &khi_in, const Scalar &mu_in)
Sets the potentials and of the TT part of (see the documentation of Sym_tensor_tt for details)...
const Scalar & ln_psi() const
Logarithm of at the current time step (jtime ).
virtual ~Tslice_dirac_max()
Destructor.
virtual const Sym_tensor & gam_uu() const
Induced metric (contravariant components ) at the current time step (jtime )
virtual void set_hata_TT(const Sym_tensor_tt &hata_tt)
Sets the TT part of (see member hata_evol ).
Evolution_std< Sym_tensor > gam_uu_evol
Values at successive time steps of the contravariant components of the induced metric ...
int get_scheme_order() const
Gets the order of the finite-differences scheme.
virtual const Vector & vec_X(int method_poisson=6) const
Vector representing the longitudinal part of .
virtual ~Time_slice_conf()
Destructor.
Evolution_std< Sym_tensor > k_dd_evol
Values at successive time steps of the covariant components of the extrinsic curvature tensor ...
const Metric & gam() const
Induced metric at the current time step (jtime )
void evolve(double pdt, int nb_time_steps, int niter_elliptic, double relax_elliptic, int check_mod, int save_mod, int method_poisson_vect=6, int nopause=1, const char *graph_device=0x0, bool verbose=true, const Scalar *ener_euler=0x0, const Vector *mom_euler=0x0, const Scalar *s_euler=0x0, const Sym_tensor *strain_euler=0x0)
Time evolution by resolution of Einstein equations.
virtual void set_hata_from_XAB(Param *par_bc=0x0, Param *par_mat=0x0)
Sets the conformal representation of the traceless part of the extrinsic curvature from its potentia...
Spacelike time slice of a 3+1 spacetime with conformal decomposition.
virtual const Scalar & B_hh() const
Returns the potential of .
Tbl check_hamiltonian_constraint(const Scalar *energy_density=0x0, ostream &ost=cout, bool verb=true) const
Checks the level at which the hamiltonian constraint is verified.
virtual Scalar solve_npsi(const Scalar *ener_dens=0x0, const Scalar *trace_stress=0x0) const
Solves the elliptic equation for (maximal slicing condition + Hamiltonian constraint) ...
Scalar * p_psi4
Pointer on the factor at the current time step (jtime)
virtual void set_AB_hh(const Scalar &A_in, const Scalar &B_in)
Sets the potentials A and of the TT part of (see the documentation of Sym_tensor for details)...
Evolution_std< Scalar > source_B_hh_evol
The potential of the source of equation for .
Metric * p_gamma
Pointer on the induced metric at the current time step (jtime)
Class for relativistic rotating stars in Dirac gauge and maximal slicing.
virtual const Scalar & npsi() const
Factor at the current time step (jtime ).
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator<<).
virtual void sauve(FILE *fich, bool partial_save) const
Total or partial saves in a binary file.
virtual Sym_tensor aa() const
Conformal representation of the traceless part of the extrinsic curvature: .
Time_slice_conf(const Scalar &lapse_in, const Vector &shift_in, const Metric_flat &ff_in, const Scalar &psi_in, const Sym_tensor &hh_in, const Sym_tensor &hata_in, const Scalar &trk_in, int depth_in=3)
Constructor from conformal decomposition.
Transverse symmetric tensors of rank 2.
virtual const Sym_tensor & k_dd() const
Extrinsic curvature tensor (covariant components ) at the current time step (jtime ) ...
Metric * p_tgamma
Pointer on the conformal metric at the current time step (jtime)
virtual double adm_mass() const
Returns the ADM mass (geometrical units) at the current step.
virtual const Sym_tensor & k_dd() const
Extrinsic curvature tensor (covariant components ) at the current time step (jtime ) ...
virtual const Sym_tensor & hata() const
Conformal representation of the traceless part of the extrinsic curvature: .
Evolution_std< double > the_time
Time label of each slice.
void compute_sources(const Sym_tensor *strain_tensor=0x0) const
Computes the sources source_A_XXX_evol and source_B_XXX_evol , for the solution of the evolution equa...
virtual const Sym_tensor & k_uu() const
Extrinsic curvature tensor (contravariant components ) at the current time step (jtime ) ...
int get_latest_j() const
Gets the latest value of time step index.
const Metric_flat & ff
Pointer on the flat metric with respect to which the conformal decomposition is performed.
void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
Vector * p_vec_X
Pointer on the vector representing the longitudinal part of .
Evolution_std< Scalar > B_hh_evol
The potential of .
virtual const Scalar & A_hh() const
Returns the potential A of .
Evolution_std< Scalar > trk_evol
Values at successive time steps of the trace K of the extrinsic curvature.
Tslice_dirac_max(const Scalar &lapse_in, const Vector &shift_in, const Metric_flat &ff_in, const Scalar &psi_in, const Sym_tensor_trans &hh_in, const Sym_tensor &hata_in, int depth_in=3)
Constructor from conformal decomposition.
Evolution_std< Scalar > n_evol
Values at successive time steps of the lapse function N.
virtual void del_deriv() const
Deletes all the derived quantities.
virtual double adm_mass() const
Returns the ADM mass (geometrical units) at the current step.
virtual const Scalar & B_hata() const
Returns the potential of .
void set_scheme_order(int ord)
Sets the order of the finite-differences scheme.
virtual const Sym_tensor & hh(Param *par_bc=0x0, Param *par_mat=0x0) const
Deviation of the conformal metric from the flat metric : .
void check_psi_dot(Tbl &tlnpsi_dot, Tbl &tdiff, Tbl &tdiff_rel) const
Checks the relation.
Evolution_std< Sym_tensor > hata_evol
Values at successive time steps of the components .
const Evolution_std< double > & get_time() const
Gets the time coordinate t at successive time steps.
virtual const Scalar & trk() const
Trace K of the extrinsic curvature at the current time step (jtime ).
void hh_det_one(int j, Param *par_bc=0x0, Param *par_mat=0x0) const
Computes from the values of A and and using the condition , which fixes the trace of ...
Evolution_std< Vector > beta_evol
Values at successive time steps of the shift vector .
virtual void sauve(FILE *fich, bool partial_save) const
Total or partial saves in a binary file.
Evolution_std< Scalar > trh_evol
The trace, with respect to the flat metric ff , of .
int depth
Number of stored time slices.
virtual Vector solve_beta(int method=6) const
Solves the elliptic equation for the shift vector from (Eq.
Spacelike time slice of a 3+1 spacetime with conformal decomposition in the maximal slicing and Dirac...
virtual ~Time_slice()
Destructor.
Evolution_std< Sym_tensor > hh_evol
Values at successive time steps of the components .
virtual void set_AB_hata(const Scalar &A_in, const Scalar &B_in)
Sets the potentials A and of the TT part (see the documentation of Sym_tensor for details)...
Tbl check_dynamical_equations(const Sym_tensor *strain_tensor=0x0, const Scalar *energy_density=0x0, ostream &ost=cout, bool verb=true) const
Checks the level at which the dynamical equations are verified.
Class intended to describe valence-2 symmetric tensors.
Evolution_std< Scalar > source_B_hata_evol
The potential of the source of equation for .
Transverse and traceless symmetric tensors of rank 2.
virtual void sauve(FILE *fich, bool partial_save) const
Total or partial saves in a binary file.
virtual const Scalar & trh() const
Computes the trace h, with respect to the flat metric ff , of .
virtual const Scalar & nn() const
Lapse function N at the current time step (jtime )
Time evolution with full storage (*** under development ***).
Evolution_std< Scalar > A_hh_evol
The A potential of .
virtual const Scalar & nn() const
Lapse function N at the current time step (jtime )