121 double precis,
int it_max ) {
124 assert(dynamic_cast<const Base_vect_spher*>(
triad) != 0x0) ;
127 assert(&mu_in !=
p_mu) ;
128 assert( (precis > 0.) && (it_max > 0) ) ;
142 Param* par_mat,
double precis,
145 assert(dynamic_cast<const Base_vect_spher*>(
triad) != 0x0) ;
148 assert(&a_in !=
p_aaa) ;
150 assert( (precis > 0.) && (it_max > 0) ) ;
167 zero.set_etat_zero() ;
174 hijtt.
set_auxiliary(hrr_tt, eta_sr_tt, mu_over_r, w_tt, x_new, zero) ;
180 for (
int it=0; it<=it_max; it++) {
184 set_auxiliary(hrr_new+hrr_tt, eta_over_r+eta_sr_tt, mu_over_r,
185 w_new+w_tt, x_new, h_old - hrr_new-hrr_tt) ;
188 Scalar h_new = (1 + hij(1,1))*( hij(2,3)*hij(2,3) - hij(2,2)*hij(3,3) )
189 + hij(1,2)*hij(1,2)*(1 + hij(3,3))
190 + hij(1,3)*hij(1,3)*(1 + hij(2,2))
191 - hij(1,1)*(hij(2,2) + hij(3,3)) - 2*hij(1,2)*hij(1,3)*hij(2,3) ;
194 double diff =
max(
max(
abs(h_new - h_old))) ;
196 cout <<
"Sym_tensor_trans::set_AtB_det_one : " 197 <<
"iteration : " << it <<
" convergence on h: " 201 set_auxiliary(hrr_new+hrr_tt, eta_over_r+eta_sr_tt, mu_over_r,
202 w_new+w_tt, x_new, h_old - hrr_new-hrr_tt) ;
215 h_old = lambda*h_new +(1-lambda)*h_old ;
219 cout <<
"Sym_tensor_trans:::set_AtBtt_det_one : convergence not reached \n" ;
220 cout <<
" for the required accuracy (" << precis <<
") ! " 231 double precis,
int it_max ) {
233 assert(dynamic_cast<const Base_vect_spher*>(
triad) != 0x0) ;
234 assert( (precis > 0.) && (it_max > 0) ) ;
249 zero.set_etat_zero() ;
251 const Scalar& hrr_tt = hijtt( 1, 1 ) ;
260 for (
int it=0; it<=it_max; it++) {
264 set_auxiliary(hrr_new+hrr_tt, eta_over_r+eta_sr_tt, mu_over_r,
265 w_new+w_tt, x_new, h_old - hrr_new-hrr_tt) ;
268 Scalar h_new = (1 + hij(1,1))*( hij(2,3)*hij(2,3) - hij(2,2)*hij(3,3) )
269 + hij(1,2)*hij(1,2)*(1 + hij(3,3))
270 + hij(1,3)*hij(1,3)*(1 + hij(2,2))
271 - hij(1,1)*(hij(2,2) + hij(3,3)) - 2*hij(1,2)*hij(1,3)*hij(2,3) ;
274 double diff =
max(
max(
abs(h_new - h_old))) ;
276 cout <<
"Sym_tensor_trans::set_tt_part_det_one : " 277 <<
"iteration : " << it <<
" convergence on h: " 281 set_auxiliary(hrr_new+hrr_tt, eta_over_r+eta_sr_tt, mu_over_r,
282 w_new+w_tt, x_new, h_old - hrr_new-hrr_tt) ;
291 h_old = lambda*h_new +(1-lambda)*h_old ;
295 cout <<
"Sym_tensor_trans:::set_AtBtt_det_one : convergence not reached \n" ;
296 cout <<
" for the required accuracy (" << precis <<
") ! " 309 assert(dynamic_cast<const Base_vect_spher*>(
triad) != 0x0) ;
313 assert(&a_in !=
p_aaa) ;
330 set_auxiliary(hrr_new, eta_over_r, mu_over_r, w_new, x_new, hh - hrr_new) ;
const Base_val & get_spectral_base() const
Returns the spectral bases of the Valeur va.
Scalar * p_mu
Field such that the components of the tensor are written (has only meaning with spherical component...
const Scalar & mu(Param *par=0x0) const
Gives the field (see member p_mu ).
Scalar * p_tilde_b
Field defined from and h insensitive to the longitudinal part of the Sym_tensor.
virtual void set_etat_zero()
Sets the logical state to ETATZERO (zero).
const Metric *const met_div
Metric with respect to which the divergence and the trace are defined.
Tensor field of valence 0 (or component of a tensorial field).
const Scalar & xxx() const
Gives the field X (see member p_xxx ).
const Base_vect * triad
Vectorial basis (triad) with respect to which the tensor components are defined.
void sol_Dirac_A(const Scalar &aaa, Scalar &tilde_mu, Scalar &xxx, const Param *par_bc=0x0) const
Solves a system of two coupled first-order PDEs obtained from the divergence-free condition (Dirac ga...
Scalar * p_trace
Trace with respect to the metric *met_div.
Scalar get_tilde_B_from_TT_trace(const Scalar &tilde_B_tt_in, const Scalar &trace) const
Computes (see Sym_tensor::p_tilde_b ) from its transverse-traceless part and the trace...
virtual void dec_dzpuis(int dec=1)
Decreases by dec units the value of dzpuis and changes accordingly the values in the compactified ext...
Scalar * p_aaa
Field A defined from X and insensitive to the longitudinal part of the Sym_tensor (only for )...
const Scalar & www() const
Gives the field W (see member p_www ).
Sym_tensor_tt * p_tt
Traceless part with respect to the metric *met_div.
void div_r()
Division by r everywhere; dzpuis is not changed.
void set_AtBtt_det_one(const Scalar &a_in, const Scalar &tbtt_in, const Scalar *h_prev=0x0, Param *par_bc=0x0, Param *par_mat=0x0, double precis=1.e-14, int it_max=100)
Assigns the derived member A and computes from its TT-part (see Sym_tensor::compute_tilde_B_tt() )...
void set_AtB_trace(const Scalar &a_in, const Scalar &tb_in, const Scalar &trace, Param *par_bc=0x0, Param *par_mat=0x0)
Assigns the derived members A , and the trace.
void set_rr_mu(const Scalar &hrr, const Scalar &mu_i)
Sets the component , as well as the angular potential (see member p_mu ).
virtual const Scalar & eta(Param *par=0x0) const
Gives the field (see member p_eta ).
void set_tt_part_det_one(const Sym_tensor_tt &hijtt, const Scalar *h_prev=0x0, Param *par_mat=0x0, double precis=1.e-14, int it_max=100)
Assignes the TT-part of the tensor.
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
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...
void sol_Dirac_tilde_B(const Scalar &tilde_b, const Scalar &hh, Scalar &hrr, Scalar &tilde_eta, Scalar &www, Param *par_bc=0x0, Param *par_mat=0x0) const
Solves a system of three coupled first-order PDEs obtained from divergence-free conditions (Dirac gau...
Transverse symmetric tensors of rank 2.
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 set_spectral_base(const Base_val &)
Sets the spectral bases of the Valeur va
void set_auxiliary(const Scalar &trr, const Scalar &eta_over_r, const Scalar &mu_over_r, const Scalar &www, const Scalar &xxx, const Scalar &ttt)
Assigns the component and the derived members p_eta , p_mu , p_www, p_xxx and p_ttt ...
Cmp abs(const Cmp &)
Absolute value.
void set_hrr_mu_det_one(const Scalar &hrr, const Scalar &mu_in, double precis=1.e-14, int it_max=100)
Assigns the rr component and the derived member .
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...
const Map *const mp
Mapping on which the numerical values at the grid points are defined.
Transverse and traceless symmetric tensors of rank 2.