31char et_bin_vel_pot_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_vel_pot.C,v 1.15 2014/10/13 08:52:56 j_novak Exp $" ;
135#include "et_bin_nsbh.h"
136#include "utilitaires.h"
140Cmp raccord_c1(
const Cmp& uu,
int l1) ;
178 for (
int i=0; i<3; i++) {
179 v_orb.
set(i) = www(i)(0, 0, 0, 0) ;
182 v_orb.
annule(nzm1, nzm1) ;
197 for (
int l=
nzet; l <= nzm1; l++) {
198 dndh_log.
set(l) = 1 ;
206 Scalar zeta_h_scalar (zeta_h()) ;
208 for (
int l=1; l<=nzm1; l++)
211 Cmp zeta_h_cmp (zeta_h_scalar) ;
212 zeta_h.
set() = zeta_h_cmp ;
246 for (
int l=1; l<=nzm1; l++)
271 cout <<
"nr = " << nr <<
" nt = " << nt <<
" np = " << np << endl ;
273 cout <<
"psi0" << endl <<
norme(
psi0()/(nr*nt*np)) << endl ;
274 cout <<
"d(psi)/dr" << endl <<
norme(
psi0.
set().
dsdr()/(nr*nt*np)) << endl ;
292 for (
int i=0; i<3; i++) {
293 for (
int j=0; j<i; j++) {
300 Metrique flat(plat,
true) ;
304 for (
int i=0; i<3; i++) {
305 normal.
set(i) = dcov_r(i) ;
306 normal2.
set(i) = dcov_r(i) ;
325 limite = ( - dcov_psi(1) * normal(1) - dcov_psi(2) * normal(2)
329 for (
int j=0; j<nt; j++)
330 for (
int k=0; k<np; k++)
331 lim.
set(0, k, j, 0) = limite(0, k, j, nr-1) ;
337 source().poisson_neumann_interne(lim, par, resu) ;
351 for (
int l=1; l<=nzm1; l++)
359 Cmp laplacien_psi0 =
psi0().laplacien() ;
361 erreur =
diffrel(laplacien_psi0, source())(0) ;
363 cout <<
"Check of the resolution of the continuity equation for strange stars: "
365 cout <<
"norme(source) : " <<
norme(source())(0) << endl
366 <<
"Error in the solution : " << erreur << endl ;
377 for (
int i=0; i<3; i++) {
388 for (
int i=0; i<3; i++) {
431 for (
int i=0; i<3; i++) {
432 v_orb.
set(i) = www(i)(0, 0, 0, 0) ;
446 for (
int l=0; l<
nzet; l++) {
459 for (
int l=
nzet; l <= nzm1; l++) {
460 dndh_log.
set(l) = 1 ;
521 Cmp oper = zeta_h() *
psi0().laplacien() + bb_dpsi0() ;
525 cout <<
"Check of the resolution of the continuity equation : " << endl ;
528 for (
int l=0; l<
nzet; l++) {
529 double err = terr(l) ;
530 cout <<
" domain " << l <<
" : norme(source) : " <<
norme(source())(l)
531 <<
" relative error : " << err << endl ;
532 if (err > erreur) erreur = err ;
545 for (
int i=0; i<3; i++) {
556 for (
int i=0; i<3; i++) {
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Valeur va
The numerical value of the Cmp
void annule(int l)
Sets the Cmp to zero in a given domain.
Tbl & set(int l)
Read/write of the value in a given domain.
const Cmp & dsdr() const
Returns of *this .
Active physical coordinates and mapping derivatives.
virtual int identify() const =0
Returns a number to identify the sub-classe of Eos the object belongs to.
Cmp der_nbar_ent(const Cmp &ent, int nzet, int l_min=0, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy and extra parameters.
Class for a star in a NS-BH binary system.
Tenseur psi0
Scalar potential of the non-translational part of fluid 4-velocity (in the irrotational case)
Tenseur bsn
3-vector shift, divided by N , of the rotating coordinates, .
Tenseur d_psi
Gradient of (in the irrotational case) (Cartesian components with respect to ref_triad )
double velocity_potential(int mermax, double precis, double relax)
Computes the non-translational part of the velocity scalar potential by solving the continuity equat...
const Base_vect & ref_triad
Reference triad ("absolute frame"), with respect to which the components of all the member Tenseur 's...
Tenseur beta_comp
Part of the logarithm of AN generated principaly by the companion star.
Cmp ssjm1_psi
Effective source at the previous step for the resolution of the Poisson equation for the scalar by m...
int nzet
Number of domains of *mp occupied by the star.
Tenseur nnn
Total lapse function.
const Eos & eos
Equation of state of the stellar matter.
Tenseur gam_euler
Lorentz factor between the fluid and Eulerian observers.
Map & mp
Mapping associated with the star.
Tenseur ent
Log-enthalpy (relativistic case) or specific enthalpy (Newtonian case)
Tenseur beta_auto
Logarithm of the part of the product AN generated principaly by by the star.
Tenseur a_car
Total conformal factor .
double unsurc2
: unsurc2=1 for a relativistic star, 0 for a Newtonian one.
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping,...
virtual void poisson_compact(const Cmp &source, const Cmp &aa, const Tenseur &bb, const Param &par, Cmp &psi) const =0
Resolution of the elliptic equation in the case where the stellar interior is covered by a single do...
Coord r
r coordinate centered on the grid
const Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
const Mg3d * get_angu() const
Returns the pointer on the associated angular grid.
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
int get_nzone() const
Returns the number of domains.
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
void add_double(const double &x, int position=0)
Adds the the address of a new double to the list.
void add_cmp_mod(Cmp &ti, int position=0)
Adds the address of a new modifiable Cmp to the list.
void add_int_mod(int &n, int position=0)
Adds the address of a new modifiable int to the list.
void add_int(const int &n, int position=0)
Adds the address of a new int to the list.
Tensor field of valence 0 (or component of a tensorial field).
Tbl & set_domain(int l)
Read/write of the value in a given domain.
void set_outer_boundary(int l, double x)
Sets the value of the Scalar at the outer boundary of a given domain.
Class intended to describe tensors with a symmetry on the two last indices *** DEPRECATED : use class...
Tensor handling *** DEPRECATED : use class Tensor instead ***.
const Base_vect * get_triad() const
Returns the vectorial basis (triad) on which the components are defined.
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
const Tenseur & derive_cov(const Metrique &met) const
Returns the covariant derivative of *this , with respect to met .
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
void annule(int l)
Sets the Tenseur to zero in a given domain.
const Tenseur & gradient() const
Returns the gradient of *this (Cartesian coordinates)
void set_std_base()
Set the standard spectal basis of decomposition for each component.
const Tenseur & gradient_spher() const
Returns the gradient of *this (Spherical coordinates) (scalar field only).
void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
void set_triad(const Base_vect &new_triad)
Assigns a new vectorial basis (triad) of decomposition.
int get_etat() const
Returns the logical state.
Values and coefficients of a (real-value) function.
void ylm()
Computes the coefficients of *this.
Tbl & set(int l)
Read/write of the value in a given domain (configuration space).
void ylm_i()
Inverse of ylm()
void std_base_scal()
Sets the bases for spectral expansions (member base ) to the standard ones for a scalar.
void annule_hard()
Sets the Valeur to zero in a hard way.
Cmp sqrt(const Cmp &)
Square root.
Cmp exp(const Cmp &)
Exponential.
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.
Cmp log(const Cmp &)
Neperian logarithm.
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
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...