29char star_binupmetr_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Star/star_bin_upmetr.C,v 1.14 2014/10/13 08:53:38 j_novak Exp $" ;
86#include "utilitaires.h"
98 int nz =
mp.get_mg()->get_nzone() ;
99 int nr =
mp.get_mg()->get_nr(0);
100 int nt =
mp.get_mg()->get_nt(0);
101 int np =
mp.get_mg()->get_np(0);
105 if ( (comp.
logn_auto).get_etat() == ETATZERO ) {
124 (
beta_comp.set(1)).import( comp_beta(1) ) ;
125 (
beta_comp.set(2)).import( comp_beta(2) ) ;
126 (
beta_comp.set(3)).import( comp_beta(3) ) ;
130 if ( (comp.
lnq_auto).get_etat() == ETATZERO ) {
147 for(
int i=1; i<=3; i++)
148 for(
int j=i; j<=3; j++) {
151 hij_comp.set(i,j).import( (comp_hij)(i,j) ) ;
163 nn.std_spectral_base() ;
171 psi4.std_spectral_base() ;
183 for(
int i=1; i<=3; i++)
184 for(
int j=i; j<=3; j++) {
187 gtilde_con.
set(i,j) =
hij(i,j) +
flat.con()(i,j) ;
202 hij.set_etat_zero() ;
213 double* max_det =
new double[nz] ;
214 double* min_det =
new double[nz] ;
215 double* moy_det =
new double[nz] ;
217 for (
int i=0; i<nz; i++){
223 for (
int l=0; l<nz; l++)
224 for (
int k=0; k<np; k++)
225 for (
int j=0; j<nt; j++)
226 for (
int i=0; i<nr; i++){
237 cout <<
"average determinant of gtilde in each zone : " << endl ;
238 for (
int l=0; l<nz; l++){
239 cout << moy_det[l]/(nr*nt*np) <<
" " ;
244 cout <<
"maximum of the determinant of gtilde in each zone : " << endl ;
245 for (
int l=0; l<nz; l++){
246 cout << max_det[l] <<
" " ;
250 cout <<
"minimum of the determinant of gtilde in each zone : " << endl ;
251 for (
int l=0; l<nz; l++){
252 cout << min_det[l] <<
" " ;
278 double relax,
double om) {
284 int nz =
mp.get_mg()->get_nzone() ;
285 int nr =
mp.get_mg()->get_nr(0);
286 int nt =
mp.get_mg()->get_nt(0);
287 int np =
mp.get_mg()->get_np(0);
291 if ( (comp.
logn_auto).get_etat() == ETATZERO ) {
310 (
beta_comp.set(1)).import( comp_beta(1) ) ;
311 (
beta_comp.set(2)).import( comp_beta(2) ) ;
312 (
beta_comp.set(3)).import( comp_beta(3) ) ;
317 if ( (comp.
lnq_auto).get_etat() == ETATZERO ) {
335 for(
int i=1; i<=3; i++)
336 for(
int j=i; j<=3; j++) {
339 hij_comp.set(i,j).import( (comp_hij)(i,j) ) ;
346 double relaxjm1 = 1. - relax ;
356 for(
int i=1; i<=3; i++)
357 for(
int j=i; j<=3; j++) {
360 + relaxjm1 * (star_jm1.
hij_comp)(i,j) ;
371 nn.std_spectral_base() ;
380 psi4.std_spectral_base() ;
392 for(
int i=1; i<=3; i++)
393 for(
int j=i; j<=3; j++) {
396 gtilde_con.
set(i,j) =
hij(i,j) +
flat.con()(i,j) ;
410 hij.set_etat_zero() ;
420 double* max_det =
new double[nz] ;
421 double* min_det =
new double[nz] ;
422 double* moy_det =
new double[nz] ;
424 for (
int i=0; i<nz; i++){
430 for (
int l=0; l<nz; l++)
431 for (
int k=0; k<np; k++)
432 for (
int j=0; j<nt; j++)
433 for (
int i=0; i<nr; i++){
444 cout <<
"average determinant of gtilde in each zone : " << endl ;
445 for (
int l=0; l<nz; l++){
446 cout << moy_det[l]/(nr*nt*np) <<
" " ;
451 cout <<
"maximum of the determinant of gtilde in each zone : " << endl ;
452 for (
int l=0; l<nz; l++){
453 cout << max_det[l] <<
" " ;
457 cout <<
"minimum of the determinant of gtilde in each zone : " << endl ;
458 for (
int l=0; l<nz; l++){
459 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.