33char map_et_poisson_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Map/map_et_poisson.C,v 1.7 2014/10/13 08:53:05 j_novak Exp $" ;
104 assert(source.
get_etat() != ETATNONDEF) ;
105 assert(source.
get_mp() ==
this) ;
110 assert(uu.
get_mp() ==
this) ;
130 for (
int l=0; l<nz; l++) {
134 apre1 = apre1 *
dxdr *
dxdr * unjj ;
144 for (
int l=0; l<nz; l++) {
145 *(amax1.
t[l]) = amax0(l) ;
159 double unmlambda = 1. - lambda ;
183 cout <<
"Map_et::poisson : relat. diff. u^J <-> u^{J-1} : " << endl ;
220 sxlapang = sxlapang.
lapang() ;
222 sxlapang = sxlapang.
sx() ;
246 vuu = 2. *
dxdr * (
rsxdxdr * unjj - 1.) * varduudx
260 sauve_base = vuu.
base ;
291 ssj = lambda * ssjm1 + unmlambda * ssjm2 ;
293 ssj = ( source + uu + (amax - apre) * ssj ) / amax ;
295 (ssj.
va).set_base((source.
va).base) ;
311 mpaff.
poisson(ssj, par_nul, uu) ;
318 cout <<
" step " << niter <<
" : " ;
319 for (
int l=0; l<nz; l++) {
320 cout << tdiff(l) <<
" " ;
335 while ( (diff > precis) && (niter < nitermax) ) ;
353 assert(source.
get_etat() != ETATNONDEF) ;
354 assert(source.
get_mp() ==
this) ;
359 assert(uu.
get_mp() ==
this) ;
379 for (
int l=0; l<nz; l++) {
383 apre1 = apre1 *
dxdr *
dxdr * unjj ;
393 for (
int l=0; l<nz; l++) {
394 *(amax1.
t[l]) = amax0(l) ;
408 double unmlambda = 1. - lambda ;
432 cout <<
"Map_et::poisson_tau : relat. diff. u^J <-> u^{J-1} : " << endl ;
469 sxlapang = sxlapang.
lapang() ;
471 sxlapang = sxlapang.
sx() ;
495 vuu = 2. *
dxdr * (
rsxdxdr * unjj - 1.) * varduudx
509 sauve_base = vuu.
base ;
540 ssj = lambda * ssjm1 + unmlambda * ssjm2 ;
542 ssj = ( source + uu + (amax - apre) * ssj ) / amax ;
544 (ssj.
va).set_base((source.
va).base) ;
567 cout <<
" step " << niter <<
" : " ;
568 for (
int l=0; l<nz; l++) {
569 cout << tdiff(l) <<
" " ;
584 while ( (diff > precis) && (niter < nitermax) ) ;
594 double lambda)
const {
596 if (lambda !=
double(0)) {
598 "Map_et::poisson_angu : the case lambda != 0 is not treated yet !"
603 assert(source.
get_mp() == *
this) ;
604 assert(uu.
get_mp() == *
this) ;
609 int* nrm6 =
new int[nz];
610 for (
int l=0; l<=nzm1; l++)
654 cout <<
"Map_et::poisson angu : relat. diff. u^J <-> u^{J-1} : " << endl ;
696 vuu = - d2uudxdx *
dxdr *
dxdr * unjj
723 ssj = (1-relax) * ssj + relax * ssjm1 ;
739 cout <<
" step " << niter <<
" : " ;
740 for (
int l=0; l<nz; l++) {
741 cout << tdiff(l) <<
" " ;
755 while ( (diff > precis) && (niter < nitermax) ) ;
Bases of the spectral expansions.
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
void dec_dzpuis()
Decreases by 1 the value of dzpuis and changes accordingly the values of the Cmp in the external comp...
int get_etat() const
Returns the logical state.
Valeur va
The numerical value of the Cmp
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
int get_dzpuis() const
Returns dzpuis.
void set_dzpuis(int)
Set a value to 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...
const Map * get_mp() const
Returns the mapping.
void dec2_dzpuis()
Decreases by 2 the value of dzpuis and changes accordingly the values of the Cmp in the external comp...
virtual void poisson_angu(const Scalar &source, Param &par, Scalar &uu, double lambda=0) const
Computes the solution of the generalized angular Poisson equation.
virtual void poisson(const Cmp &source, Param &par, Cmp &uu) const
Computes the solution of a scalar Poisson equation.
virtual void poisson_tau(const Cmp &source, Param &par, Cmp &uu) const
Computes the solution of a scalar Poisson equation using a Tau method.
virtual void poisson_tau(const Cmp &source, Param &par, Cmp &uu) const
Computes the solution of a scalar Poisson equation with a Tau method.
virtual void poisson(const Cmp &source, Param &par, Cmp &uu) const
Computes the solution of a scalar Poisson equation.
virtual void poisson_angu(const Scalar &source, Param &par, Scalar &uu, double lambda=0) const
Computes the solution of the generalized angular Poisson equation.
Coord rsxdxdr
in the nucleus; \ in the shells; \ in the outermost compactified domain.
double * alpha
Array (size: mg->nzone ) of the values of in each domain.
Coord d2rdx2
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Coord sr2drdt
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Coord srstdrdp
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Coord d2rdtdx
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Coord sstd2rdpdx
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Coord lapr_tp
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Coord sr2stdrdp
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Coord srdrdt
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Coord xsr
in the nucleus; \ 1/R in the non-compactified shells; \ in the compactified outer domain.
Coord dxdr
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
const Mg3d * mg
Pointer on the multi-grid Mgd3 on which this is defined
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.
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.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Cmp & get_cmp_mod(int position=0) const
Returns the reference of a modifiable Cmp stored in the list.
const int & get_int(int position=0) const
Returns the reference of a int stored in the list.
const double & get_double(int position=0) const
Returns the reference of a double stored in the list.
int & get_int_mod(int position=0) const
Returns the reference of a modifiable int stored in the list.
Tensor field of valence 0 (or component of a tensorial field).
int get_dzpuis() const
Returns dzpuis.
Valeur & set_spectral_va()
Returns va (read/write version)
const Valeur & get_spectral_va() const
Returns va (read only version)
int get_etat() const
Returns the logical state ETATNONDEF (undefined), ETATZERO (null) or ETATQCQ (ordinary).
void set_dzpuis(int)
Modifies the dzpuis flag.
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.
Values and coefficients of a (real-value) function.
const Valeur & sx() const
Returns (r -sampling = RARE ) \ Id (r sampling = FIN ) \ (r -sampling = UNSURR )
const Valeur & stdsdp() const
Returns of *this.
void set_base(const Base_val &)
Sets the bases for spectral expansions (member base )
void ylm()
Computes the coefficients of *this.
const Valeur & dsdt() const
Returns of *this.
void annule(int l)
Sets the Valeur to zero in a given domain.
const Valeur & dsdx() const
Returns of *this.
Base_val base
Bases on which the spectral expansion is performed.
const Valeur & lapang() const
Returns the angular Laplacian of *this.
Tbl diffrel(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (norme version).
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
const Map & get_mp() const
Returns the mapping.