30 char valeur_equipot_out_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Valeur/valeur_equipot_out.C,v 1.5 2014/10/13 08:53:50 j_novak Exp $" ;
75 #include "utilitaires.h" 79 double valeur_equipot_fonc(
double,
const Param&) ;
84 int nitermax,
int& niter,
Itbl& l_iso,
92 double precis0 = precis ;
96 assert(
etat == ETATQCQ) ;
97 assert(nz_search > 0) ;
98 assert(nz_search <= nz) ;
99 for (
int l=1; l<nz_search; l++) {
123 for (k=0; k<np; k++) {
125 for (j=0; j<nt; j++) {
133 for (
int l=0; l<nz_search; l++) {
136 for (
int i=0; i<nr; i++) {
137 double uux = (*this)(l, k, j, i) ;
138 if ( ( (uux < uu0) || ( fabs(uux-uu0) < precis0 ) ) &&
139 (uux != __infinity) ) {
151 "Valeur::equipot_outward: the point uu < uu0 has not been found" 153 cout <<
" for the phi index " << k
154 <<
" and the theta index " << j << endl ;
155 cout <<
" uu0 = " << uu0 << endl ;
170 double uux = (*this)(l2, k, j, i2) ;
172 if ( ( fabs(uux-uu0) > precis0 ) ) {
175 "Valeur::equipot_outward: WARNING: potentially discontinuous field !" 177 cout <<
" k, j : " << k <<
" " << j << endl ;
178 cout <<
" uux, uu0 : " << uux <<
" " << uu0 << endl ;
181 l_iso.
set(k, j) = l2 ;
188 "Valeur::equipot_outward: the field has some negative value at the center !" 190 cout <<
" k, j : " << k <<
" " << j << endl ;
191 cout <<
" uu0 : " << uu0 << endl ;
196 l_iso.
set(k, j) = l2 ;
201 double y2 = (*this)(l2, k, j, i2) - uu0 ;
206 if (fabs(y2) < precis0) {
207 xi_iso.
set(k, j) = x2 ;
210 xi_iso.
set(k, j) =
zerosec(valeur_equipot_fonc, parf, x2, x3, precis,
214 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.