64 #include "et_rot_diff.h" 65 #include "utilitaires.h" 69 double et_rot_diff_fzero(
double omeg,
const Param& par) ;
77 double precis,
int nitermax) {
117 for (l=0; l<
nzet+1; l++) {
119 for (k=0; k<mg.
get_np(l); k++) {
120 for (j=0; j<mg.
get_nt(l); j++) {
121 for (i=0; i<mg.
get_nr(l); i++) {
123 double& omeg = tom.
set(k, j, i) ;
125 double omeg_min1, omeg_max1 ;
126 if ( prev_zero || omeg ==
double(0)) {
127 omeg_min1 = omeg_min ;
128 omeg_max1 = omeg_max ;
131 omeg_min1 = 0.8 * omeg ;
132 omeg_max1 = 1.2 * omeg ;
135 omeg =
zerosec(et_rot_diff_fzero, par, omeg_min1,
136 omeg_max1, precis, nitermax, niter) ;
148 for (l=
nzet+1; l<nz; l++) {
158 for (l=1; l<
nzet; l++) {
175 double et_rot_diff_fzero(
double omeg,
const Param& par) {
189 double omnp = omeg - nphi(l, k, j, i) ;
191 return fom - brst2(l, k, j, i) * omnp /
192 ( nnn2(l, k, j, i) - brst2(l, k, j, i) * omnp*omnp ) ;
212 for (
int l=0; l<
nzet+1; l++) {
214 for (
int k=0; k<mg.
get_np(l); k++) {
215 for (
int j=0; j<mg.
get_nt(l); j++) {
216 for (
int i=0; i<mg.
get_nr(l); i++) {
228 for (
int l=
nzet+1; l<nz; l++) {
const Etoile & get_etoile(int position=0) const
Returns the reference of a Etoile stored in the list.
const Cmp & get_cmp(int position=0) const
Returns the reference of a Cmp stored in the list.
Tenseur prim_field
Field .
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
void add_int(const int &n, int position=0)
Adds the address of a new int to the list.
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
void annule(int l)
Sets the Cmp to zero in a given domain.
void set_std_base()
Set the standard spectal basis of decomposition for each component.
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)
Tenseur nnn
Total lapse function.
Tenseur nphi
Metric coefficient .
double(* primfrot)(double, const Tbl &)
Primitive of the function , which vanishes at the stellar center.
void fait_omega_field(double omeg_min, double omeg_max, double precis, int nitermax)
Computes (member omega_field ).
Tbl min(const Cmp &)
Minimum values of a Cmp in each domain.
double funct_omega(double omeg) const
Evaluates , where F is the function defining the rotation profile.
double omega_max
Maximum value of .
double zerosec(double(*f)(double, const Param &), const Param &par, double a, double b, double precis, int nitermax, int &niter, bool abort=true)
Finding the zero a function.
Class for differentially rotating stars.
void fait_prim_field()
Computes the member prim_field from omega_field .
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
const int & get_int(int position=0) const
Returns the reference of a int stored in the list.
void add_cmp(const Cmp &ti, int position=0)
Adds the address of a new Cmp to the list.
Tbl par_frot
Parameters of the function .
void mult_rsint()
Multiplication by .
Map & mp
Mapping associated with the star.
int get_nzone() const
Returns the number of domains.
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
int get_etat() const
Returns the logical state.
Tenseur bbb
Metric factor B.
void std_base_scal()
Sets the spectral bases of the Valeur va to the standard ones for a scalar.
void add_etoile(const Etoile &eti, int position=0)
Adds the address of a new Etoile to the list.
int nzet
Number of domains of *mp occupied by the star.
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
Tbl & set(int l)
Read/write of the value in a given domain.
void allocate_all()
Sets the logical state to ETATQCQ (ordinary state) and performs the memory allocation of all the elem...
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
double omega_min
Minimum value of .
Tenseur omega_field
Field .