28 char sym_tensor_trans_aux_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Tensor/sym_tensor_trans_aux.C,v 1.21 2014/10/13 08:53:43 j_novak Exp $" ;
118 double precis,
int it_max ) {
124 assert(&mu_in !=
p_mu) ;
125 assert( (precis > 0.) && (it_max > 0) ) ;
139 Param* par_mat,
double precis,
145 assert(&a_in !=
p_aaa) ;
147 assert( (precis > 0.) && (it_max > 0) ) ;
164 zero.set_etat_zero() ;
171 hijtt.
set_auxiliary(hrr_tt, eta_sr_tt, mu_over_r, w_tt, x_new, zero) ;
177 for (
int it=0; it<=it_max; it++) {
181 set_auxiliary(hrr_new+hrr_tt, eta_over_r+eta_sr_tt, mu_over_r,
182 w_new+w_tt, x_new, h_old - hrr_new-hrr_tt) ;
185 Scalar h_new = (1 + hij(1,1))*( hij(2,3)*hij(2,3) - hij(2,2)*hij(3,3) )
186 + hij(1,2)*hij(1,2)*(1 + hij(3,3))
187 + hij(1,3)*hij(1,3)*(1 + hij(2,2))
188 - hij(1,1)*(hij(2,2) + hij(3,3)) - 2*hij(1,2)*hij(1,3)*hij(2,3) ;
191 double diff =
max(
max(
abs(h_new - h_old))) ;
193 cout <<
"Sym_tensor_trans::set_AtB_det_one : "
194 <<
"iteration : " << it <<
" convergence on h: "
198 set_auxiliary(hrr_new+hrr_tt, eta_over_r+eta_sr_tt, mu_over_r,
199 w_new+w_tt, x_new, h_old - hrr_new-hrr_tt) ;
212 h_old = lambda*h_new +(1-lambda)*h_old ;
216 cout <<
"Sym_tensor_trans:::set_AtBtt_det_one : convergence not reached \n" ;
217 cout <<
" for the required accuracy (" << precis <<
") ! "
228 double precis,
int it_max ) {
231 assert( (precis > 0.) && (it_max > 0) ) ;
246 zero.set_etat_zero() ;
248 const Scalar& hrr_tt = hijtt( 1, 1 ) ;
257 for (
int it=0; it<=it_max; it++) {
261 set_auxiliary(hrr_new+hrr_tt, eta_over_r+eta_sr_tt, mu_over_r,
262 w_new+w_tt, x_new, h_old - hrr_new-hrr_tt) ;
265 Scalar h_new = (1 + hij(1,1))*( hij(2,3)*hij(2,3) - hij(2,2)*hij(3,3) )
266 + hij(1,2)*hij(1,2)*(1 + hij(3,3))
267 + hij(1,3)*hij(1,3)*(1 + hij(2,2))
268 - hij(1,1)*(hij(2,2) + hij(3,3)) - 2*hij(1,2)*hij(1,3)*hij(2,3) ;
271 double diff =
max(
max(
abs(h_new - h_old))) ;
273 cout <<
"Sym_tensor_trans::set_tt_part_det_one : "
274 <<
"iteration : " << it <<
" convergence on h: "
278 set_auxiliary(hrr_new+hrr_tt, eta_over_r+eta_sr_tt, mu_over_r,
279 w_new+w_tt, x_new, h_old - hrr_new-hrr_tt) ;
288 h_old = lambda*h_new +(1-lambda)*h_old ;
292 cout <<
"Sym_tensor_trans:::set_AtBtt_det_one : convergence not reached \n" ;
293 cout <<
" for the required accuracy (" << precis <<
") ! "
310 assert(&a_in !=
p_aaa) ;
327 set_auxiliary(hrr_new, eta_over_r, mu_over_r, w_new, x_new, hh - hrr_new) ;
Spherical orthonormal vectorial bases (triads).
Tensor field of valence 0 (or component of a tensorial field).
const Base_val & get_spectral_base() const
Returns the spectral bases of the Valeur va
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...
void div_r()
Division by r everywhere; dzpuis is not changed.
virtual void set_etat_zero()
Sets the logical state to ETATZERO (zero).
void set_spectral_base(const Base_val &)
Sets the spectral bases of the Valeur va
Transverse symmetric tensors of rank 2.
Sym_tensor_tt * p_tt
Traceless part with respect to the metric *met_div
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 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...
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...
const Metric *const met_div
Metric with respect to which the divergence and the trace are defined.
Scalar * p_trace
Trace with respect to the metric *met_div
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_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.
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...
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 .
Transverse and traceless symmetric tensors of rank 2.
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 ).
const Scalar & xxx() const
Gives the field X (see member p_xxx ).
Scalar * p_aaa
Field A defined from X and insensitive to the longitudinal part of the Sym_tensor (only for ).
Scalar * p_tilde_b
Field defined from and h insensitive to the longitudinal part of the Sym_tensor.
Scalar * p_mu
Field such that the components of the tensor are written (has only meaning with spherical component...
const Scalar & www() const
Gives the field W (see member p_www ).
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.
const Scalar & mu(Param *par=0x0) const
Gives the field (see member p_mu ).
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 ,...
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
Cmp abs(const Cmp &)
Absolute value.
virtual void dec_dzpuis(int dec=1)
Decreases by dec units the value of dzpuis and changes accordingly the values in the compactified ext...
const Map *const mp
Mapping on which the numerical values at the grid points are defined.
virtual void inc_dzpuis(int inc=1)
Increases by inc units the value of dzpuis and changes accordingly the values in the compactified ext...
const Base_vect * triad
Vectorial basis (triad) with respect to which the tensor components are defined.