138 #include "time_slice.h" 139 #include "utilitaires.h" 157 0*lapse_in, depth_in),
158 A_hh_evol(depth_in), B_hh_evol(depth_in), source_A_hh_evol(depth_in),
159 source_B_hh_evol(depth_in), source_A_hata_evol(depth_in) ,
160 source_B_hata_evol(depth_in), trh_evol(hh_in.the_trace(), depth_in)
169 A_hh_evol(depth_in), B_hh_evol(depth_in),
170 source_A_hh_evol(depth_in), source_B_hh_evol(depth_in),
171 source_A_hata_evol(depth_in), source_B_hata_evol(depth_in),
198 bool partial_read,
int depth_in)
200 A_hh_evol(depth_in), B_hh_evol(depth_in),
201 source_A_hh_evol(depth_in), source_B_hh_evol(depth_in),
202 source_A_hata_evol(depth_in), source_B_hata_evol(depth_in),
207 "Constructor of Tslice_dirac_max from file: the case of partial reading\n" 208 <<
" is not ready yet !" 220 for (
int j=jmin; j<=
jtime; j++) {
221 fread_be(&indicator,
sizeof(
int), 1, fich) ;
222 if (indicator == 1) {
229 for (
int j=jmin; j<=
jtime; j++) {
230 fread_be(&indicator,
sizeof(
int), 1, fich) ;
231 if (indicator == 1) {
238 for (
int j=jmin; j<=
jtime; j++) {
239 fread_be(&indicator,
sizeof(
int), 1, fich) ;
240 if (indicator == 1) {
251 :
Time_slice_conf(star.get_nn(), star.get_beta(), star.get_mp().flat_met_spher(),
252 0.*star.get_nn(), star.get_hh(), 0.*star.get_aa(),
253 0.*star.get_nn(), depth_in),
254 A_hh_evol(depth_in), B_hh_evol(depth_in),
255 source_A_hh_evol(depth_in), source_B_hh_evol(depth_in),
256 source_A_hata_evol(depth_in), source_B_hata_evol(depth_in),
278 for (
int j=1; j <
depth; j++) {
304 A_hh_evol(tin.A_hh_evol),
305 B_hh_evol(tin.B_hh_evol),
306 source_A_hh_evol(tin.source_A_hh_evol),
307 source_B_hh_evol(tin.source_B_hh_evol),
308 source_A_hata_evol(tin.source_A_hata_evol),
309 source_B_hata_evol(tin.source_B_hata_evol),
310 trh_evol(tin.trh_evol) { }
357 double pdt,
double precis,
int method_poisson_vect,
358 const char* graph_device,
const Scalar* p_ener_dens,
359 const Vector* p_mom_dens,
const Scalar* p_trace_stress) {
363 method_poisson_vect, graph_device,
364 p_ener_dens, p_mom_dens, p_trace_stress) ;
373 assert (tmp.
get_etat() != ETATNONDEF) ;
382 assert (tmp.
get_etat() != ETATNONDEF) ;
392 "Tslice_dirac_max::initial_data_cts : variation of A and tilde(B) for J = " 423 Scalar tmp = hh_tmp.the_trace() ;
443 cout <<
"Tslice_dirac_max::set_trh : #### WARNING : \n" 444 <<
" this method does not check whether det(tilde gamma) = 1" 573 flux <<
"Dirac gauge and maximal slicing" <<
'\n' ;
594 "Tslice_dirac_max::sauve : the partial_save case is not ready yet !" 611 for (
int j=jmin; j<=
jtime; j++) {
612 int indicator = (
hh_evol.is_known(j)) ? 1 : 0 ;
613 fwrite_be(&indicator,
sizeof(
int), 1, fich) ;
614 if (indicator == 1)
hh_evol[j].sauve(fich) ;
619 for (
int j=jmin; j<=
jtime; j++) {
620 int indicator = (
A_hh_evol.is_known(j)) ? 1 : 0 ;
621 fwrite_be(&indicator,
sizeof(
int), 1, fich) ;
622 if (indicator == 1)
A_hh_evol[j].sauve(fich) ;
627 for (
int j=jmin; j<=
jtime; j++) {
628 int indicator = (
B_hh_evol.is_known(j)) ? 1 : 0 ;
629 fwrite_be(&indicator,
sizeof(
int), 1, fich) ;
630 if (indicator == 1)
B_hh_evol[j].sauve(fich) ;
void initialize_sources_copy() const
Copy the sources source_A_XXX_evol and source_B_XXX_evol to all time-steps.
void annule_domain(int l)
Sets the Tensor to zero in a given domain.
virtual const Scalar & psi() const
Conformal factor relating the physical metric to the conformal one: .
Tbl maxabs(const Tensor &aa, const char *comment=0x0, ostream &ost=cout, bool verb=true)
Maxima in each domain of the absolute values of the tensor components.
const Sym_tensor get_aa() const
Returns .
const Scalar & psi4() const
Factor at the current time step (jtime ).
Cmp exp(const Cmp &)
Exponential.
void operator=(const Time_slice_conf &)
Assignment to another Time_slice_conf.
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 void set_etat_zero()
Sets the logical state to ETATZERO (zero).
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.
const Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator<<).
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...
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
Flat metric for tensor calculation.
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.
virtual void update(const TyT &new_value, int j, double time_j)
Sets a new value at a given time step.
const Base_vect * get_triad() const
Returns the vectorial basis (triad) on which the metric is defined.
void operator=(const Tslice_dirac_max &)
Assignment to another Tslice_dirac_max.
int jtime
Time step index of the latest slice.
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field. ...
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 : .
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...
int get_etat() const
Returns the logical state ETATNONDEF (undefined), ETATZERO (null) or ETATQCQ (ordinary).
virtual void set_hh(const Sym_tensor &hh_in)
Sets the deviation of the conformal metric from the flat metric : .
Tensor field of valence 1.
Vectorial bases (triads) with respect to which the tensorial components are defined.
Vector * p_hdirac
Pointer on the vector (which vanishes in Dirac gauge), at the current time step (jtime).
const Map & get_mp() const
Returns the mapping.
Evolution_std< Scalar > B_hata_evol
Potential associated with the symmetric tensor .
void set_dzpuis(int)
Modifies the dzpuis flag.
const Scalar & get_ln_psi() const
Returns .
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator<<).
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)...
virtual ~Tslice_dirac_max()
Destructor.
Evolution_std< Sym_tensor > gam_uu_evol
Values at successive time steps of the contravariant components of the induced metric ...
Evolution_std< Sym_tensor > k_dd_evol
Values at successive time steps of the covariant components of the extrinsic curvature tensor ...
int get_nzone() const
Returns the number of domains.
Spacelike time slice of a 3+1 spacetime with conformal decomposition.
virtual const Scalar & B_hh() const
Returns the potential of .
void trace_from_det_one(const Sym_tensor_tt &htt, double precis=1.e-14, int it_max=100)
Assigns the derived member p_tt and computes the trace so that *this + the flat metric has a determin...
Evolution_std< Scalar > source_B_hh_evol
The potential of the source of equation for .
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.
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 void sauve(FILE *fich, bool partial_save) const
Total or partial saves in a binary file.
void set_khi_mu(const Scalar &khi_i, const Scalar &mu_i, int dzp=0, Param *par1=0x0, Param *par2=0x0, Param *par3=0x0)
Sets the component , as well as the angular potential (see member p_khi and p_mu )...
Transverse symmetric tensors of rank 2.
Metric * p_tgamma
Pointer on the conformal metric at the current time step (jtime)
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...
int fread_be(int *aa, int size, int nb, FILE *fich)
Reads integer(s) from a binary file according to the big endian convention.
const Metric_flat & ff
Pointer on the flat metric with respect to which the conformal decomposition is performed.
Evolution_std< Scalar > B_hh_evol
The potential of .
void set_longit_trans(const Vector &v, const Sym_tensor_trans &a)
Assigns the derived members p_longit_pot and p_transverse and updates the components accordingly...
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 set_etat_zero()
Sets the logical state of all components to ETATZERO (zero state).
virtual const Scalar & B_hata() const
Returns the potential of .
virtual const Sym_tensor & hh(Param *par_bc=0x0, Param *par_mat=0x0) const
Deviation of the conformal metric from the flat metric : .
Evolution_std< Sym_tensor > hata_evol
Values at successive time steps of the components .
int get_type_r(int l) const
Returns the type of sampling in the radial direction in domain no.
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 .
const Map & get_mp() const
Returns the mapping.
int depth
Number of stored time slices.
virtual void dec_dzpuis(int dec=1)
Decreases by dec units the value of dzpuis and changes accordingly the values of the Scalar in the co...
Spacelike time slice of a 3+1 spacetime with conformal decomposition in the maximal slicing and Dirac...
Evolution_std< Sym_tensor > hh_evol
Values at successive time steps of the components .
const Metric_flat & flat_met_spher() const
Returns the flat metric associated with the spherical coordinates and with components expressed in th...
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 const Scalar & trh() const
Computes the trace h, with respect to the flat metric ff , of .
Evolution_std< Scalar > A_hh_evol
The A potential of .