89 Mtbl_cf sol_poisson_frontiere(
const Map_af&,
const Mtbl_cf&,
const Mtbl_cf&,
90 int,
int,
int,
double = 0.,
93 Mtbl_cf sol_poisson_frontiere_double (
const Map_af&,
const Mtbl_cf&,
const Mtbl_cf&,
94 const Mtbl_cf&,
int) ;
96 Mtbl_cf sol_poisson_interne(
const Map_af&,
const Mtbl_cf&,
const Mtbl_cf&) ;
120 Cmp Cmp::poisson_frontiere_double (
const Valeur& lim_func,
const Valeur& lim_der,
121 int num_zone)
const {
123 mp->poisson_frontiere_double (*
this, lim_func, lim_der, num_zone, resu) ;
128 cout <<
"Procedure non implantee ! " << endl ;
132 void Map_et::poisson_frontiere_double (
const Cmp&,
const Valeur&,
const Valeur&,
134 cout <<
"Procedure non implantee ! " << endl ;
139 int type_raccord,
int num_front,
140 Cmp& pot,
double fact_dir,
double fact_neu)
const {
142 assert(source.
get_etat() != ETATNONDEF) ;
148 assert ((type_raccord == 1) || (type_raccord==2)|| (type_raccord==3)) ;
167 if (sourva.
get_etat() == ETATZERO) {
171 so_cf = *sourva.
c_cf ;
174 Valeur conditions (limite) ;
180 if (conditions.
get_etat() == ETATZERO)
183 auxiliaire = *conditions.
c_cf ;
187 if (type_raccord == 3){
191 resu = sol_poisson_frontiere(*
this, so_cf, auxiliaire,
192 type_raccord, num_front, dzpuis,
193 fact_dir, fact_neu) ;
196 resu = sol_poisson_frontiere(*
this, so_cf, auxiliaire,
197 type_raccord, num_front, dzpuis) ;
212 const Valeur& lim_der,
int num_zone,
Cmp& pot)
const {
214 assert(source.
get_etat() != ETATNONDEF) ;
228 Mtbl_cf so_cf (sourva.get_mg(), sourva.base) ;
229 if (sourva.get_etat() == ETATZERO) {
233 so_cf = *sourva.c_cf ;
236 Valeur cond_func (lim_func) ;
242 if (cond_func.
get_etat() == ETATZERO)
245 auxi_func = *cond_func.
c_cf ;
247 Valeur cond_der (lim_der) ;
253 if (cond_der.
get_etat() == ETATZERO)
256 auxi_der = *cond_der.
c_cf ;
263 Mtbl_cf resu = sol_poisson_frontiere_double (*
this, so_cf, auxi_func,
264 auxi_der, num_zone) ;
280 assert(source.
get_etat() != ETATNONDEF) ;
281 assert(source.
get_mp() ==
this) ;
283 assert(uu.
get_mp() ==
this) ;
295 for (
int l=0; l<nz; l++) {
299 apre1 = apre1 *
dxdr *
dxdr * unjj ;
309 for (
int l=0; l<nz; l++) {
310 *(amax1.
t[l]) = amax0(l) ;
324 double unmlambda = 1. - lambda ;
348 cout <<
"Map_et::poisson : relat. diff. u^J <-> u^{J-1} : " << endl ;
384 sxlapang = sxlapang.
lapang() ;
386 sxlapang = sxlapang.
sx() ;
404 vuu = 2. *
dxdr * (
rsxdxdr * unjj - 1.) * varduudx
418 sauve_base = vuu.
base ;
436 ssj = lambda * ssjm1 + unmlambda * ssjm2 ;
438 ssj = ( source + uu + (amax - apre) * ssj ) / amax ;
440 (ssj.
va).set_base((source.
va).base) ;
450 cout <<
" step " << niter <<
" : " ;
451 cout << tdiff(0) <<
" " ;
466 while ( (tdiff(0) > precis) && (niter < nitermax) ) ;
480 assert(source.
get_etat() != ETATNONDEF) ;
493 Mtbl_cf so_cf (sourva.get_mg(), sourva.base) ;
494 if (sourva.get_etat() == ETATZERO) {
498 so_cf = *sourva.c_cf ;
500 Valeur conditions (limite) ;
507 if (conditions.
get_etat() == ETATZERO)
510 auxiliaire = *conditions.
c_cf ;
515 Mtbl_cf resu = sol_poisson_interne(*
this, so_cf, auxiliaire) ;
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.
Mtbl_cf * c_cf
Coefficients of the spectral expansion of the function.
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
const Valeur & lapang() const
Returns the angular Laplacian of *this.
void coef() const
Computes the coeffcients of *this.
double * alpha
Array (size: mg->nzone ) of the values of in each domain.
void ylm()
Computes the coefficients of *this.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
int get_etat() const
Returns the logical state.
Coord sr2drdt
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
virtual void poisson_frontiere_double(const Cmp &source, const Valeur &lim_func, const Valeur &lim_der, int num_zone, Cmp &pot) const
Solver of the Poisson equation with boundary condition for the affine mapping case, cases with boundary conditions of both Dirichlet and Neumann type (no condition imposed at infinity).
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).
Coord srstdrdp
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
const Mg3d * get_mg() const
Returns the Mg3d on which the this is defined.
Cmp & get_cmp_mod(int position=0) const
Returns the reference of a modifiable Cmp stored in the list.
virtual void poisson_interne(const Cmp &source, const Valeur &limite, Param &par, Cmp &pot) const =0
Computes the solution of a Poisson equation in the shell, imposing a boundary condition at the surfac...
int get_etat() const
Returns the logical state.
virtual void poisson_frontiere(const Cmp &, const Valeur &, int, int, Cmp &, double=0., double=0.) const
Not yet implemented.
void set_etat_zero()
Sets the logical state to ETATZERO (zero).
const int & get_int(int position=0) const
Returns the reference of a int stored in the list.
const Mg3d * get_angu() const
Returns the pointer on the associated angular grid.
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.
virtual void poisson_frontiere(const Cmp &, const Valeur &, int, int, Cmp &, double=0., double=0.) const
Solver of the Poisson equation with boundary condition for the affine mapping case.
bool dz_nonzero() const
Returns true if the last domain is compactified and *this is not zero in this domain.
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.
Cmp poisson_dirichlet(const Valeur &limite, int num) const
Is identicall to Cmp::poisson() .
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.
Coord xsr
in the nucleus; \ 1/R in the non-compactified shells; \ in the compactified outer domain...
virtual void poisson_interne(const Cmp &source, const Valeur &limite, Param &par, Cmp &pot) const
Computes the solution of a Poisson equation in the shell .
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.
void set_etat_zero()
Sets the logical state to ETATZERO (zero).
const Mg3d * mg
Pointer on the multi-grid Mgd3 on which this is defined.
virtual void poisson_frontiere(const Cmp &source, const Valeur &limite, int raccord, int num_front, Cmp &pot, double=0., double=0.) const =0
Computes the solution of a Poisson equation from the domain num_front+1 .
Bases of the spectral expansions.
const Map * mp
Reference mapping.
int get_dzpuis() const
Returns dzpuis.
Coord lapr_tp
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Coefficients storage for the multi-domain spectral method.
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...
virtual void poisson_interne(const Cmp &source, const Valeur &limite, Param &par, Cmp &pot) const
Computes the solution of a Poisson equation in the shell, imposing a boundary condition at the surfac...
Cmp poisson_neumann(const Valeur &, int) const
Idem as Cmp::poisson_dirichlet , the boundary condition being on the radial derivative of the solutio...
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.
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.
Valeur va
The numerical value of the Cmp.
Cmp poisson_neumann_interne(const Valeur &, Param &par, Cmp &resu) const
Idem as Cmp::poisson_neumann , the boundary condition is on the radial derivative of the solution...
Coord d2rdtdx
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.