87 p_lap_alpha[0] = &lap_alpha1 ;
88 p_lap_alpha[1] = &lap_alpha2 ;
89 p_source[0] = &source1 ;
90 p_source[1] = &source2 ;
99 for (
int i=0; i<2; i++) {
104 Tenseur alpha_auto =
et[i]->get_beta_auto()
105 -
et[i]->get_logn_auto() ;
107 *(p_lap_alpha[i]) = alpha_auto().laplacien() ;
112 const Tenseur& a_car =
et[i]->get_a_car() ;
113 const Tenseur& ener_euler =
et[i]->get_ener_euler() ;
115 Tenseur d_alpha_auto =
et[i]->get_d_beta_auto()
116 -
et[i]->get_d_logn_auto() ;
118 Tenseur d_alpha_comp =
et[i]->get_d_beta_comp()
119 -
et[i]->get_d_logn_comp() ;
121 const Tenseur& akcar_auto =
et[i]->get_akcar_auto() ;
122 const Tenseur& akcar_comp =
et[i]->get_akcar_comp() ;
124 *(p_source[i]) = - qpig * a_car * ener_euler
125 - 0.25 * ( akcar_auto + akcar_comp )
133 Tbl diff =
diffrel( (*(p_lap_alpha[i]))(), (*(p_source[i]))() ) ;
136 "Binaire::ham_constr : relative difference Lap(alpha) <-> source : "
137 << endl << diff << endl ;
177 p_source[0] = &source1 ;
178 p_source[1] = &source2 ;
189 for (
int i=0; i<2; i++) {
194 const Tenseur& a_car =
et[i]->get_a_car() ;
195 Tenseur kij_auto =
et[i]->get_tkij_auto() / a_car ;
213 const Tenseur& u_euler =
et[i]->get_u_euler() ;
214 const Tenseur& ener_euler =
et[i]->get_ener_euler() ;
215 const Tenseur& press =
et[i]->get_press() ;
218 Tenseur d_alpha =
et[i]->get_d_beta_auto()
219 -
et[i]->get_d_logn_auto()
220 +
et[i]->get_d_beta_comp()
221 -
et[i]->get_d_logn_comp() ;
223 *(p_source[i]) = 2 * qpig * (ener_euler + press) * u_euler
224 - 5 *
contract(kij_auto, 1, d_alpha, 0) ;
228 Tbl diffx =
diffrel( (*(p_divk[i]))(0), (*(p_source[i]))(0)) ;
229 Tbl diffy =
diffrel( (*(p_divk[i]))(1), (*(p_source[i]))(1)) ;
230 Tbl diffz =
diffrel( (*(p_divk[i]))(2), (*(p_source[i]))(2)) ;
232 cout <<
"Binaire::mom_constr : norme div(K) : " << endl ;
233 cout <<
"X component : " <<
norme( (*(p_divk[i]))(0) ) << endl ;
234 cout <<
"Y component : " <<
norme( (*(p_divk[i]))(1) ) << endl ;
235 cout <<
"Z component : " <<
norme( (*(p_divk[i]))(2) ) << endl ;
237 cout <<
"Binaire::mom_constr : norme source : " << endl ;
238 cout <<
"X component : " <<
norme( (*(p_source[i]))(0) ) << endl ;
239 cout <<
"Y component : " <<
norme( (*(p_source[i]))(1) ) << endl ;
240 cout <<
"Z component : " <<
norme( (*(p_source[i]))(2) ) << endl ;
244 "Binaire::mom_constr : rel. diff. div(K) <-> source : "
246 cout <<
"X component : " << diffx << endl ;
247 cout <<
"Y component : " << diffy << endl ;
248 cout <<
"Z component : " << diffz << endl ;
251 somx +=
max(
abs(diffx) ) ;
252 somy +=
max(
abs(diffy) ) ;
253 somz +=
max(
abs(diffz) ) ;
double * p_ham_constr
Relative error on the Hamiltonian constraint.
Etoile_bin * et[2]
Array of the two stars (to perform loops on the stars): {\tt et[0]} contains the address of {\tt star...
Tbl * p_mom_constr
Relative error on the momentum constraint.
Etoile_bin star2
Second star of the system.
const Base_vect_cart ref_triad
Cartesian triad of the absolute reference frame.
const Tbl & mom_constr() const
Estimates the relative error on the momentum constraint equation by comparing ${\overline\nabla}...
Etoile_bin star1
First star of the system.
double ham_constr() const
Estimates the relative error on the Hamiltonian constraint equation by comparing $\underline\Delta\ln...
Tensor handling *** DEPRECATED : use class Tensor instead ***.
void dec2_dzpuis()
dzpuis -= 2 ;
const Tenseur & gradient() const
Returns the gradient of *this (Cartesian coordinates).
void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
Tbl diffrel(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (norme version).
Tbl norme(const Cmp &)
Sums of the absolute values of all the values of the Cmp in each domain.
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
Cmp abs(const Cmp &)
Absolute value.
Tenseur flat_scalar_prod(const Tenseur &t1, const Tenseur &t2)
Scalar product of two Tenseur when the metric is : performs the contraction of the last index of t1 w...
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping,...
Standard units of space, time and mass.