29char map_et_poisson_ylm_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Map/map_et_poisson_ylm.C,v 1.2 2014/10/13 08:53:05 j_novak Exp $" ;
54void Map_et::poisson_ylm(
const Cmp& source, Param& par, Cmp& uu,
int nylm,
double* intvec)
const {
56 assert(source.get_etat() != ETATNONDEF) ;
57 assert(source.get_mp() ==
this) ;
59 assert(uu.get_mp() ==
this) ;
71 apre1.set_etat_qcq() ;
72 for (
int l=0; l<nz; l++) {
82 Tbl amax0 =
max(apre1) ;
86 amax1.set_etat_qcq() ;
87 for (
int l=0; l<nz; l++) {
88 *(amax1.t[l]) = amax0(l) ;
98 int nitermax = par.get_int() ;
99 int& niter = par.get_int_mod() ;
100 double lambda = par.get_double() ;
102 double unmlambda = 1. - lambda ;
103 double precis = par.get_double(1) ;
105 cout <<
"relax in map_et:"<<lambda<<
" "<<unmlambda<<endl;
107 Cmp& ssj = par.get_cmp_mod() ;
112 Valeur& vuu = uu.va ;
115 if (uu.get_etat() == ETATZERO) {
117 vuujm1.set_base( vuu.base ) ;
125 Map_af mpaff(*
this) ;
128 cout <<
"Map_et::poisson : relat. diff. u^J <-> u^{J-1} : " << endl ;
151 Valeur duudx = (uu.va).dsdx() ;
153 const Valeur& d2uudtdx = duudx.dsdt() ;
155 const Valeur& std2uudpdx = duudx.stdsdp() ;
161 Valeur sxlapang = uu.va ;
165 sxlapang = sxlapang.lapang() ;
167 sxlapang = sxlapang.sx() ;
181 Valeur varduudx = duudx ;
185 Base_val sauve_base = varduudx.base ;
187 vuu = 2. *
dxdr * (
rsxdxdr * unjj - 1.) * varduudx
190 vuu.set_base(sauve_base) ;
201 sauve_base = vuu.base ;
212 vuu.set_base(sauve_base) ;
223 ssj = lambda * ssjm1 + unmlambda * ssjm2 ;
225 ssj = ( source + uu + (amax - apre) * ssj ) / amax ;
227 (ssj.va).set_base((source.va).base) ;
235 mpaff.poisson_ylm(ssj, par_nul, uu, nylm, intvec) ;
244 cout <<
" iter: " << niter <<
" : " ;
245 for (
int l=0; l<nz; l++) {
246 cout << tdiff(l) <<
" " ;
261 while ( (diff > precis) && (niter < nitermax) ) ;
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.
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.