31char star_bin_vel_pot_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Star/star_bin_vel_pot.C,v 1.7 2014/10/13 08:53:39 j_novak Exp $" ;
70#include "utilitaires.h"
74Cmp raccord_c1(
const Cmp& uu,
int l1) ;
78 int nzm1 =
mp.get_mg()->get_nzone() - 1 ;
104 for (
int i=1; i<=3; i++) {
105 v_orb.
set(i) = www(i).val_grid_point(0, 0, 0, 0) ;
119 for (
int l=
nzet; l <= nzm1; l++) {
127 Vector bb = (1 - zeta_h) *
ent.derive_con(flat_spher) +
183 if (
psi0.get_etat() == ETATZERO) {
187 Cmp source_cmp (source) ;
188 Cmp zeta_h_cmp (zeta_h) ;
193 Cmp bb_cmp1 (bb(1)) ;
194 Cmp bb_cmp2 (bb(2)) ;
195 Cmp bb_cmp3 (bb(3)) ;
196 bb_cmp.
set(0) = bb_cmp1 ;
197 bb_cmp.
set(1) = bb_cmp2 ;
198 bb_cmp.
set(2) = bb_cmp3 ;
200 source_cmp.
va.
ylm() ;
202 cout <<
"source" << endl <<
norme(source_cmp)<< endl ;
203 cout <<
"zeta_h " << endl <<
norme(zeta_h_cmp) << endl ;
204 cout <<
"bb(1)" << endl <<
norme(bb_cmp(0)) << endl ;
205 cout <<
"bb(2)" << endl <<
norme(bb_cmp(1)) << endl ;
206 cout <<
"bb(3)" << endl <<
norme(bb_cmp(2)) << endl ;
207 cout <<
"psiO" << endl <<
norme(psi0_cmp) << endl ;
209 mp.poisson_compact(source_cmp, zeta_h_cmp, bb_cmp, par, psi0_cmp ) ;
213 cout <<
"psiO apres" << endl <<
norme(
psi0) << endl ;
221 Scalar oper = zeta_h *
psi0.laplacian() + bb_dpsi0 ;
225 double erreur =
diffrel(oper, source)(0) ;
227 cout <<
"Check of the resolution of the continuity equation : "
229 cout <<
" norme(source) : " <<
norme(source)(0)
230 <<
" diff oper/source : " << erreur << endl ;
238 d_psi.change_triad(
mp.get_bvect_cart()) ;
240 for (
int i=1; i<=3; i++)
244 d_psi.change_triad(
mp.get_bvect_cart()) ;
252 for (
int i=1; i<=3; i++) {
254 d_psi_i = raccord_c1(d_psi_i,
nzet) ;
255 d_psi.set(i) = d_psi_i ;
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Valeur va
The numerical value of the Cmp.
Flat metric for tensor calculation.
void add_double(const double &x, int position=0)
Adds the the address of a new double 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).
const Vector & derive_cov(const Metric &gam) const
Returns the gradient (1-form = covariant vector) of *this.
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field.
Tbl & set_domain(int l)
Read/write of the value in a given domain.
virtual void annule(int l_min, int l_max)
Sets the Scalar to zero in several domains.
Valeur & set_spectral_va()
Returns va (read/write version).
const Vector & derive_con(const Metric &gam) const
Returns the "contravariant" derivative of *this with respect to some metric , by raising the index of...
Vector bsn
3-vector shift, divided by N, of the rotating coordinates, .
Vector d_psi
Gradient of (in the irrotational case) (Spherical components with respect to the mapping of the star...
double velocity_potential(int mermax, double precis, double relax)
Computes the non-translational part of the velocity scalar potential by solving the continuity equat...
Scalar psi0
Scalar potential of the non-translational part of fluid 4-velocity (in the irrotational case).
Sym_tensor hij
Total deviation of the inverse conformal metric from the inverse flat metric.
Scalar psi4
Conformal factor .
Metric_flat flat
Flat metric defined on the mapping (Spherical components with respect to the mapping of the star) .
const Eos & eos
Equation of state of the stellar matter.
Scalar gam_euler
Lorentz factor between the fluid and Eulerian observers.
Map & mp
Mapping associated with the star.
int nzet
Number of domains of *mp occupied by the star.
Tensor handling *** DEPRECATED : use class Tensor instead ***.
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
void ylm()
Computes the coefficients of *this.
void ylm_i()
Inverse of ylm().
Tensor field of valence 1.
virtual void std_spectral_base()
Sets the standard spectal bases of decomposition for each component.
virtual void change_triad(const Base_vect &)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
Scalar & set(int)
Read/write access to a component.
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.
void set_triad(const Base_vect &new_triad)
Assigns a new vectorial basis (triad) of decomposition.
Tensor down(int ind, const Metric &gam) const
Computes a new tensor by lowering an index of *this.
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 * get_triad() const
Returns the vectorial basis (triad) on which the components are defined.
virtual void set_etat_qcq()
Sets the logical state of all components to ETATQCQ (ordinary state).
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .