29char map_et_poisson_falloff_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Map/map_et_poisson_falloff.C,v 1.2 2014/10/13 08:53:05 j_novak Exp $" ;
54void Map_et::poisson_falloff(
const Cmp& source, Param& par, Cmp& uu,
int k_falloff)
const {
56 assert(source.get_etat() != ETATNONDEF) ;
57 assert(source.get_mp() ==
this) ;
59 assert(uu.get_mp() ==
this) ;
70 apre1.set_etat_qcq() ;
71 for (
int l=0; l<nz; l++) {
81 Tbl amax0 =
max(apre1) ;
85 amax1.set_etat_qcq() ;
86 for (
int l=0; l<nz; l++) {
87 *(amax1.t[l]) = amax0(l) ;
97 int nitermax = par.get_int() ;
98 int& niter = par.get_int_mod() ;
99 double lambda = par.get_double() ;
100 double unmlambda = 1. - lambda ;
101 double precis = par.get_double(1) ;
103 Cmp& ssj = par.get_cmp_mod() ;
108 Valeur& vuu = uu.va ;
111 if (uu.get_etat() == ETATZERO) {
113 vuujm1.set_base( vuu.base ) ;
121 Map_af mpaff(*
this) ;
124 cout <<
"Map_et::poisson : relat. diff. u^J <-> u^{J-1} : " << endl ;
147 Valeur duudx = (uu.va).dsdx() ;
149 const Valeur& d2uudtdx = duudx.dsdt() ;
151 const Valeur& std2uudpdx = duudx.stdsdp() ;
157 Valeur sxlapang = uu.va ;
161 sxlapang = sxlapang.lapang() ;
163 sxlapang = sxlapang.sx() ;
177 Valeur varduudx = duudx ;
181 Base_val sauve_base = varduudx.base ;
183 vuu = 2. *
dxdr * (
rsxdxdr * unjj - 1.) * varduudx
186 vuu.set_base(sauve_base) ;
197 sauve_base = vuu.base ;
208 vuu.set_base(sauve_base) ;
219 ssj = lambda * ssjm1 + unmlambda * ssjm2 ;
221 ssj = ( source + uu + (amax - apre) * ssj ) / amax ;
223 (ssj.va).set_base((source.va).base) ;
231 mpaff.poisson_falloff(ssj, par_nul, uu, k_falloff) ;
240 cout <<
" iter: " << niter <<
" : " ;
241 for (
int l=0; l<nz; l++) {
242 cout << tdiff(l) <<
" " ;
257 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.