138#include "time_slice.h"
139#include "utilitaires.h"
157 0*lapse_in, depth_in),
198 bool partial_read,
int 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) {
232 Scalar A_hh_file(mp, *(mp.get_mg()), fich) ;
238 for (
int j=jmin; j<=
jtime; j++) {
239 fread_be(&indicator,
sizeof(
int), 1, fich) ;
240 if (indicator == 1) {
241 Scalar B_hh_file(mp, *(mp.get_mg()), fich) ;
252 0.*star.get_nn(), star.get_hh(), 0.*star.get_aa(),
253 0.*star.get_nn(), depth_in),
278 for (
int j=1; j <
depth; j++) {
292 the_time.update(ttime1, jtime1, ttime1) ;
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) ;
366 int nz = trk_in.
get_mp().get_mg()->get_nzone() ;
373 assert (tmp.
get_etat() != ETATNONDEF) ;
375 assert(tmp.
get_mp().get_mg()->get_type_r(nz-1) == UNSURR) ;
382 assert (tmp.
get_etat() != ETATNONDEF) ;
384 assert(tmp.
get_mp().get_mg()->get_type_r(nz-1) == UNSURR) ;
392 "Tslice_dirac_max::initial_data_cts : variation of A and tilde(B) for J = "
415 Sym_tensor_tt hh_tt(mp, mp.get_bvect_spher(), mp.flat_met_spher());
428 Vector wzero(mp, CON, *(
ff.get_triad())) ;
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) ;
Vectorial bases (triads) with respect to which the tensorial components are defined.
Flat metric for tensor calculation.
Tensor field of valence 0 (or component of a tensorial field).
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field.
virtual void set_etat_zero()
Sets the logical state to ETATZERO (zero).
int get_etat() const
Returns the logical state ETATNONDEF (undefined), ETATZERO (null) or ETATQCQ (ordinary).
void set_dzpuis(int)
Modifies the dzpuis flag.
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...
Class for relativistic rotating stars in Dirac gauge and maximal slicing.
const Sym_tensor get_aa() const
Returns .
const Scalar & get_ln_psi() const
Returns .
Transverse symmetric tensors of rank 2.
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...
const Scalar & the_trace() const
Returns the trace of the tensor with respect to metric *met_div.
Transverse and traceless symmetric tensors of rank 2.
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 ).
Class intended to describe valence-2 symmetric tensors.
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.
Evolution_std< Sym_tensor > hh_evol
Values at successive time steps of the components .
virtual void sauve(FILE *fich, bool partial_save) const
Total or partial saves in a binary file.
Evolution_std< Sym_tensor > hata_evol
Values at successive time steps of the components .
virtual const Scalar & A_hata() const
Returns the potential A of .
void operator=(const Time_slice_conf &)
Assignment to another Time_slice_conf.
virtual const Scalar & psi() const
Conformal factor relating the physical metric to the conformal one: .
Metric * p_tgamma
Pointer on the conformal metric at the current time step (jtime).
virtual const Scalar & B_hata() const
Returns the potential of .
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 ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator<<).
virtual void del_deriv() const
Deletes all the derived quantities.
Vector * p_hdirac
Pointer on the vector (which vanishes in Dirac gauge), at the current time step (jtime).
const Scalar & psi4() const
Factor at the current time step (jtime ).
Evolution_std< Scalar > psi_evol
Values at successive time steps of the conformal factor relating the physical metric to the conform...
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.
Evolution_std< Scalar > A_hata_evol
Potential A associated with the symmetric tensor .
const Metric_flat & ff
Pointer on the flat metric with respect to which the conformal decomposition is performed.
Evolution_std< Scalar > B_hata_evol
Potential associated with the symmetric tensor .
virtual void set_hh(const Sym_tensor &hh_in)
Sets the deviation of the conformal metric from the flat metric : .
int jtime
Time step index of the latest slice.
Evolution_std< Scalar > trk_evol
Values at successive time steps of the trace K of the extrinsic curvature.
Metric * p_gamma
Pointer on the induced metric at the current time step (jtime).
Evolution_std< Sym_tensor > k_dd_evol
Values at successive time steps of the covariant components of the extrinsic curvature tensor .
Evolution_full< Tbl > adm_mass_evol
ADM mass at each time step, since the creation of the slice.
Evolution_std< Sym_tensor > gam_dd_evol
Values at successive time steps of the covariant components of the induced metric .
Evolution_std< Sym_tensor > gam_uu_evol
Values at successive time steps of the contravariant components of the induced metric .
int depth
Number of stored time slices.
Evolution_std< Scalar > n_evol
Values at successive time steps of the lapse function N.
Evolution_std< double > the_time
Time label of each slice.
Evolution_std< Vector > beta_evol
Values at successive time steps of the shift vector .
virtual const Scalar & trh() const
Computes the trace h, with respect to the flat metric ff , 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< Scalar > source_B_hh_evol
The potential 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 & B_hh() const
Returns the potential of .
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...
Evolution_std< Scalar > A_hh_evol
The A potential of .
virtual ~Tslice_dirac_max()
Destructor.
void operator=(const Tslice_dirac_max &)
Assignment to another Tslice_dirac_max.
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< Scalar > source_B_hata_evol
The potential of the source of equation for .
virtual void set_hh(const Sym_tensor &hh_in)
Sets the deviation of the conformal metric from the flat metric : .
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 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 void sauve(FILE *fich, bool partial_save) const
Total or partial saves in a binary file.
virtual void set_trh(const Scalar &trh_in)
Sets the trace, with respect to the flat metric ff , of .
virtual const Scalar & A_hh() const
Returns the potential A of .
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator<<).
virtual const Vector & hdirac() const
Vector which vanishes in Dirac gauge.
Evolution_std< Scalar > trh_evol
The trace, with respect to the flat metric ff , of .
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.
void initialize_sources_copy() const
Copy the sources source_A_XXX_evol and source_B_XXX_evol to all time-steps.
Evolution_std< Scalar > B_hh_evol
The potential of .
Evolution_std< Scalar > source_A_hata_evol
The potential A of the source of equation for .
Tensor field of valence 1.
Cmp exp(const Cmp &)
Exponential.
int fread_be(int *aa, int size, int nb, FILE *fich)
Reads integer(s) from a binary file according to the big endian convention.
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 Map & get_mp() const
Returns the mapping.
void annule_domain(int l)
Sets the Tensor to zero in a given domain.
virtual void set_etat_zero()
Sets the logical state of all components to ETATZERO (zero state).
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.
Map(const Mg3d &)
Constructor from a multi-domain 3D grid.
const Metric_flat & flat_met_spher() const
Returns the flat metric associated with the spherical coordinates and with components expressed in th...