378 class Param_elliptic ;
575 bool is_nan(
bool verbose=
false)
const ;
594 operator Cmp()
const ;
616 assert(
etat == ETATQCQ) ;
626 assert( (
etat == ETATQCQ) || (
etat == ETATUN) ) ;
638 assert(
etat != ETATNONDEF) ;
639 if (
etat == ETATZERO) {
644 if (
etat == ETATUN) {
649 return va(l, k, j, i) ;
668 double val_point(
double r,
double theta,
double phi)
const ;
685 assert(
etat == ETATQCQ) ;
686 return va.
set(l, k, j, i) ;
700 virtual void annule(
int l_min,
int l_max) ;
995 double alpha= -16.) ;
1008 double alpha= -1E-16) ;
1033 double alpha= -16.) ;
1042 void annule_l (
int l_min,
int l_max,
bool ylm_output=
false ) ;
1054 void filtre_tp(
int nn,
int nz1,
int nz2) ;
1131 virtual void sauve(FILE *)
const ;
1144 double threshold = 1.e-7,
int precision = 4,
1145 ostream& ostr = cout)
const ;
1173 void visu_section(
const char section_type,
double aa,
double umin,
double umax,
double vmin,
1174 double vmax,
const char* title = 0x0,
const char* filename = 0x0,
1175 bool start_dx =
true,
int nu = 200,
int nv = 200)
const ;
1205 void visu_section(
const Tbl& plane,
double umin,
double umax,
double vmin,
1206 double vmax,
const char* title = 0x0,
const char* filename = 0x0,
1207 bool start_dx =
true,
int nu = 200,
int nv = 200)
const ;
1238 double umax,
double vmin,
double vmax,
int jtime,
double ttime,
1239 int jgraph = 1,
const char* title = 0x0,
const char* filename_root = 0x0,
1240 bool start_dx =
false,
int nu = 200,
int nv = 200)
const ;
1263 void visu_box(
double xmin,
double xmax,
double ymin,
double ymax,
1264 double zmin,
double zmax,
const char* title0 = 0x0,
1265 const char* filename0 = 0x0,
bool start_dx =
true,
int nx = 40,
int ny = 40,
1266 int nz = 40)
const ;
1413 double fact_dir,
double fact_neu)
const ;
1487 bool detail =
false)
const ;
1555 double fact_dir,
double fact_neu)
const ;
1562 double fact_dir,
double fact_neu)
const ;
1639 void import(
const Scalar& ci) ;
1669 void import(
int nzet,
const Scalar& ci) ;
1860 ostream& operator<<(ostream& ,
const Scalar & ) ;
1871 Scalar
operator+(
const Scalar&,
const Scalar &) ;
1872 Scalar
operator+(
const Scalar&,
const Mtbl&) ;
1873 Scalar
operator+(
const Mtbl&,
const Scalar&) ;
1874 Scalar
operator+(
const Scalar&,
double ) ;
1875 Scalar
operator+(
double,
const Scalar& ) ;
1878 Scalar
operator-(
const Scalar &,
const Scalar &) ;
1879 Scalar
operator-(
const Scalar&,
const Mtbl&) ;
1880 Scalar
operator-(
const Mtbl&,
const Scalar&) ;
1881 Scalar
operator-(
const Scalar&,
double ) ;
1882 Scalar
operator-(
double,
const Scalar& ) ;
1885 Scalar
operator*(
const Scalar &,
const Scalar &) ;
1888 Scalar
operator%(
const Scalar &,
const Scalar &) ;
1891 Scalar
operator|(
const Scalar &,
const Scalar &) ;
1893 Scalar
operator*(
const Mtbl&,
const Scalar&) ;
1894 Scalar
operator*(
const Scalar&,
const Mtbl&) ;
1896 Scalar
operator*(
const Scalar&,
double ) ;
1897 Scalar
operator*(
double,
const Scalar &) ;
1900 Scalar
operator/(
const Scalar &,
const Scalar &) ;
1901 Scalar
operator/(
const Scalar&,
double ) ;
1902 Scalar
operator/(
double,
const Scalar &) ;
1905 Scalar
operator/(
const Scalar &,
const Mtbl&) ;
1906 Scalar
operator/(
const Mtbl&,
const Scalar &) ;
1909 Scalar
sin(
const Scalar& ) ;
1910 Scalar
cos(
const Scalar& ) ;
1911 Scalar
tan(
const Scalar& ) ;
1912 Scalar
asin(
const Scalar& ) ;
1913 Scalar
acos(
const Scalar& ) ;
1914 Scalar
atan(
const Scalar& ) ;
1915 Scalar
exp(
const Scalar& ) ;
1917 Scalar
log(
const Scalar& ) ;
1918 Scalar
log10(
const Scalar& ) ;
1919 Scalar
sqrt(
const Scalar& ) ;
1921 Scalar
pow(
const Scalar& ,
int ) ;
1922 Scalar
pow(
const Scalar& ,
double ) ;
1923 Scalar
abs(
const Scalar& ) ;
1944 Tbl
max(
const Scalar& ) ;
1951 Tbl
min(
const Scalar& ) ;
1959 Tbl
norme(
const Scalar& ) ;
1969 Tbl
diffrel(
const Scalar& a,
const Scalar& b) ;
1979 Tbl
diffrelmax(
const Scalar& a,
const Scalar& b) ;
void import_align_symy(int nzet, const Scalar &ci)
Assignment to another Scalar defined on a different mapping, when the two mappings have aligned Carte...
void raccord(int n)
Performs the matching of the nucleus with respect to the first shell.
void filtre_tp(int nn, int nz1, int nz2)
Sets the n lasts coefficients in to 0 in the domain nz1 to nz2 when expressed in spherical harmonics...
void mult_r_ced()
Multiplication by r in the compactified external domain (CED), the dzpuis flag is not changed.
Cmp racine_cubique(const Cmp &)
Cube root.
Scalar poisson_neumann(const Valeur &, int) const
Idem as Scalar::poisson_dirichlet , the boundary condition being on the radial derivative of the solu...
virtual void sauve(FILE *) const
Save in a file.
virtual void spectral_display(const char *comment=0x0, double threshold=1.e-7, int precision=4, ostream &ostr=cout) const
Displays the spectral coefficients and the associated basis functions.
void set_outer_boundary(int l, double x)
Sets the value of the Scalar at the outer boundary of a given domain.
friend Scalar sin(const Scalar &)
Sine.
Bases of the spectral expansions.
Values and coefficients of a (real-value) function.
virtual void inc_dzpuis(int inc=1)
Increases by inc units the value of dzpuis and changes accordingly the values of the Scalar in the co...
Scalar * p_dsdz
Pointer on of *this , where (0x0 if not up to date)
void filtre_phi(int n, int zone)
Sets the n lasts coefficients in to 0 in the domain zone .
Scalar * p_dsdrho
Pointer on of *this
friend Tbl diffrelmax(const Scalar &a, const Scalar &b)
Relative difference between two Scalar (max version).
double val_point(double r, double theta, double phi) const
Computes the value of the field at an arbitrary point , by means of the spectral expansion.
Metric for tensor calculation.
void set_etat_one()
Sets the logical state to ETATUN (one).
void set_inner_boundary(int l, double x)
Sets the value of the Scalar at the inner boundary of a given domain.
virtual void std_spectral_base_odd()
Sets the spectral bases of the Valeur va to the standard odd ones for a scalar field.
void set_spectral_base(const Base_val &)
Sets the spectral bases of the Valeur va
Valeur va
The numerical value of the Scalar
const Scalar & dsdy() const
Returns of *this , where .
void raccord_c1_zec(int puis, int nbre, int lmax)
Performs the matching of the external domain with respect to the last shell using function like wit...
void operator=(const Scalar &a)
Assignment to another Scalar defined on the same mapping.
friend Scalar operator+(const Scalar &, const Scalar &)
Scalar + Scalar.
void visu_section(const char section_type, double aa, double umin, double umax, double vmin, double vmax, const char *title=0x0, const char *filename=0x0, bool start_dx=true, int nu=200, int nv=200) const
3D visualization via a plane section.
void div_rsint_dzpuis(int ced_mult_r)
Division by but with the output flag dzpuis set to ced_mult_r .
double totalmin(const Mtbl &)
Minimum value of the Mtbl elements in all domain.
Scalar sol_elliptic(Param_elliptic ¶ms) const
Resolution of a general elliptic equation, putting zero at infinity.
friend double totalmin(const Scalar &)
Minimum values of a Scalar in each domain.
const Scalar & dsdr() const
Returns of *this .
Cmp log(const Cmp &)
Neperian logarithm.
Scalar * p_dsdr
Pointer on of *this (0x0 if not up to date)
void mult_rsint()
Multiplication by everywhere; dzpuis is not changed.
Mtbl Heaviside(const Mtbl &)
Heaviside function.
Cmp exp(const Cmp &)
Exponential.
Tbl diffrel(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (norme version).
void mult_rsint_dzpuis(int ced_mult_r)
Multiplication by but with the output flag dzpuis set to ced_mult_r .
Tbl tbl_out_bound(int l_dom, bool leave_ylm=false)
Returns the Tbl containing the values of angular coefficients at the outer boundary.
friend Scalar log10(const Scalar &)
Basis 10 logarithm.
friend Scalar log(const Scalar &)
Neperian logarithm.
void import_align(int nzet, const Scalar &ci)
Assignment to another Scalar defined on a different mapping, when the two mappings have aligned Carte...
Base_val operator*(const Base_val &, const Base_val &)
This operator is used when calling multiplication or division of Valeur .
friend Scalar tan(const Scalar &)
Tangent.
Scalar operator|(const Scalar &, const Scalar &)
Scalar * Scalar with desaliasing only in r.
const Scalar & deriv(int i) const
Returns of *this , where .
void filtre(int n)
Sets the n lasts coefficients in r to 0 in the external domain.
Scalar sol_elliptic_sin_zec(Param_elliptic ¶ms, double *coefs, double *phases) const
General elliptic solver.
friend Scalar operator-(const Scalar &)
- Scalar
const Vector & derive_cov(const Metric &gam) const
Returns the gradient (1-form = covariant vector) of *this
void match_tau_shell(Param &par_bc, Param *par_mat=0x0)
Method for matching accross domains and imposing boundary condition.
Tbl diffrelmax(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (max version).
void sarra_filter_r_all_domains(double p, double alpha=1E-16)
Applies an exponential filter in radial direction in all domains for the case where p is a double (se...
friend Scalar operator%(const Scalar &, const Scalar &)
Scalar * Scalar with desaliasing.
virtual ~Scalar()
Destructor.
double & set_grid_point(int l, int k, int j, int i)
Setting the value of the field at a given grid point.
friend Scalar operator/(const Scalar &, const Scalar &)
Scalar / Scalar.
friend Scalar racine_cubique(const Scalar &)
Cube root.
Scalar derive_lie(const Vector &v) const
Computes the derivative of this along a vector field v.
void div_rsint()
Division by everywhere; dzpuis is not changed.
void exp_filter_ylm_all_domains(Scalar &ss, int p, double alpha=-16.)
Applies an exponential filter in angular directions in all domains.
Tbl norme(const Cmp &)
Sums of the absolute values of all the values of the Cmp in each domain.
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
void fixe_decroissance(int puis)
Substracts all the components behaving like in the external domain, with n strictly lower than puis ...
const Scalar & srstdsdp() const
Returns of *this .
void import_asymy(const Scalar &ci)
Assignment to another Scalar defined on a different mapping.
void exp_filter_r_all_domains(Scalar &ss, int p, double alpha=-16.)
Applies an exponential filter in radial direction in all domains.
friend Scalar asin(const Scalar &)
Arcsine.
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...
Cmp abs(const Cmp &)
Absolute value.
Cmp atan(const Cmp &)
Arctangent.
void mult_r_dzpuis(int ced_mult_r)
Multiplication by r everywhere but with the output flag dzpuis set to ced_mult_r .
Scalar * p_stdsdp
Pointer on of *this (0x0 if not up to date)
virtual void exponential_filter_ylm(int lzmin, int lzmax, int p, double alpha=-16.)
Applies an exponential filter to the spectral coefficients in the angular directions.
void import_anti_asymy(int nzet, const Scalar &ci)
Assignment to another Scalar defined on a different mapping, when the two mappings have anti-aligned ...
Tensor field of valence 0 (or component of a tensorial field).
Cmp pow(const Cmp &, int)
Power .
bool dz_nonzero() const
Returns true if the last domain is compactified and *this is not zero in this domain.
void raccord_externe(int puis, int nbre, int lmax)
Matching of the external domain with the outermost shell.
friend Tbl norme(const Scalar &)
Sums of the absolute values of all the values of the Scalar in each domain.
const Scalar & srdsdt() const
Returns of *this .
void sarra_filter_r(int lzmin, int lzmax, double p, double alpha=-1E-16)
Applies an exponential filter to the spectral coefficients in the radial direction.
This class contains the parameters needed to call the general elliptic solver.
const Base_val & get_spectral_base() const
Returns the spectral bases of the Valeur va
Scalar sol_elliptic_2d(Param_elliptic &) const
Solves the scalar 2-dimensional elliptic equation with *this as a source.
void div_tant()
Division by .
Scalar sol_elliptic_pseudo_1d(Param_elliptic &) const
Solves a pseudo-1d elliptic equation with *this as a source.
void div_r_ced()
Division by r in the compactified external domain (CED), the dzpuis flag is not changed.
void div_sint()
Division by .
const Valeur & get_spectral_va() const
Returns va (read only version)
virtual void dec_dzpuis(int dec=1)
Decreases by dec units the value of dzpuis and changes accordingly the values of the Scalar in the co...
int etat
The logical state ETATNONDEF (undefined), ETATZERO (null), ETATUN (one), or ETATQCQ (ordinary).
Valeur & set_spectral_va()
Returns va (read/write version)
friend Scalar Heaviside(const Scalar &)
Heaviside function.
friend Scalar abs(const Scalar &)
Absolute value.
void import_align_asymy(int nzet, const Scalar &ci)
Assignment to another Scalar defined on a different mapping, when the two mappings have aligned Carte...
const Scalar & dsdradial() const
Returns of *this if the mapping is affine (class Map_af) and of *this if the mapping is logarithmic...
void mult_r()
Multiplication by r everywhere; dzpuis is not changed.
void match_collocation(Param &par_bc, Param *par_mat=0x0)
Method for matching accross domains and imposing boundary condition.
Scalar poisson_dirichlet(const Valeur &limite, int num) const
Is identicall to Scalar::poisson() .
Scalar * p_srdsdt
Pointer on of *this (0x0 if not up to date)
Valeur ** asymptot(int n, const int flag=0) const
Asymptotic expansion at r = infinity.
const Tbl & domain(int l) const
Read-only of the value in a given domain.
void annule_l(int l_min, int l_max, bool ylm_output=false)
Sets all the multipolar components between l_min and l_max to zero.
void import_symy(const Scalar &ci)
Assignment to another Scalar defined on a different mapping.
Cmp asin(const Cmp &)
Arcsine.
bool is_nan(bool verbose=false) const
Looks for NaNs (not a number) in the scalar field.
virtual void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
void div_cost()
Division by .
Cmp operator/(const Cmp &, const Cmp &)
Cmp / Cmp.
Scalar * p_dsdx
Pointer on of *this , where (0x0 if not up to date)
friend Scalar atan(const Scalar &)
Arctangent.
void import_gal(int nzet, const Scalar &ci)
Assignment to another Scalar defined on a different mapping, when the two mappings do not have a part...
friend Tbl max(const Scalar &)
Maximum values of a Scalar in each domain.
const Scalar & lapang() const
Returns the angular Laplacian of *this , where .
void div_r_dzpuis(int ced_mult_r)
Division by r everywhere but with the output flag dzpuis set to ced_mult_r .
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
int ind_lap
Power of r by which the last computed Laplacian has been multiplied in the compactified external doma...
Scalar poisson_dir_neu(const Valeur &limite, int num, double fact_dir, double fact_neu) const
Is identicall to Scalar::poisson() .
Cmp operator-(const Cmp &)
- Cmp
void mult_sint()
Multiplication by .
Tbl min(const Cmp &)
Minimum values of a Cmp in each domain.
const Scalar & laplacian(int ced_mult_r=4) const
Returns the Laplacian of *this.
const Scalar & dsdz() const
Returns of *this , where .
virtual void allocate_all()
Sets the logical state to ETATQCQ (ordinary state) and performs the memory allocation of all the elem...
const Scalar & dsdx() const
Returns of *this , where .
Scalar sol_elliptic_fixe_der_zero(double val, Param_elliptic ¶ms) const
Resolution of a general elliptic equation fixing the dericative at the origin and relaxing one contin...
friend Scalar sqrt(const Scalar &)
Square root.
void visu_box(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax, const char *title0=0x0, const char *filename0=0x0, bool start_dx=true, int nx=40, int ny=40, int nz=40) const
3D visualization (volume rendering) via OpenDX.
void filtre_r(int *nn)
Sets the n lasts coefficients in r to 0 in all domains.
Cmp log10(const Cmp &)
Basis 10 logarithm.
Scalar poisson_frontiere_double(const Valeur &, const Valeur &, int) const
Idem as Scalar::poisson_dirichlet , the boundary condition being on both the function and its radial ...
Scalar poisson_tau() const
Solves the scalar Poisson equation with *this as a source using a real Tau method The source of the ...
virtual void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Cmp acos(const Cmp &)
Arccosine.
virtual void annule(int l_min, int l_max)
Sets the Scalar to zero in several domains.
Cmp sqrt(const Cmp &)
Square root.
virtual void set_etat_zero()
Sets the logical state to ETATZERO (zero).
void set_dzpuis(int)
Modifies the dzpuis flag.
Tensor field of valence 1.
double totalmax(const Mtbl &)
Maximum value of the Mtbl elements in all domains.
void set_der_0x0() const
Sets the pointers for derivatives to 0x0.
Scalar primr(bool null_infty=true) const
Computes the radial primitive which vanishes for .
Scalar * p_srstdsdp
Pointer on of *this (0x0 if not up to date)
const Scalar & dsdt() const
Returns of *this .
void poisson_regular(int k_div, int nzet, double unsgam1, Param &par, Scalar &uu, Scalar &uu_regu, Scalar &uu_div, Tensor &duu_div, Scalar &source_regu, Scalar &source_div) const
Solves the scalar Poisson equation with *this as a source (version with parameters to control the res...
Scalar scalar_out_bound(int n, bool leave_ylm=false)
Returns the Scalar containing the values of angular coefficients at the outer boundary.
Cmp operator%(const Cmp &, const Cmp &)
Cmp * Cmp with desaliasing.
int get_etat() const
Returns the logical state ETATNONDEF (undefined), ETATZERO (null) or ETATQCQ (ordinary).
void visu_section_anim(const char section_type, double aa, double umin, double umax, double vmin, double vmax, int jtime, double ttime, int jgraph=1, const char *title=0x0, const char *filename_root=0x0, bool start_dx=false, int nu=200, int nv=200) const
3D visualization via time evolving plane section (animation).
void operator+=(const Scalar &)
+= Scalar
Tbl tbl_in_bound(int n, bool leave_ylm=false)
Returns the Tbl containing the values of angular coefficients at the inner boundary.
const Vector & derive_con(const Metric &gam) const
Returns the "contravariant" derivative of *this with respect to some metric , by raising the index of...
Scalar avance_dalembert(Param &par, const Scalar &fJm1, const Scalar &source) const
Performs one time-step integration (from ) of the scalar d'Alembert equation with *this being the val...
Tbl test_poisson(const Scalar &uu, ostream &ostr, bool detail=false) const
Checks if a Poisson equation with *this as a source has been correctly solved.
int dzpuis
Power of r by which the quantity represented by this must be divided in the compactified external d...
Scalar sol_divergence(int n) const
Resolution of a divergence-like equation.
Cmp cos(const Cmp &)
Cosine.
void match_tau(Param &par_bc, Param *par_mat=0x0)
Method for matching accross domains and imposing boundary condition.
const Scalar & dsdrho() const
Returns of *this .
double integrale() const
Computes the integral over all space of *this .
Scalar * p_dsdt
Pointer on of *this (0x0 if not up to date)
virtual void exponential_filter_r(int lzmin, int lzmax, int p, double alpha=-16.)
Applies an exponential filter to the spectral coefficients in the radial direction.
Tbl & set_domain(int l)
Read/write of the value in a given domain.
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field.
Cmp operator+(const Cmp &)
friend Scalar exp(const Scalar &)
Exponential.
friend double totalmax(const Scalar &)
Maximum values of a Scalar in each domain.
void annule_hard()
Sets the Scalar to zero in a hard way.
Scalar * p_lap
Pointer on the Laplacian of *this (0x0 if not up to date)
Scalar * p_dsdy
Pointer on of *this , where (0x0 if not up to date)
void import_anti_symy(int nzet, const Scalar &ci)
Assignment to another Scalar defined on a different mapping, when the two mappings have anti-aligned ...
Scalar sol_elliptic_no_zec(Param_elliptic ¶ms, double val=0) const
Resolution of a general elliptic equation, putting a given value at the outermost shell and not solvi...
Tbl multipole_spectrum() const
Gives the spectrum in terms of multipolar modes l .
friend ostream & operator<<(ostream &, const Scalar &)
Display.
Scalar poisson() const
Solves the scalar Poisson equation with *this as a source.
const Tbl & integrale_domains() const
Computes the integral in each domain of *this .
friend Scalar acos(const Scalar &)
Arccosine.
void operator-=(const Scalar &)
-= Scalar
Base_val base
Bases on which the spectral expansion is performed.
Scalar poisson_angu(double lambda=0) const
Solves the (generalized) angular Poisson equation with *this as source.
int get_dzpuis() const
Returns dzpuis.
Scalar sol_elliptic_only_zec(Param_elliptic ¶ms, double val) const
Resolution of a general elliptic equation solving in the compactified domain and putting a given valu...
Tbl & set(int l)
Read/write of the value in a given domain (configuration space).
double val_grid_point(int l, int k, int j, int i) const
Returns the value of the field at a specified grid point.
virtual void set_etat_nondef()
Sets the logical state to ETATNONDEF (undefined).
friend Tbl min(const Scalar &)
Minimum values of a Scalar in each domain.
Cmp tan(const Cmp &)
Tangent.
Scalar * p_lapang
Pointer on the Laplacian of *this (0x0 if not up to date)
friend Scalar pow(const Scalar &, int)
Power .
void smooth_decay(int k, int n)
Performs a matching of the last non-compactified shell with a decaying function where is the spher...
void import_anti(int nzet, const Scalar &ci)
Assignment to another Scalar defined on a different mapping, when the two mappings have anti-aligned ...
Base class for coordinate mappings.
friend Scalar cos(const Scalar &)
Cosine.
void div_r()
Division by r everywhere; dzpuis is not changed.
friend Tbl diffrel(const Scalar &a, const Scalar &b)
Relative difference between two Scalar (norme version).
const Scalar & stdsdp() const
Returns of *this .
void operator*=(const Scalar &)
*= Scalar
friend Scalar operator*(const Scalar &, const Scalar &)
Scalar * Scalar.
Tbl * p_integ
Pointer on the space integral of *this (values in each domain) (0x0 if not up to date)
Coefficients storage for the multi-domain spectral method.
Vectorial bases (triads) with respect to which the tensorial components are defined.
friend Scalar operator|(const Scalar &, const Scalar &)
Scalar * Scalar with desaliasing only in r.
Scalar * p_dsdradial
Pointer on of *this
void mult_cost()
Multiplication by .
Cmp sin(const Cmp &)
Sine.
Scalar sol_elliptic_boundary(Param_elliptic ¶ms, const Mtbl_cf &bound, double fact_dir, double fact_neu) const
Resolution of a general elliptic equation, putting zero at infinity and with inner boundary condition...
virtual void del_deriv() const
Logical destructor of the derivatives.
void del_t()
Logical destructor.