95#include "param_elliptic.h"
106 assert(source.
get_etat() != ETATNONDEF) ;
107 assert(source.
get_mp().get_mg() == mg) ;
108 assert(pot.
get_mp().get_mg() == mg) ;
117 if (sourva.
get_etat() == ETATZERO) {
123 assert(sourva.
get_etat() == ETATQCQ) ;
127 rho = *(sourva.
c_cf) ;
140 Mtbl_cf resu = elliptic_solver (ope_var, *(rho.
c_cf)) ;
164 double fact_dir,
double fact_neu )
const {
166 assert(source.
get_etat() != ETATNONDEF) ;
167 assert(source.
get_mp().get_mg() == mg) ;
168 assert(pot.
get_mp().get_mg() == mg) ;
177 if (sourva.
get_etat() == ETATZERO) {
183 assert(sourva.
get_etat() == ETATQCQ) ;
187 rho = *(sourva.
c_cf) ;
200 Mtbl_cf resu = elliptic_solver_boundary (ope_var, *(rho.
c_cf), bound,
201 fact_dir, fact_neu) ;
227 double fact_dir,
double fact_neu )
const {
229 assert(source.
get_etat() != ETATNONDEF) ;
230 assert(source.
get_mp().get_mg() == mg) ;
231 assert(pot.
get_mp().get_mg() == mg) ;
240 if (sourva.
get_etat() == ETATZERO) {
246 assert(sourva.
get_etat() == ETATQCQ) ;
250 rho = *(sourva.
c_cf) ;
270 const Mg3d& gri2d = *mapp.get_mg();
272 assert(&gri2d == source.
get_mp().get_mg()->get_angu_1dom()) ;
279 int nr = gri2d.
get_nr(0) ;
280 int nt = gri2d.
get_nt(0) ;
281 int np = gri2d.
get_np(0) ;
283 for(
int k=0; k<np+2; k++)
284 for (
int j=0; j<=nt-1; j++)
285 for(
int xi=0; xi<= nr-1; xi++)
291 Mtbl_cf resu = elliptic_solver_boundary (ope_var, *(rho.
c_cf), bound2,
292 fact_dir, fact_neu) ;
316 Scalar& pot,
double val)
const {
318 assert(source.
get_etat() != ETATNONDEF) ;
319 assert(source.
get_mp().get_mg() == mg) ;
320 assert(pot.
get_mp().get_mg() == mg) ;
329 if (sourva.
get_etat() == ETATZERO) {
335 assert(sourva.
get_etat() == ETATQCQ) ;
339 rho = *(sourva.
c_cf) ;
352 Mtbl_cf resu = elliptic_solver_no_zec (ope_var, *(rho.
c_cf), val) ;
373 Scalar& pot,
double val)
const {
375 assert(source.
get_etat() != ETATNONDEF) ;
376 assert(source.
get_mp().get_mg() == mg) ;
377 assert(pot.
get_mp().get_mg() == mg) ;
386 if (sourva.
get_etat() == ETATZERO) {
392 assert(sourva.
get_etat() == ETATQCQ) ;
396 rho = *(sourva.
c_cf) ;
409 Mtbl_cf resu = elliptic_solver_only_zec (ope_var, *(rho.
c_cf), val) ;
430 const Scalar& source,
Scalar& pot,
double* amplis,
double* phases)
const {
432 assert(source.
get_etat() != ETATNONDEF) ;
433 assert(source.
get_mp().get_mg() == mg) ;
434 assert(pot.
get_mp().get_mg() == mg) ;
443 if (sourva.
get_etat() == ETATZERO) {
449 assert(sourva.
get_etat() == ETATQCQ) ;
453 rho = *(sourva.
c_cf) ;
466 Mtbl_cf resu = elliptic_solver_sin_zec (ope_var, *(rho.
c_cf), amplis, phases) ;
491 assert(source.
get_etat() != ETATNONDEF) ;
492 assert(source.
get_mp().get_mg() == mg) ;
493 assert(pot.
get_mp().get_mg() == mg) ;
502 if (sourva.
get_etat() == ETATZERO) {
508 assert(sourva.
get_etat() == ETATQCQ) ;
512 rho = *(sourva.
c_cf) ;
526 Mtbl_cf resu = elliptic_solver_fixe_der_zero (valeur, ope_var, *(rho.
c_cf)) ;
void sol_elliptic_boundary(Param_elliptic ¶ms, const Scalar &so, Scalar &uu, const Mtbl_cf &bound, double fact_dir, double fact_neu) const
General elliptic solver including inner boundary conditions.
void sol_elliptic(Param_elliptic ¶ms, const Scalar &so, Scalar &uu) const
General elliptic solver.
void sol_elliptic_sin_zec(Param_elliptic ¶ms, const Scalar &so, Scalar &uu, double *coefs, double *) const
General elliptic solver.
void sol_elliptic_fixe_der_zero(double val, Param_elliptic ¶ms, const Scalar &so, Scalar &uu) const
General elliptic solver fixing the derivative at the origin and relaxing the continuity of the first ...
double * alpha
Array (size: mg->nzone ) of the values of in each domain.
void sol_elliptic_only_zec(Param_elliptic ¶ms, const Scalar &so, Scalar &uu, double val) const
General elliptic solver.
void sol_elliptic_no_zec(Param_elliptic ¶ms, const Scalar &so, Scalar &uu, double val) const
General elliptic solver.
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
Coefficients storage for the multi-domain spectral method.
Tbl & set(int l)
Read/write of the Tbl containing the coefficients in a given domain.
void annule_hard()
Sets the Mtbl_cf to zero in a hard way.
This class contains the parameters needed to call the general elliptic solver.
Scalar var_G
Multiplicative variable change that must be sphericaly symetric !
Scalar var_F
Additive variable change function.
Tensor field of valence 0 (or component of a tensorial field).
virtual void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
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 set_etat_zero()
Sets the logical state to ETATZERO (zero).
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).
const Base_val & get_spectral_base() const
Returns the spectral bases of the Valeur va.
void set_dzpuis(int)
Modifies the dzpuis flag.
Values and coefficients of a (real-value) function.
int get_etat() const
Returns the logical state.
void ylm()
Computes the coefficients 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.
void ylm_i()
Inverse of ylm().
const Map & get_mp() const
Returns the mapping.
Map(const Mg3d &)
Constructor from a multi-domain 3D grid.