88 #include "time_slice.h" 90 #include "graphique.h" 91 #include "utilitaires.h" 96 double pdt,
double precis,
int method_poisson_vect,
97 const char* graph_device,
const Scalar* p_ener_dens,
98 const Vector* p_mom_dens,
const Scalar* p_trace_stress) {
107 "Time_slice_conf::initial_data_cts : the trace of u^{ij} with respect\n" 108 <<
" to the conformal metric tgam_{ij} is not zero !\n" 109 <<
" error = " << tr_uu << endl ;
134 double ray_des = 1.25 * map.
val_r(nz-2, 1., 0., 0.) ;
138 if (p_ener_dens != 0x0) ener_dens = *(p_ener_dens) ;
141 Vector mom_dens(map, CON, triad) ;
142 if (p_mom_dens != 0x0) mom_dens = *(p_mom_dens) ;
145 Scalar trace_stress(map) ;
146 if (p_trace_stress != 0x0) trace_stress = *(p_trace_stress) ;
152 Vector source_beta(map, CON, triad) ;
157 for (
int i=0; i<imax; i++) {
178 source_psi = tmp -
psi()*
psi4()* ( 0.5*qpig* ener_dens
180 - 8.33333333333333e-2*
trk()*
trk() ) ;
185 source_nn =
psi4()*(
nn()*( qpig* (ener_dens + trace_stress) + aa_quad
186 - 0.3333333333333333*
trk()*
trk() )
203 dnn - 6.*
nn() * dln_psi, 0) ;
205 source_beta += 2.*
nn() * ( 2.*qpig*
psi4() * mom_dens
211 beta().derive_cov(
ff).derive_cov(
ff), 1, 2)
212 + 0.3333333333333333*
218 source_beta -= vtmp ;
236 "Absolute error in the resolution of the equation for Psi") ;
238 des_meridian(psi_jp1, 0., ray_des,
"Psi", ngraph0, graph_device) ;
249 "Absolute error in the resolution of the equation for N") ;
251 des_meridian(nn_jp1, 0., ray_des,
"N", ngraph0+1, graph_device) ;
257 method_poisson_vect) ;
259 des_meridian(beta_jp1(1), 0., ray_des,
"\\gb\\ur\\d", ngraph0+2,
261 des_meridian(beta_jp1(2), 0., ray_des,
"\\gb\\u\\gh\\d", ngraph0+3,
263 des_meridian(beta_jp1(3), 0., ray_des,
"\\gb\\u\\gf\\d", ngraph0+4,
270 maxabs(test_beta - source_beta,
271 "Absolute error in the resolution for beta") ;
281 cout <<
"step = " << i <<
" : diff_psi = " << diff_psi
282 <<
" diff_nn = " << diff_nn
283 <<
" diff_beta = " << diff_beta << endl ;
284 if ( (diff_psi < precis) && (diff_nn < precis) && (diff_beta < precis) )
316 double ttime1 = ttime ;
318 for (
int j=1; j <
depth; j++) {
339 for (
int j=1; j <
depth; j++) {
virtual const Vector & beta() const
shift vector at the current time step (jtime )
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 Scalar & psi4() const
Factor at the current time step (jtime ).
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 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 void set_etat_zero()
Sets the logical state to ETATZERO (zero).
virtual const Metric & tgam() const
Conformal metric Returns the value at the current time step (jtime ).
virtual void del_deriv() const
Deletes all the derived quantities.
Standard units of space, time and mass.
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.
const Scalar & laplacian(int ced_mult_r=4) const
Returns the Laplacian of *this.
Tensor field of valence 0 (or component of a tensorial field).
Scalar poisson() const
Solves the scalar Poisson equation with *this as a source.
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.
Tensor up_down(const Metric &gam) const
Computes a new tensor by raising or lowering all the indices of *this .
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. ...
int get_etat() const
Returns the logical state ETATNONDEF (undefined), ETATZERO (null) or ETATQCQ (ordinary).
const Vector & derive_con(const Metric &gam) const
Returns the "contravariant" derivative of *this with respect to some metric , by raising the index of...
Tensor field of valence 1.
Vectorial bases (triads) with respect to which the tensorial components are defined.
Tbl diffrel(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (norme version).
virtual const Sym_tensor & hh(Param *=0x0, Param *=0x0) const
Deviation of the conformal metric from the flat metric : .
Evolution_std< Scalar > B_hata_evol
Potential associated with the symmetric tensor .
virtual void dec_dzpuis(int dec=1)
Decreases by dec units the value of dzpuis and changes accordingly the values in the compactified ext...
Evolution_std< Sym_tensor > k_uu_evol
Values at successive time steps of the contravariant components of the extrinsic curvature tensor ...
Sym_tensor ope_killing_conf(const Metric &gam) const
Computes the conformal Killing operator associated with a given metric.
virtual void set_hata(const Sym_tensor &hata_in)
Sets the conformal representation of the traceless part of the extrinsic curvature: ...
virtual double val_r(int l, double xi, double theta, double pphi) const =0
Returns the value of the radial coordinate r for a given in a given domain.
const Vector & divergence(const Metric &) const
Returns the divergence of this with respect to a Metric .
virtual const Scalar & trk() const
Trace K of the extrinsic curvature at the current time step (jtime )
const Base_vect * get_triad() const
Returns the vectorial basis (triad) on which the components are defined.
virtual void inc_dzpuis(int inc=1)
Increases by inc units the value of dzpuis and changes accordingly the values of the Scalar in the co...
virtual const Scalar & ricci_scal() const
Returns the Ricci scalar.
virtual const Scalar & A_hata() const
Returns the potential A of .
Vector poisson(double lambda, int method=6) const
Solves the vector Poisson equation with *this as a source.
const Scalar & ln_psi() const
Logarithm of 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 ...
int get_nzone() const
Returns the number of domains.
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
const Scalar & divergence(const Metric &) const
The divergence of this with respect to a Metric .
virtual Sym_tensor aa() const
Conformal representation of the traceless part of the extrinsic curvature: .
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
const Tensor & derive_cov(const Metric &gam) const
Returns the covariant derivative of this with respect to some metric .
Evolution_std< double > the_time
Time label of each slice.
virtual void inc_dzpuis(int inc=1)
Increases by inc units the value of dzpuis and changes accordingly the values in the compactified ext...
void des_meridian(const Scalar &uu, double r_min, double r_max, const char *nomy, int ngraph, const char *device=0x0, bool closeit=false, bool draw_bound=true)
Draws 5 profiles of a scalar field along various radial axes in two meridional planes and ...
const Tensor & derive_con(const Metric &gam) const
Returns the "contravariant" derivative of this with respect to some metric , by raising the last inde...
Vector derive_lie(const Vector &v) const
Computes the Lie derivative of this with respect to some vector field v.
const Metric_flat & ff
Pointer on the flat metric with respect to which the conformal decomposition is performed.
Evolution_std< Scalar > trk_evol
Values at successive time steps of the trace K of the extrinsic curvature.
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 .
Evolution_std< Sym_tensor > hata_evol
Values at successive time steps of the components .
bool check_dzpuis(int dzi) const
Returns false if the last domain is compactified and *this is not zero in this domain and dzpuis is n...
Evolution_std< Vector > beta_evol
Values at successive time steps of the shift vector .
const Vector & derive_cov(const Metric &gam) const
Returns the gradient (1-form = covariant vector) of *this
const Map & get_mp() const
Returns the mapping.
int depth
Number of stored time slices.
Evolution_std< Sym_tensor > hh_evol
Values at successive time steps of the components .
Class intended to describe valence-2 symmetric tensors.
Tensor trace(int ind1, int ind2) const
Trace on two different type indices.
virtual const Scalar & nn() const
Lapse function N at the current time step (jtime )