89#include "utilitaires.h"
101 int nz =
mp.get_mg()->get_nzone() ;
102 int nr =
mp.get_mg()->get_nr(0);
103 int nt =
mp.get_mg()->get_nt(0);
104 int np =
mp.get_mg()->get_np(0);
108 if ( (comp.
logn_auto).get_etat() == ETATZERO ) {
127 (
beta_comp.set(1)).import( comp_beta(1) ) ;
128 (
beta_comp.set(2)).import( comp_beta(2) ) ;
129 (
beta_comp.set(3)).import( comp_beta(3) ) ;
133 if ( (comp.
lnq_auto).get_etat() == ETATZERO ) {
150 for(
int i=1; i<=3; i++)
151 for(
int j=i; j<=3; j++) {
154 hij_comp.set(i,j).import( (comp_hij)(i,j) ) ;
166 nn.std_spectral_base() ;
174 psi4.std_spectral_base() ;
186 for(
int i=1; i<=3; i++)
187 for(
int j=i; j<=3; j++) {
190 gtilde_con.
set(i,j) =
hij(i,j) +
flat.con()(i,j) ;
205 hij.set_etat_zero() ;
216 double* max_det =
new double[nz] ;
217 double* min_det =
new double[nz] ;
218 double* moy_det =
new double[nz] ;
220 for (
int i=0; i<nz; i++){
226 for (
int l=0; l<nz; l++)
227 for (
int k=0; k<np; k++)
228 for (
int j=0; j<nt; j++)
229 for (
int i=0; i<nr; i++){
240 cout <<
"average determinant of gtilde in each zone : " << endl ;
241 for (
int l=0; l<nz; l++){
242 cout << moy_det[l]/(nr*nt*np) <<
" " ;
247 cout <<
"maximum of the determinant of gtilde in each zone : " << endl ;
248 for (
int l=0; l<nz; l++){
249 cout << max_det[l] <<
" " ;
253 cout <<
"minimum of the determinant of gtilde in each zone : " << endl ;
254 for (
int l=0; l<nz; l++){
255 cout << min_det[l] <<
" " ;
281 double relax,
double om) {
287 int nz =
mp.get_mg()->get_nzone() ;
288 int nr =
mp.get_mg()->get_nr(0);
289 int nt =
mp.get_mg()->get_nt(0);
290 int np =
mp.get_mg()->get_np(0);
294 if ( (comp.
logn_auto).get_etat() == ETATZERO ) {
313 (
beta_comp.set(1)).import( comp_beta(1) ) ;
314 (
beta_comp.set(2)).import( comp_beta(2) ) ;
315 (
beta_comp.set(3)).import( comp_beta(3) ) ;
320 if ( (comp.
lnq_auto).get_etat() == ETATZERO ) {
338 for(
int i=1; i<=3; i++)
339 for(
int j=i; j<=3; j++) {
342 hij_comp.set(i,j).import( (comp_hij)(i,j) ) ;
349 double relaxjm1 = 1. - relax ;
359 for(
int i=1; i<=3; i++)
360 for(
int j=i; j<=3; j++) {
363 + relaxjm1 * (star_jm1.
hij_comp)(i,j) ;
374 nn.std_spectral_base() ;
383 psi4.std_spectral_base() ;
395 for(
int i=1; i<=3; i++)
396 for(
int j=i; j<=3; j++) {
399 gtilde_con.
set(i,j) =
hij(i,j) +
flat.con()(i,j) ;
413 hij.set_etat_zero() ;
423 double* max_det =
new double[nz] ;
424 double* min_det =
new double[nz] ;
425 double* moy_det =
new double[nz] ;
427 for (
int i=0; i<nz; i++){
433 for (
int l=0; l<nz; l++)
434 for (
int k=0; k<np; k++)
435 for (
int j=0; j<nt; j++)
436 for (
int i=0; i<nr; i++){
447 cout <<
"average determinant of gtilde in each zone : " << endl ;
448 for (
int l=0; l<nz; l++){
449 cout << moy_det[l]/(nr*nt*np) <<
" " ;
454 cout <<
"maximum of the determinant of gtilde in each zone : " << endl ;
455 for (
int l=0; l<nz; l++){
456 cout << max_det[l] <<
" " ;
460 cout <<
"minimum of the determinant of gtilde in each zone : " << endl ;
461 for (
int l=0; l<nz; l++){
462 cout << min_det[l] <<
" " ;
Tensor field of valence 0 (or component of a tensorial field).
double val_grid_point(int l, int k, int j, int i) const
Returns the value of the field at a specified grid point.
Scalar lnq_auto
Scalar field generated principally by the star.
Sym_tensor hij_comp
Deviation of the inverse conformal metric from the inverse flat metric generated principally by the ...
virtual void del_deriv() const
Deletes all the derived quantities.
Vector beta_comp
Part of the shift vector generated principally by the star (Spherical components with respect to the ...
void update_metric(const Star_bin &comp, double omega)
Computes metric coefficients from known potentials, when the companion is another star.
Scalar logn_auto
Part of the lapse logarithm (gravitational potential at the Newtonian limit) generated principally by...
Scalar logn_comp
Part of the lapse logarithm (gravitational potential at the Newtonian limit) generated principally by...
void extrinsic_curvature(double omega)
Computes tkij_auto and akcar_auto from beta_auto, nn and Q.
Scalar lnq_comp
Scalar field generated principally by the companion star.
Vector beta_auto
Part of the shift vector generated principally by the star (Spherical components with respect to the ...
Star_bin(Map &mp_i, int nzet_i, const Eos &eos_i, bool irrot, bool conf_flat)
Standard constructor.
Sym_tensor hij
Total deviation of the inverse conformal metric from the inverse flat metric.
Sym_tensor hij_auto
Deviation of the inverse conformal metric from the inverse flat metric generated principally by the ...
Scalar psi4
Conformal factor .
Metric_flat flat
Flat metric defined on the mapping (Spherical components with respect to the mapping of the star) .
Metric gtilde
Conformal metric .
bool conf_flat
true if the 3-metric is conformally flat, false for a more general metric.
Scalar logn
Logarithm of the lapse N .
Scalar nn
Lapse function N .
const Map & get_mp() const
Returns the mapping.
Map & mp
Mapping associated with the star.
Class intended to describe valence-2 symmetric tensors.
Tensor field of valence 1.
virtual void change_triad(const Base_vect &)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
Cmp exp(const Cmp &)
Exponential.
virtual void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
const Base_vect * get_triad() const
Returns the vectorial basis (triad) on which the components are defined.
Scalar & set(const Itbl &ind)
Returns the value of a component (read/write version).
Map(const Mg3d &)
Constructor from a multi-domain 3D grid.