26 char scalar_exp_filter_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Tensor/Scalar/scalar_exp_filter.C,v 1.5 2014/10/13 08:53:46 j_novak Exp $" ;
68 assert(
etat != ETATNONDEF) ;
69 if (
etat == ETATZERO) return ;
73 double alp =
log(
pow(10., alpha)) ;
75 for (
int lz=lzmin; lz<=lzmax; lz++) {
76 if ((*
va.
c_cf)(lz).get_etat() == ETATQCQ)
77 for (
int k=0; k<mgrid.
get_np(lz); k++)
78 for (
int j=0; j<mgrid.
get_nt(lz); j++) {
79 int nr = mgrid.
get_nr(lz) ;
80 for (
int i=0; i<nr; i++) {
81 double eta = double(i)/double(nr) ;
104 assert(
etat != ETATNONDEF) ;
105 if (
etat == ETATZERO) return ;
110 for (
int lz=lzmin; lz<=lzmax; lz++) {
111 if ((*
va.
c_cf)(lz).get_etat() == ETATQCQ)
112 for (
int k=0; k<mgrid.
get_np(lz); k++)
113 for (
int j=0; j<mgrid.
get_nt(lz); j++) {
114 int nr = mgrid.
get_nr(lz) ;
115 for (
int i=0; i<nr; i++) {
116 double eta = double(i)/double(nr) ;
150 assert(
etat != ETATNONDEF) ;
151 if (
etat == ETATZERO) return ;
152 double alp =
log(
pow(10., alpha)) ;
156 int l_q, m_q, base_r ;
158 for (
int lz=lzmin; lz<=lzmax; lz++)
159 if ((*
va.
c_cf)(lz).get_etat() == ETATQCQ) {
160 int np = mgrid.
get_np(lz) ;
161 int nt = mgrid.
get_nt(lz) ;
162 int nr = mgrid.
get_nr(lz) ;
164 for (
int k=0; k<np; k++)
165 for (
int j=0; j<nt; j++) {
167 if (nullite_plm(j, nt, k, np, base) == 1 ) {
168 double eta = double(l_q) / double(lmax) ;
169 double sigma =
exp(alp*
pow(eta, 2*p)) ;
170 for (
int i=0; i<nr; i++)
Mtbl_cf * c_cf
Coefficients of the spectral expansion of the function.
int give_lmax(const Mg3d &mgrid, int lz) const
Returns the highest multipole for a given grid.
void ylm_i()
Inverse of ylm()
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
void coef() const
Computes the coeffcients of *this.
void give_quant_numbers(int, int, int, int &, int &, int &) const
Computes the various quantum numbers and 1d radial base.
friend Scalar exp(const Scalar &)
Exponential.
Tbl & set(int l)
Read/write of the Tbl containing the coefficients in a given domain.
void ylm()
Computes the coefficients of *this.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
Tensor field of valence 0 (or component of a tensorial field).
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.
void exp_filter_ylm_all_domains(Scalar &ss, int p, double alpha=-16.)
Applies an exponential filter in angular directions in all domains.
friend Scalar pow(const Scalar &, int)
Power .
virtual void del_deriv() const
Logical destructor of the derivatives.
Base_val base
Bases on which the spectral expansion is performed.
Mtbl * c
Values of the function at the points of the multi-grid.
int get_nzone() const
Returns the number of domains.
Valeur va
The numerical value of the Scalar.
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 log(const Scalar &)
Neperian logarithm.
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
Bases of the spectral expansions.
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.
void exp_filter_r_all_domains(Scalar &ss, int p, double alpha=-16.)
Applies an exponential filter in radial direction in all domains.
int etat
The logical state ETATNONDEF (undefined), ETATZERO (null), ETATUN (one), or ETATQCQ (ordinary)...
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
void del_deriv()
Logical destructor of the derivatives.
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.
const Map *const mp
Mapping on which the numerical values at the grid points are defined.
const Map & get_mp() const
Returns the mapping.