78 #include "time_slice.h" 83 ostream& ost,
bool verb)
const {
86 bool vacuum = ( energy_density == 0x0 ) ;
96 matter =
new Scalar (0*field) ;
98 matter = energy_density ;
100 if (verb) ost << endl ;
101 const char* comment = 0x0 ;
102 if (verb) comment =
"Check of the Hamiltonian constraint" ;
103 Tbl resu =
maxabs(field - (4*qpig) * (*matter), comment, ost,verb ) ;
104 if (verb) ost << endl ;
106 if (vacuum)
delete matter ;
113 ostream& ost,
bool verb)
const {
116 bool vacuum = ( momentum_density == 0x0 ) ;
123 matter =
new Vector (0*field) ;
126 matter = momentum_density ;
129 if (verb) ost << endl ;
130 const char* comment = 0x0 ;
131 if (verb) comment =
"Check of the momentum constraint" ;
132 Tbl resu =
maxabs(field - (2*qpig) * (*matter), comment, ost, verb ) ;
134 if (verb) ost << endl ;
136 if (vacuum)
delete matter ;
143 const Scalar* energy_density,
144 ostream& ost,
bool verb)
const {
148 bool vacuum = ( ( strain_tensor == 0x0 ) && ( energy_density == 0x0 ) ) ;
160 const Scalar* ener = 0x0 ;
164 if (energy_density == 0x0) {
169 ener = energy_density ;
170 if (strain_tensor == 0x0) {
175 sij = strain_tensor ;
179 if (new_e)
delete ener ;
180 if (new_s)
delete sij ;
184 + qpig * (*matter))) ;
191 if (verb) ost << endl ;
192 const char* comment = 0x0 ;
193 if (verb) comment =
"Check of the dynamical equations" ;
194 Tbl resu_tmp =
maxabs(dyn_lhs - dyn_rhs, comment, ost, verb) ;
196 if (verb) ost << endl ;
198 if (vacuum)
delete matter ;
204 for (
int i=1; i<=3; i++) {
205 for (
int j=1; j<=i; j++) {
210 assert (dyn_rhs.
position(idx) == pos) ;
212 for (
int lz=0; lz<resu_tmp.
get_dim(0); lz++)
213 resu.set(i,j,lz) = resu_tmp(pos, lz) ;
virtual const Vector & beta() const
shift vector at the current time step (jtime )
void annule_domain(int l)
Sets the Tensor to zero in a given domain.
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.
virtual const Sym_tensor & con() const
Read-only access to the contravariant representation.
int & set(int i)
Read/write of a particular element (index i ) (1D case)
Standard units of space, time and mass.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
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.
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).
Tensor up_down(const Metric &gam) const
Computes a new tensor by raising or lowering all the indices of *this .
Basic integer array class.
int jtime
Time step index of the latest slice.
const Sym_tensor & ricci() const
Returns the Ricci tensor (given by the Connection p_connect )
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.
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 ) ...
const Vector & divergence(const Metric &) const
Returns the divergence of this with respect to a Metric .
virtual const Scalar & ricci_scal() const
Returns the Ricci scalar.
int get_index_type(int i) const
Gives the type (covariant or contravariant) of the index number i .
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.
const Metric & gam() const
Induced metric at the current time step (jtime )
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.
int get_dim(int i) const
Gives the i-th dimension (ie dim.dim[i])
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
virtual const Sym_tensor & k_dd() const
Extrinsic curvature tensor (covariant components ) at the current time step (jtime ) ...
const Tensor & derive_con(const Metric &gam) const
Returns the "contravariant" derivative of this with respect to some metric , by raising the last inde...
virtual int position(const Itbl &ind) const
Returns the position in the array cmp of a component given by its indices.
const Map & get_mp() const
Returns the mapping.
void annule_hard()
Sets the Tbl to zero in a hard way.
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...
Sym_tensor derive_lie(const Vector &v) const
Computes the Lie derivative of this with respect to some vector field v.
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.
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 )