28char map_af_primr_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Map/map_af_primr.C,v 1.7 2014/10/13 08:53:03 j_novak Exp $" ;
66void _primr_pas_prevu(
const Tbl&,
int,
const Tbl&, Tbl&,
int&, Tbl&) ;
67void _primr_r_cheb(
const Tbl&,
int,
const Tbl&, Tbl&,
int&, Tbl&) ;
68void _primr_r_chebp(
const Tbl&,
int,
const Tbl&, Tbl&,
int&, Tbl&) ;
69void _primr_r_chebi(
const Tbl&,
int,
const Tbl&, Tbl&,
int&, Tbl&) ;
70void _primr_r_chebpim_p(
const Tbl&,
int,
const Tbl&, Tbl&,
int&, Tbl&) ;
71void _primr_r_chebpim_i(
const Tbl&,
int,
const Tbl&, Tbl&,
int&, Tbl&) ;
72void _primr_r_jaco02(
const Tbl&,
int,
const Tbl&, Tbl&,
int&, Tbl&) ;
76 static void (*prim_domain[
MAX_BASE])(
const Tbl&,
int bin,
const Tbl&,
78 static bool first_call = true ;
84 for (
int i=0 ; i<
MAX_BASE ; i++) prim_domain[i] = _primr_pas_prevu ;
100 assert(uu.
get_etat() != ETATNONDEF) ;
119 for (
int l=1; l<nz; l++) {
129 assert(cuu.
t != 0x0) ;
143 Tbl val_rmin(np+2,nt) ;
145 Tbl val_rmax(np+2,nt) ;
149 int lmax = (
mg->
get_type_r(nzm1) == UNSURR) ? nz-2 : nzm1 ;
151 for (
int l=0; l<=lmax; l++) {
152 assert(cuu.
t[l] != 0x0) ;
153 assert(cprim.
t[l] != 0x0) ;
154 const Tbl& cfuu = *(cuu.
t[l]) ;
155 Tbl& cfprim = *(cprim.
t[l]) ;
157 int buu_dom = buu.
get_b(l) ;
160 prim_domain[base_r](cfuu, buu_dom, val_rmin, cfprim, bprim.
b[l],
170 val_rmin = - val_rmin ;
171 const Tbl& cfuu = *(cuu.
t[nzm1]) ;
172 Tbl& cfprim = *(cprim.
t[nzm1]) ;
174 int buu_dom = buu.
get_b(nzm1) ;
178 prim_domain[base_r](cfuu, buu_dom, val_rmin, cfprim, bprim.
b[nzm1],
181 cfprim *= -
alpha[nzm1] ;
185 for (
int k=0; k<np; k++)
186 for(
int j=0; j<nt; j++)
193 for (
int l=0; l<nz; l++)
194 for (
int k=0; k<np; k++)
195 for(
int j=0; j<nt; j++)
197 vprim.
set(l, k, j, i) -= val_rmax(k,j) ;
Bases of the spectral expansions.
int get_b(int l) const
Returns the code for the expansion basis in domain no. l.
int * b
Array (size: nzone ) of the spectral basis in each domain.
virtual void primr(const Scalar &uu, Scalar &resu, bool null_infty) const
Computes the radial primitive which vanishes for .
double * alpha
Array (size: mg->nzone ) of the values of in each domain.
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
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_nzone() const
Returns the number of domains.
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
int get_type_r(int l) const
Returns the type of sampling in the radial direction in domain no.
Coefficients storage for the multi-domain spectral method.
Base_val base
Bases of the spectral expansions.
Tbl ** t
Array (size nzone ) of pointers on the Tbl 's which contain the spectral coefficients in each domain.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
double val_out_bound_jk(int l, int j, int k) const
Computes the angular coefficient of index j,k of the field represented by *this at by means of the s...
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).
void set_etat_zero()
Sets the logical state to ETATZERO (zero).
double & set(int i)
Read/write of a particular element (index i) (1D case)
Values and coefficients of a (real-value) function.
void set_etat_cf_qcq()
Sets the logical state to ETATQCQ (ordinary state) for values in the configuration space (Mtbl_cf c_c...
const Base_val & get_base() const
Return the bases for spectral expansions (member base )
void set_base(const Base_val &)
Sets the bases for spectral expansions (member base )
Tbl & set(int l)
Read/write of the value in a given domain (configuration space).
Mtbl_cf * c_cf
Coefficients of the spectral expansion of the function.
void coef() const
Computes the coeffcients of *this.
#define MAX_BASE
Nombre max. de bases differentes.
#define R_CHEBU
base de Chebychev ordinaire (fin), dev. en 1/r
#define R_JACO02
base de Jacobi(0,2) ordinaire (finjac)
#define R_CHEBI
base de Cheb. impaire (rare) seulement
#define MSQ_R
Extraction de l'info sur R.
#define R_CHEBPIM_I
Cheb. pair-impair suivant m, impair pour m=0.
#define R_CHEBPIM_P
Cheb. pair-impair suivant m, pair pour m=0.
#define TRA_R
Translation en R, used for a bitwise shift (in hex)
#define R_CHEB
base de Chebychev ordinaire (fin)
#define R_CHEBP
base de Cheb. paire (rare) seulement
const Map & get_mp() const
Returns the mapping.