29 char star_bhns_chi_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Star_bhns/star_bhns_chi.C,v 1.3 2014/10/13 08:53:40 j_novak Exp $" ;
55 #include "star_bhns.h" 58 #include "utilitaires.h" 66 double dent_eq = dent.
val_point(radius, M_PI/2., phi) ;
68 double chi = fabs( dent_eq / dent_pole ) ;
92 for (
int i=0; i<=nps2; i++) {
93 phi.
set(i) = 2.*M_PI*i/np + 0.5*M_PI ;
99 for (
int i=0; i<=nps2; i++) {
108 for (
int i=0; i<=nps2; i++) {
111 cout <<
"chi(" << i <<
") = " << chi(i)
113 <<
" [M_PI]" << endl ;
118 double chi_ini = chi(0) ;
122 for (
int i=0; i<nps2; i++) {
124 if ( chi(i+1) < 1.e-12 )
127 delta_chi = chi_ini - chi(i+1) ;
129 if ( delta_chi > 0. ) {
140 return phi_glob_min ;
148 double ppp = phi_ini ;
150 double dp = M_PI/2. ;
158 if ( init_check >= 0. ) {
160 while ( dp > 1.e-15 ) {
166 while ( diff > 0. && (ppp+mm*dp) < 2.*M_PI ) {
169 ptmp = ppp + mm * dp ;
178 ppp += (mm - 2) * dp ;
182 if ( (ppp+2.*dp) >= 2.*M_PI ) {
184 cout <<
"No minimum for phi > " << phi_ini / M_PI
185 <<
" [M_PI]" << endl ;
192 while ( dp > 1.e-15 ) {
198 while ( diff > 0. && (ppp-mm*dp) > 0. ) {
201 ptmp = ppp - mm * dp ;
210 ppp -= (mm - 2) * dp ;
214 if ( (ppp-2.*dp) < 0. ) {
216 cout <<
"No minimum for phi < " << phi_ini / M_PI
217 <<
" [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 .