86 assert(source_mat.
get_etat() != ETATNONDEF) ;
87 assert(source_quad.
get_etat() != ETATNONDEF) ;
101 if ( (source_mat.
get_etat() == ETATZERO)
102 && (source_quad.
get_etat() == ETATZERO) ) {
109 int base_t = ((source_mat.
va).base).get_base_t(0) ;
122 double theta0 = M_PI / 2 ;
127 for (
int l=0 ; l<nz ; l++) {
128 double rmax =
val_r(l,
double(1), theta0, phi0) ;
131 double rmin =
val_r(l,
double(0), theta0, phi0) ;
138 double rmin =
val_r(l,
double(-1), theta0, phi0) ;
139 mpaff.
set_alpha(
double(.5) * (rmax - rmin), l ) ;
140 mpaff.
set_beta(
double(.5) * (rmax + rmin), l) ;
145 double rmin =
val_r(l,
double(-1), theta0, phi0) ;
146 double umax = double(1) / rmin ;
147 double umin = double(1) / rmax ;
148 mpaff.
set_alpha(
double(.5) * (umin - umax), l) ;
149 mpaff.
set_beta(
double(.5) * (umin + umax), l) ;
154 cout <<
"Map_et::poisson2d: unknown type_r ! " << endl ;
165 saff_m.
import( nzm1, source_mat ) ;
166 (saff_m.
va).set_base( (source_mat.
va).base ) ;
171 Cmp set_q = source_quad ;
174 saff_q.
import( nzm1, set_q ) ;
175 (saff_q.
va).set_base( (set_q.
va).base ) ;
178 if ( (set_q.
va).get_etat() == ETATQCQ) {
179 (set_q.
va).coef_i() ;
180 assert( (set_q.
va).c->get_etat() == ETATQCQ ) ;
181 assert( (saff_q.
va).c->get_etat() == ETATQCQ ) ;
182 *( (saff_q.
va).c->t[nzm1] ) = *( (set_q.
va).c->t[nzm1] ) ;
193 mpaff.
poisson2d(saff_m, saff_q, par, uaff) ;
219 for (
int l=0; l<nz; l++) {
223 apre1 = apre1 *
dxdr *
dxdr * unjj ;
233 for (
int l=0; l<nz; l++) {
234 *(amax1.
t[l]) = amax0(l) ;
248 double unmlambda_relax = 1. - lambda_relax ;
274 cout <<
"Map_et::poisson2d : relat. diff. u^J <-> u^{J-1} : " << endl ;
307 sxlapang = sxlapang.
d2sdt2() ;
309 sxlapang = sxlapang.
sx() ;
331 jac_ext.
annule(0, nzm1-1) ;
332 jac_ext = - jac_ext ;
333 jac = jac + jac_ext ;
340 vuu = jac * (
rsxdxdr * unjj - 1.) * duudx
354 sauve_base = vuu.
base ;
376 ssj = lambda_relax * ssjm1 + unmlambda_relax * ssjm2 ;
378 ssj = ( source_mat + source_quad + uu + (amax - apre) * ssj ) / amax ;
380 (ssj.
va).set_base((source_mat.
va).base) ;
395 cout <<
" step " << niter <<
" : " ;
396 for (
int l=0; l<nz; l++) {
397 cout << tdiff(l) <<
" " ;
412 while ( (diff > precis) && (niter < nitermax) ) ;
425 cout <<
"Map_et::poisson2d : unkown theta basis !" << endl ;
426 cout <<
" basis : " << hex << base_t << endl ;
const Map * get_mp() const
Returns the mapping.
Coord d2rdx2
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Coord sr2d2rdt2
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
const Valeur & dsdt() const
Returns of *this.
double & get_double_mod(int position=0) const
Returns the reference of a stored modifiable double .
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
double * alpha
Array (size: mg->nzone ) of the values of in each domain.
virtual void poisson2d(const Cmp &source_mat, const Cmp &source_quad, Param &par, Cmp &uu) const
Computes the solution of a 2-D Poisson equation.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
int get_etat() const
Returns the logical state.
virtual double val_r(int l, double xi, double theta, double pphi) const
Returns the value of the radial coordinate r for a given in a given domain.
Coord sr2drdt
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
void annule(int l_min, int l_max)
Sets the Mtbl to zero in some domains.
const Valeur & sx() const
Returns (r -sampling = RARE ) \ Id (r sampling = FIN ) \ (r -sampling = UNSURR ) ...
Values and coefficients of a (real-value) function.
void set_base(const Base_val &)
Sets the bases for spectral expansions (member base )
Tbl diffrel(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (norme version).
Cmp & get_cmp_mod(int position=0) const
Returns the reference of a modifiable Cmp stored in the list.
void set_beta(double beta0, int l)
Modifies the value of in domain no. l.
const int & get_int(int position=0) const
Returns the reference of a int stored in the list.
#define T_COS_P
dev. cos seulement, harmoniques paires
Coord dxdr
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Base_val base
Bases on which the spectral expansion is performed.
int get_nzone() const
Returns the number of domains.
int & get_int_mod(int position=0) const
Returns the reference of a modifiable int stored in the list.
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
void set_alpha(double alpha0, int l)
Modifies the value of in domain no. l.
Coord xsr
in the nucleus; \ 1/R in the non-compactified shells; \ in the compactified outer domain...
virtual void poisson2d(const Cmp &source_mat, const Cmp &source_quad, Param &par, Cmp &uu) const
Computes the solution of a 2-D Poisson equation.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Coord rsxdxdr
in the nucleus; \ in the shells; \ in the outermost compactified domain.
const Mg3d * mg
Pointer on the multi-grid Mgd3 on which this is defined.
Bases of the spectral expansions.
int get_dzpuis() const
Returns dzpuis.
bool check_dzpuis(int dzi) const
Returns false if the last domain is compactified and *this is not zero in this domain and dzpuis is n...
void set_dzpuis(int)
Set a value to dzpuis.
const double & get_double(int position=0) const
Returns the reference of a double stored in the list.
int get_type_r(int l) const
Returns the type of sampling in the radial direction in domain no.
void import(const Cmp &ci)
Assignment to another Cmp defined on a different mapping.
Tbl ** t
Array (size nzone ) of pointers on the Tbl 's.
Coord srdrdt
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
#define T_SIN_I
dev. sin seulement, harmoniques impaires
Valeur va
The numerical value of the Cmp.
const Valeur & d2sdt2() const
Returns of *this.
Coord d2rdtdx
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.