105 #include "graphique.h" 113 assert(source.
get_etat() != ETATNONDEF) ;
114 assert(source.
get_mp() ==
this) ;
119 assert(uu.
get_mp() ==
this) ;
139 for (
int l=0; l<nz; l++) {
143 apre1 = apre1 *
dxdr *
dxdr * unjj ;
153 for (
int l=0; l<nz; l++) {
154 *(amax1.
t[l]) = amax0(l) ;
168 double unmlambda = 1. - lambda ;
192 cout <<
"Map_et::poisson : relat. diff. u^J <-> u^{J-1} : " << endl ;
229 sxlapang = sxlapang.
lapang() ;
231 sxlapang = sxlapang.
sx() ;
255 vuu = 2. *
dxdr * (
rsxdxdr * unjj - 1.) * varduudx
269 sauve_base = vuu.
base ;
300 ssj = lambda * ssjm1 + unmlambda * ssjm2 ;
302 ssj = ( source + uu + (amax - apre) * ssj ) / amax ;
304 (ssj.
va).set_base((source.
va).base) ;
320 mpaff.
poisson(ssj, par_nul, uu) ;
327 cout <<
" step " << niter <<
" : " ;
328 for (
int l=0; l<nz; l++) {
329 cout << tdiff(l) <<
" " ;
344 while ( (diff > precis) && (niter < nitermax) ) ;
362 assert(source.
get_etat() != ETATNONDEF) ;
363 assert(source.
get_mp() ==
this) ;
368 assert(uu.
get_mp() ==
this) ;
388 for (
int l=0; l<nz; l++) {
392 apre1 = apre1 *
dxdr *
dxdr * unjj ;
402 for (
int l=0; l<nz; l++) {
403 *(amax1.
t[l]) = amax0(l) ;
417 double unmlambda = 1. - lambda ;
441 cout <<
"Map_et::poisson_tau : relat. diff. u^J <-> u^{J-1} : " << endl ;
478 sxlapang = sxlapang.
lapang() ;
480 sxlapang = sxlapang.
sx() ;
504 vuu = 2. *
dxdr * (
rsxdxdr * unjj - 1.) * varduudx
518 sauve_base = vuu.
base ;
549 ssj = lambda * ssjm1 + unmlambda * ssjm2 ;
551 ssj = ( source + uu + (amax - apre) * ssj ) / amax ;
553 (ssj.
va).set_base((source.
va).base) ;
576 cout <<
" step " << niter <<
" : " ;
577 for (
int l=0; l<nz; l++) {
578 cout << tdiff(l) <<
" " ;
593 while ( (diff > precis) && (niter < nitermax) ) ;
603 double lambda)
const {
605 if (lambda !=
double(0)) {
607 "Map_et::poisson_angu : the case lambda != 0 is not treated yet !" 612 assert(source.
get_mp() == *
this) ;
613 assert(uu.
get_mp() == *
this) ;
618 int* nrm6 =
new int[nz];
619 for (
int l=0; l<=nzm1; l++)
663 cout <<
"Map_et::poisson angu : relat. diff. u^J <-> u^{J-1} : " << endl ;
705 vuu = - d2uudxdx *
dxdr *
dxdr * unjj
732 ssj = (1-relax) * ssj + relax * ssjm1 ;
748 cout <<
" step " << niter <<
" : " ;
749 for (
int l=0; l<nz; l++) {
750 cout << tdiff(l) <<
" " ;
764 while ( (diff > precis) && (niter < nitermax) ) ;
777 cout <<
"Map_et::poisson_angu(const Cmp&, Param&, Cmp&, double) pas fait" << endl; abort() ;
const Map * get_mp() const
Returns the mapping.
Coord d2rdx2
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
const Valeur & dsdt() const
Returns of *this.
Coord sr2stdrdp
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
const Valeur & dsdx() const
Returns of *this.
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
void filtre_r(int *nn)
Sets the n lasts coefficients in r to 0 in all domains.
void mult_r()
Multiplication by r everywhere; dzpuis is not changed.
const Valeur & lapang() const
Returns the angular Laplacian of *this.
void dec_dzpuis()
Decreases by 1 the value of dzpuis and changes accordingly the values of the Cmp in the external comp...
double * alpha
Array (size: mg->nzone ) of the values of in each domain.
void ylm()
Computes the coefficients of *this.
int get_etat() const
Returns the logical state.
Coord sr2drdt
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Tensor field of valence 0 (or component of a tensorial field).
const Valeur & sx() const
Returns (r -sampling = RARE ) \ Id (r sampling = FIN ) \ (r -sampling = UNSURR ) ...
Values and coefficients of a (real-value) function.
int get_etat() const
Returns the logical state ETATNONDEF (undefined), ETATZERO (null) or ETATQCQ (ordinary).
void annule(int l)
Sets the Valeur to zero in a given domain.
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).
Coord srstdrdp
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
void set_dzpuis(int)
Modifies the dzpuis flag.
Cmp & get_cmp_mod(int position=0) const
Returns the reference of a modifiable Cmp stored in the list.
virtual void poisson(const Cmp &source, Param &par, Cmp &uu) const
Computes the solution of a scalar Poisson equation.
const int & get_int(int position=0) const
Returns the reference of a int stored in the list.
virtual void poisson(const Cmp &source, Param &par, Cmp &uu) const
Computes the solution of a scalar Poisson equation.
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_dzpuis() const
Returns dzpuis.
const Valeur & stdsdp() const
Returns of *this.
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.
Coord sstd2rdpdx
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
void dec2_dzpuis()
Decreases by 2 the value of dzpuis and changes accordingly the values of the Cmp in the external comp...
Coord xsr
in the nucleus; \ 1/R in the non-compactified shells; \ in the compactified outer domain...
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.
virtual void poisson_tau(const Cmp &source, Param &par, Cmp &uu) const
Computes the solution of a scalar Poisson equation using a Tau method.
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
virtual void poisson_angu(const Scalar &source, Param &par, Scalar &uu, double lambda=0) const
Computes the solution of the generalized angular Poisson equation.
const Mg3d * mg
Pointer on the multi-grid Mgd3 on which this is defined.
Bases of the spectral expansions.
virtual void poisson_angu(const Scalar &source, Param &par, Scalar &uu, double lambda=0) const
Computes the solution of the generalized angular Poisson equation.
int get_dzpuis() const
Returns dzpuis.
Coord lapr_tp
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
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.
Valeur & set_spectral_va()
Returns va (read/write version)
int get_type_r(int l) const
Returns the type of sampling in the radial direction in domain no.
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.
const Map & get_mp() const
Returns the mapping.
Valeur va
The numerical value of the Cmp.
const Valeur & get_spectral_va() const
Returns va (read only version)
Coord d2rdtdx
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
virtual void poisson_tau(const Cmp &source, Param &par, Cmp &uu) const
Computes the solution of a scalar Poisson equation with a Tau method.