141 void pasprevu_r(
const int*,
const int*,
double*,
const int*,
double*) ;
142 void pasprevu_t(
const int*,
const int*,
double*,
const int*,
double*) ;
143 void pasprevu_p(
const int* ,
const int* ,
double* ) ;
145 void base_non_def_r(
const int*,
const int*,
double*,
const int*,
double*) ;
146 void base_non_def_t(
const int*,
const int*,
double*,
const int*,
double*) ;
147 void base_non_def_p(
const int* ,
const int* ,
double* ) ;
154 static void (*coef_r[
MAX_BASE])(
const int*,
const int*,
double*,
const int*,
double*) ;
155 static void (*coef_t[
MAX_BASE])(
const int*,
const int*,
double*,
const int*,
double*) ;
156 static void (*coef_p[
MAX_BASE_2])(
const int* ,
const int* ,
double* ) ;
157 static int premier_appel = 1 ;
164 coef_r[i] = pasprevu_r ;
165 coef_t[i] = pasprevu_t ;
167 coef_p[i/2] = pasprevu_p ;
171 coef_r[
NONDEF] = base_non_def_r ;
185 coef_t[
NONDEF] = base_non_def_t ;
208 coef_p[
NONDEF] = base_non_def_p ;
221 if (
etat == ETATZERO) {
226 assert(
etat != ETATNONDEF) ;
240 for (
int l=0; l<nz; l++) {
243 const Tbl* f = (
c->
t)[l] ;
273 int nrnt_c = nr_c * nt_c ;
275 for (
int i=0; i<np ; i++) {
276 for (
int j=0; j<nt ; j++) {
277 for (
int k=0; k<nr ; k++) {
278 int index = nrnt * i + nr * j + k ;
279 int index_c = nrnt_c * i + nr_c * j + k ;
280 (cf->
t)[index_c] = (f->
t)[index] ;
301 coef_p[base_p]( deg, dim, (cf->
t) ) ;
304 for (
int i=nrnt; i<3*nrnt; i++) {
321 pasprevu_t(deg, dim, (cf->
t), dim, (cf->
t) ) ;
323 coef_t[base_t](deg, dim, (cf->
t), dim, (cf->
t)) ;
341 coef_r[base_r](deg, dim, (cf->
t), dim, (cf->
t)) ;
352 void pasprevu_r(
const int*,
const int*,
double*,
const int*,
double*) {
353 cout <<
"Valeur::coef: the required expansion basis in r " << endl ;
354 cout <<
" is not implemented !" << endl ;
358 void pasprevu_t(
const int*,
const int*,
double*,
const int*,
double*) {
359 cout <<
"Valeur::coef: the required expansion basis in theta " << endl ;
360 cout <<
" is not implemented !" << endl ;
364 void pasprevu_p(
const int*,
const int*,
double*) {
365 cout <<
"Valeur::coef: the required expansion basis in phi " << endl ;
366 cout <<
" is not implemented !" << endl ;
370 void base_non_def_r(
const int*,
const int*,
double*,
const int*,
double*) {
371 cout <<
"Valeur::coef: the expansion basis in r is undefined !" << endl ;
375 void base_non_def_t(
const int*,
const int*,
double*,
const int*,
double*) {
376 cout <<
"Valeur::coef: the expansion basis in theta is undefined !" << endl ;
380 void base_non_def_p(
const int*,
const int*,
double*) {
381 cout <<
"Valeur::coef: the expansion basis in phi is undefined !" << endl ;
#define T_LEG
fct. de Legendre associees
#define MAX_BASE_2
Smaller maximum bases used for phi (and higher dimensions for now)
Mtbl_cf * c_cf
Coefficients of the spectral expansion of the function.
#define T_LEG_MP
fct. de Legendre associees avec m pair
#define P_COSSIN
dev. standart
void coef() const
Computes the coeffcients of *this.
Cmp sqrt(const Cmp &)
Square root.
#define T_LEG_PI
fct. de Legendre associees paires avec m impair
#define TRA_P
Translation en Phi, used for a bitwise shift (in hex)
#define R_CHEBPI_I
Cheb. pair-impair suivant l impair pour l=0.
#define T_LEG_MI
fct. de Legendre associees avec m impair
#define TRA_T
Translation en Theta, used for a bitwise shift (in hex)
#define MSQ_P
Extraction de l'info sur Phi.
#define T_COS
dev. cos seulement
#define T_COSSIN_SP
sin pair-cos impair alternes, sin pour m=0
int get_etat() const
Gives the logical state.
#define R_LEGP
base de Legendre paire (rare) seulement
#define R_LEGI
base de Legendre impaire (rare) seulement
#define R_JACO02
base de Jacobi(0,2) ordinaire (finjac)
#define T_SIN
dev. sin seulement
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
#define TRA_R
Translation en R, used for a bitwise shift (in hex)
int get_colloc_r(int l) const
Returns the type of collocation points used in domain no.
const Mg3d * mg
Multi-grid Mgd3 on which this is defined.
#define T_LEG_I
fct. de Legendre associees impaires
#define T_COS_I
dev. cos seulement, harmoniques impaires
#define R_CHEBI
base de Cheb. impaire (rare) seulement
#define R_CHEBP
base de Cheb. paire (rare) seulement
#define T_COS_P
dev. cos seulement, harmoniques paires
#define MSQ_T
Extraction de l'info sur Theta.
#define T_COSSIN_C
dev. cos-sin alternes, cos pour m=0
Base_val base
Bases on which the spectral expansion is performed.
double * t
The array of double.
Mtbl * c
Values of the function at the points of the multi-grid.
int * b
Array (size: nzone ) of the spectral basis in each domain.
#define MSQ_R
Extraction de l'info sur R.
#define T_SIN_P
dev. sin seulement, harmoniques paires
int get_nzone() const
Returns the number of domains.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
int get_dim(int i) const
Gives the i-th dimension (ie dim.dim[i])
#define T_COSSIN_SI
sin impair-cos pair alternes, sin pour m=0
#define T_LEG_IP
fct. de Legendre associees impaires avec m pair
#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.
void set_etat_zero()
Sets the logical state to ETATZERO (zero).
#define T_LEG_P
fct. de Legendre associees paires
#define R_CHEBPI_P
Cheb. pair-impair suivant l pair pour l=0.
#define NONDEF
base inconnue
#define T_COSSIN_CI
cos impair-sin pair alternes, cos pour m=0
bool admissible_fft(int)
Checks whether or not a given number of degrees of freedom is compatible with the FFT transform...
Coefficients storage for the multi-domain spectral method.
int etat
Logical state (ETATNONDEF , ETATQCQ or ETATZERO ).
#define P_COSSIN_I
dev. sur Phi = 2*phi, freq. impaires
#define R_CHEBU
base de Chebychev ordinaire (fin), dev. en 1/r
#define P_COSSIN_P
dev. sur Phi = 2*phi, freq. paires
#define T_LEG_II
fct. de Legendre associees impaires avec m impair
Tbl ** t
Array (size nzone ) of pointers on the Tbl 's.
#define T_COSSIN_CP
cos pair-sin impair alternes, cos pour m=0
#define MAX_BASE
Nombre max. de bases differentes.
#define T_SIN_I
dev. sin seulement, harmoniques impaires
Tbl ** t
Array (size nzone ) of pointers on the Tbl 's which contain the spectral coefficients in each domain...
#define T_LEG_PP
fct. de Legendre associees paires avec m pair
#define T_COSSIN_S
dev. cos-sin alternes, sin pour m=0
#define R_LEG
base de Legendre ordinaire (fin)
#define R_CHEB
base de Chebychev ordinaire (fin)