78 #include "utilitaires.h" 82 double valeur_equipot_fonc(
double,
const Param&) ;
87 int nitermax,
int& niter,
Itbl& l_iso,
95 double precis0 = precis ;
99 assert(
etat == ETATQCQ) ;
100 assert(nz_search > 0) ;
101 assert(nz_search <= nz) ;
102 for (
int l=1; l<nz_search; l++) {
126 for (k=0; k<np; k++) {
128 for (j=0; j<nt; j++) {
136 for (
int l=0; l<nz_search; l++) {
139 for (
int i=0; i<nr; i++) {
140 double uux = (*this)(l, k, j, i) ;
141 if ( ( (uux < uu0) || ( fabs(uux-uu0) < precis0 ) ) &&
142 (uux != __infinity) ) {
154 "Valeur::equipot_outward: the point uu < uu0 has not been found" 156 cout <<
" for the phi index " << k
157 <<
" and the theta index " << j << endl ;
158 cout <<
" uu0 = " << uu0 << endl ;
173 double uux = (*this)(l2, k, j, i2) ;
175 if ( ( fabs(uux-uu0) > precis0 ) ) {
178 "Valeur::equipot_outward: WARNING: potentially discontinuous field !" 180 cout <<
" k, j : " << k <<
" " << j << endl ;
181 cout <<
" uux, uu0 : " << uux <<
" " << uu0 << endl ;
184 l_iso.
set(k, j) = l2 ;
191 "Valeur::equipot_outward: the field has some negative value at the center !" 193 cout <<
" k, j : " << k <<
" " << j << endl ;
194 cout <<
" uu0 : " << uu0 << endl ;
199 l_iso.
set(k, j) = l2 ;
204 double y2 = (*this)(l2, k, j, i2) - uu0 ;
209 if (fabs(y2) < precis0) {
210 xi_iso.
set(k, j) = x2 ;
213 xi_iso.
set(k, j) =
zerosec(valeur_equipot_fonc, parf, x2, x3, precis,
217 niter = ( niter0 > niter ) ? niter0 : niter ;
const Grille3d * get_grille3d(int l) const
Returns a pointer on the 3D mono-grid for domain no. l.
Mtbl_cf * c_cf
Coefficients of the spectral expansion of the function.
int & set(int i)
Read/write of a particular element (index i ) (1D case)
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
void coef() const
Computes the coeffcients of *this.
double & set(int i)
Read/write of a particular element (index i) (1D case)
Basic integer array class.
void add_mtbl_cf(const Mtbl_cf &mi, int position=0)
Adds the address of a new Mtbl_cf to the list.
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.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
const Mg3d * mg
Multi-grid Mgd3 on which this is defined.
int get_nzone() const
Returns the number of domains.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
void equipot_outward(double uu0, int nz_search, double precis, int nitermax, int &niter, Itbl &l_iso, Tbl &xi_iso) const
Determines an equipotential surface of the field represented by *this (outward search).
void add_double(const double &x, int position=0)
Adds the the address of a new double to the list.
int etat
Logical state (ETATNONDEF , ETATQCQ or ETATZERO ).
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
void add_int_mod(int &n, int position=0)
Adds the address of a new modifiable int to the list.