58 #include "star_bhns.h" 61 #include "utilitaires.h" 69 double dent_eq = dent.
val_point(radius, M_PI/2., phi) ;
71 double chi = fabs( dent_eq / dent_pole ) ;
95 for (
int i=0; i<=nps2; i++) {
96 phi.
set(i) = 2.*M_PI*i/np + 0.5*M_PI ;
102 for (
int i=0; i<=nps2; i++) {
111 for (
int i=0; i<=nps2; i++) {
114 cout <<
"chi(" << i <<
") = " << chi(i)
116 <<
" [M_PI]" << endl ;
121 double chi_ini = chi(0) ;
125 for (
int i=0; i<nps2; i++) {
127 if ( chi(i+1) < 1.e-12 )
130 delta_chi = chi_ini - chi(i+1) ;
132 if ( delta_chi > 0. ) {
143 return phi_glob_min ;
151 double ppp = phi_ini ;
153 double dp = M_PI/2. ;
161 if ( init_check >= 0. ) {
163 while ( dp > 1.e-15 ) {
169 while ( diff > 0. && (ppp+mm*dp) < 2.*M_PI ) {
172 ptmp = ppp + mm * dp ;
181 ppp += (mm - 2) * dp ;
185 if ( (ppp+2.*dp) >= 2.*M_PI ) {
187 cout <<
"No minimum for phi > " << phi_ini / M_PI
188 <<
" [M_PI]" << endl ;
195 while ( dp > 1.e-15 ) {
201 while ( diff > 0. && (ppp-mm*dp) > 0. ) {
204 ptmp = ppp - mm * dp ;
213 ppp -= (mm - 2) * dp ;
217 if ( (ppp-2.*dp) < 0. ) {
219 cout <<
"No minimum for phi < " << phi_ini / M_PI
220 <<
" [M_PI]" << endl ;
double phi_local_min(double phi_ini)
Azimuthal angle when the indicator of the mass-shedding takes its local minimum.
Map & mp
Mapping associated with the star.
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
double & set(int i)
Read/write of a particular element (index i) (1D case)
Tensor field of valence 0 (or component of a tensorial field).
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
int nzet
Number of domains of *mp occupied by the star.
virtual double val_r(int l, double xi, double theta, double pphi) const =0
Returns the value of the radial coordinate r for a given in a given domain.
double radius_p(double phi)
Radius of the star to the direction of and .
double val_point(double r, double theta, double phi) const
Computes the value of the field at an arbitrary point , by means of the spectral expansion.
double phi_min()
Azimuthal angle when the indicator of the mass-shedding takes its minimum chi_min.
double ray_pole() const
Coordinate radius at [r_unit].
double chi_rp(double radius, double phi)
Sensitive indicator of the mass-shedding to the direction of , , .
const Scalar & dsdr() const
Returns of *this .