23char cmp_pde_frontiere_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Cmp/cmp_pde_frontiere.C,v 1.7 2014/10/13 08:52:48 j_novak Exp $" ;
86Mtbl_cf sol_poisson_frontiere(
const Map_af&,
const Mtbl_cf&,
const Mtbl_cf&,
87 int,
int,
int,
double = 0.,
90Mtbl_cf sol_poisson_frontiere_double (
const Map_af&,
const Mtbl_cf&,
const Mtbl_cf&,
91 const Mtbl_cf&,
int) ;
93Mtbl_cf sol_poisson_interne(
const Map_af&,
const Mtbl_cf&,
const Mtbl_cf&) ;
117Cmp Cmp::poisson_frontiere_double (
const Valeur& lim_func,
const Valeur& lim_der,
118 int num_zone)
const {
120 mp->poisson_frontiere_double (*
this, lim_func, lim_der, num_zone, resu) ;
125 cout <<
"Procedure non implantee ! " << endl ;
129void Map_et::poisson_frontiere_double (
const Cmp&,
const Valeur&,
const Valeur&,
131 cout <<
"Procedure non implantee ! " << endl ;
136 int type_raccord,
int num_front,
137 Cmp& pot,
double fact_dir,
double fact_neu)
const {
139 assert(source.
get_etat() != ETATNONDEF) ;
145 assert ((type_raccord == 1) || (type_raccord==2)|| (type_raccord==3)) ;
164 if (sourva.
get_etat() == ETATZERO) {
168 so_cf = *sourva.
c_cf ;
171 Valeur conditions (limite) ;
177 if (conditions.
get_etat() == ETATZERO)
180 auxiliaire = *conditions.
c_cf ;
184 if (type_raccord == 3){
188 resu = sol_poisson_frontiere(*
this, so_cf, auxiliaire,
189 type_raccord, num_front, dzpuis,
190 fact_dir, fact_neu) ;
193 resu = sol_poisson_frontiere(*
this, so_cf, auxiliaire,
194 type_raccord, num_front, dzpuis) ;
209 const Valeur& lim_der,
int num_zone,
Cmp& pot)
const {
211 assert(source.
get_etat() != ETATNONDEF) ;
226 if (sourva.
get_etat() == ETATZERO) {
230 so_cf = *sourva.
c_cf ;
233 Valeur cond_func (lim_func) ;
239 if (cond_func.
get_etat() == ETATZERO)
242 auxi_func = *cond_func.
c_cf ;
244 Valeur cond_der (lim_der) ;
250 if (cond_der.
get_etat() == ETATZERO)
253 auxi_der = *cond_der.
c_cf ;
260 Mtbl_cf resu = sol_poisson_frontiere_double (*
this, so_cf, auxi_func,
261 auxi_der, num_zone) ;
277 assert(source.
get_etat() != ETATNONDEF) ;
278 assert(source.
get_mp() ==
this) ;
280 assert(uu.
get_mp() ==
this) ;
292 for (
int l=0; l<nz; l++) {
296 apre1 = apre1 *
dxdr *
dxdr * unjj ;
306 for (
int l=0; l<nz; l++) {
307 *(amax1.
t[l]) = amax0(l) ;
321 double unmlambda = 1. - lambda ;
345 cout <<
"Map_et::poisson : relat. diff. u^J <-> u^{J-1} : " << endl ;
381 sxlapang = sxlapang.
lapang() ;
383 sxlapang = sxlapang.
sx() ;
401 vuu = 2. *
dxdr * (
rsxdxdr * unjj - 1.) * varduudx
415 sauve_base = vuu.
base ;
433 ssj = lambda * ssjm1 + unmlambda * ssjm2 ;
435 ssj = ( source + uu + (amax - apre) * ssj ) / amax ;
437 (ssj.
va).set_base((source.
va).base) ;
447 cout <<
" step " << niter <<
" : " ;
448 cout << tdiff(0) <<
" " ;
463 while ( (tdiff(0) > precis) && (niter < nitermax) ) ;
477 assert(source.
get_etat() != ETATNONDEF) ;
491 if (sourva.
get_etat() == ETATZERO) {
495 so_cf = *sourva.
c_cf ;
497 Valeur conditions (limite) ;
504 if (conditions.
get_etat() == ETATZERO)
507 auxiliaire = *conditions.
c_cf ;
512 Mtbl_cf resu = sol_poisson_interne(*
this, so_cf, auxiliaire) ;
Bases of the spectral expansions.
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
const Map * mp
Reference mapping.
int get_etat() const
Returns the logical state.
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.
Cmp poisson_dirichlet(const Valeur &limite, int num) const
Is identicall to Cmp::poisson() .
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
int get_dzpuis() const
Returns dzpuis.
bool dz_nonzero() const
Returns true if the last domain is compactified and *this is not zero in this domain.
void set_etat_zero()
Sets the logical state to ETATZERO (zero).
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.
Cmp poisson_neumann(const Valeur &, int) const
Idem as Cmp::poisson_dirichlet , the boundary condition being on the radial derivative of the solutio...
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...
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.
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,...
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 .
virtual void poisson_frontiere(const Cmp &, const Valeur &, int, int, Cmp &, double=0., double=0.) const
Not yet implemented.
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.
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 .
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...
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
const Mg3d * mg
Pointer on the multi-grid Mgd3 on which this is defined
const Mg3d * get_angu() const
Returns the pointer on the associated angular grid.
int get_nzone() const
Returns the number of domains.
Coefficients storage for the multi-domain spectral method.
void set_etat_zero()
Sets the logical state to ETATZERO (zero).
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.
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.
int get_etat() const
Returns the logical state.
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.
Mtbl_cf * c_cf
Coefficients of the spectral expansion of the function.
void coef() const
Computes the coeffcients of *this.
const Mg3d * get_mg() const
Returns the Mg3d on which the this is defined.
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.