30char binaire_constr_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Binaire/binaire_constr.C,v 1.3 2014/10/13 08:52:44 j_novak Exp $" ;
84 p_lap_alpha[0] = &lap_alpha1 ;
85 p_lap_alpha[1] = &lap_alpha2 ;
86 p_source[0] = &source1 ;
87 p_source[1] = &source2 ;
96 for (
int i=0; i<2; i++) {
101 Tenseur alpha_auto =
et[i]->get_beta_auto()
102 -
et[i]->get_logn_auto() ;
104 *(p_lap_alpha[i]) = alpha_auto().laplacien() ;
109 const Tenseur& a_car =
et[i]->get_a_car() ;
110 const Tenseur& ener_euler =
et[i]->get_ener_euler() ;
112 Tenseur d_alpha_auto =
et[i]->get_d_beta_auto()
113 -
et[i]->get_d_logn_auto() ;
115 Tenseur d_alpha_comp =
et[i]->get_d_beta_comp()
116 -
et[i]->get_d_logn_comp() ;
118 const Tenseur& akcar_auto =
et[i]->get_akcar_auto() ;
119 const Tenseur& akcar_comp =
et[i]->get_akcar_comp() ;
121 *(p_source[i]) = - qpig * a_car * ener_euler
122 - 0.25 * ( akcar_auto + akcar_comp )
130 Tbl diff =
diffrel( (*(p_lap_alpha[i]))(), (*(p_source[i]))() ) ;
133 "Binaire::ham_constr : relative difference Lap(alpha) <-> source : "
134 << endl << diff << endl ;
174 p_source[0] = &source1 ;
175 p_source[1] = &source2 ;
186 for (
int i=0; i<2; i++) {
191 const Tenseur& a_car =
et[i]->get_a_car() ;
192 Tenseur kij_auto =
et[i]->get_tkij_auto() / a_car ;
210 const Tenseur& u_euler =
et[i]->get_u_euler() ;
211 const Tenseur& ener_euler =
et[i]->get_ener_euler() ;
212 const Tenseur& press =
et[i]->get_press() ;
215 Tenseur d_alpha =
et[i]->get_d_beta_auto()
216 -
et[i]->get_d_logn_auto()
217 +
et[i]->get_d_beta_comp()
218 -
et[i]->get_d_logn_comp() ;
220 *(p_source[i]) = 2 * qpig * (ener_euler + press) * u_euler
221 - 5 *
contract(kij_auto, 1, d_alpha, 0) ;
225 Tbl diffx =
diffrel( (*(p_divk[i]))(0), (*(p_source[i]))(0)) ;
226 Tbl diffy =
diffrel( (*(p_divk[i]))(1), (*(p_source[i]))(1)) ;
227 Tbl diffz =
diffrel( (*(p_divk[i]))(2), (*(p_source[i]))(2)) ;
229 cout <<
"Binaire::mom_constr : norme div(K) : " << endl ;
230 cout <<
"X component : " <<
norme( (*(p_divk[i]))(0) ) << endl ;
231 cout <<
"Y component : " <<
norme( (*(p_divk[i]))(1) ) << endl ;
232 cout <<
"Z component : " <<
norme( (*(p_divk[i]))(2) ) << endl ;
234 cout <<
"Binaire::mom_constr : norme source : " << endl ;
235 cout <<
"X component : " <<
norme( (*(p_source[i]))(0) ) << endl ;
236 cout <<
"Y component : " <<
norme( (*(p_source[i]))(1) ) << endl ;
237 cout <<
"Z component : " <<
norme( (*(p_source[i]))(2) ) << endl ;
241 "Binaire::mom_constr : rel. diff. div(K) <-> source : "
243 cout <<
"X component : " << diffx << endl ;
244 cout <<
"Y component : " << diffy << endl ;
245 cout <<
"Z component : " << diffz << endl ;
248 somx +=
max(
abs(diffx) ) ;
249 somy +=
max(
abs(diffy) ) ;
250 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.