31char et_rot_diff_faitomeg_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Etoile/et_rot_diff_faitomeg.C,v 1.3 2014/10/13 08:52:57 j_novak Exp $" ;
61#include "et_rot_diff.h"
62#include "utilitaires.h"
66double et_rot_diff_fzero(
double omeg,
const Param& par) ;
74 double precis,
int nitermax) {
114 for (l=0; l<
nzet+1; l++) {
116 for (k=0; k<mg.
get_np(l); k++) {
117 for (j=0; j<mg.
get_nt(l); j++) {
118 for (i=0; i<mg.
get_nr(l); i++) {
120 double& omeg = tom.
set(k, j, i) ;
122 double omeg_min1, omeg_max1 ;
123 if ( prev_zero || omeg ==
double(0)) {
124 omeg_min1 = omeg_min ;
125 omeg_max1 = omeg_max ;
128 omeg_min1 = 0.8 * omeg ;
129 omeg_max1 = 1.2 * omeg ;
132 omeg =
zerosec(et_rot_diff_fzero, par, omeg_min1,
133 omeg_max1, precis, nitermax, niter) ;
145 for (l=
nzet+1; l<nz; l++) {
155 for (l=1; l<
nzet; l++) {
172double et_rot_diff_fzero(
double omeg,
const Param& par) {
186 double omnp = omeg - nphi(l, k, j, i) ;
188 return fom - brst2(l, k, j, i) * omnp /
189 ( nnn2(l, k, j, i) - brst2(l, k, j, i) * omnp*omnp ) ;
209 for (
int l=0; l<
nzet+1; l++) {
211 for (
int k=0; k<mg.
get_np(l); k++) {
212 for (
int j=0; j<mg.
get_nt(l); j++) {
213 for (
int i=0; i<mg.
get_nr(l); i++) {
225 for (
int l=
nzet+1; l<nz; l++) {
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
void mult_rsint()
Multiplication by .
void std_base_scal()
Sets the spectral bases of the Valeur va to the standard ones for a scalar.
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.
Class for differentially rotating stars.
double omega_min
Minimum value of .
void fait_omega_field(double omeg_min, double omeg_max, double precis, int nitermax)
Computes (member omega_field ).
Tenseur prim_field
Field .
double omega_max
Maximum value of .
Tenseur omega_field
Field .
void fait_prim_field()
Computes the member prim_field from omga_field .
Tbl par_frot
Parameters of the function .
double(* primfrot)(double, const Tbl &)
Primitive of the function , which vanishes at the stellar center.
double funct_omega(double omeg) const
Evaluates , where F is the function defining the rotation profile.
Tenseur nphi
Metric coefficient .
Tenseur bbb
Metric factor B.
int nzet
Number of domains of *mp occupied by the star.
Tenseur nnn
Total lapse function.
Map & mp
Mapping associated with the star.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
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.
const int & get_int(int position=0) const
Returns the reference of a int stored in the list.
void add_etoile(const Etoile &eti, int position=0)
Adds the address of a new Etoile to the list.
void add_cmp(const Cmp &ti, int position=0)
Adds the address of a new Cmp to the list.
const Cmp & get_cmp(int position=0) const
Returns the reference of a Cmp stored in the list.
void add_int(const int &n, int position=0)
Adds the address of a new int to the list.
const Etoile & get_etoile(int position=0) const
Returns the reference of a Etoile stored in the list.
double & set(int i)
Read/write of a particular element (index i) (1D case)
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
void allocate_all()
Sets the logical state to ETATQCQ (ordinary state) and performs the memory allocation of all the elem...
void set_std_base()
Set the standard spectal basis of decomposition for each component.
int get_etat() const
Returns the logical state.
Tbl min(const Cmp &)
Minimum values of a Cmp in each domain.
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
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.