30char mtbl_cf_val_point_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Mtbl_cf/mtbl_cf_val_point.C,v 1.15 2014/10/13 08:53:09 j_novak Exp $" ;
119 (
double*,
const int,
const int,
const int,
const double,
double*) ;
121 (
double*,
const int,
const int,
const double,
double*) ;
123 (
double*,
const int,
const double,
double*) ;
124static int premier_appel = 1 ;
128 if (premier_appel == 1) {
134 som_phi[i/2] = som_phi_pas_prevu ;
136 som_tet[i] = som_tet_pas_prevu ;
137 som_r[i] = som_r_pas_prevu ;
173 assert (
etat != ETATNONDEF) ;
178 if (
etat == ETATZERO ) {
184 int np =
mg->get_np(l) ;
185 int nt =
mg->get_nt(l) ;
186 int nr =
mg->get_nr(l) ;
199 assert(
etat == ETATQCQ) ;
202 if (tbcf->
get_etat() == ETATZERO ) {
208 assert(tbcf->
get_etat() == ETATQCQ) ;
210 double* cf = tbcf->
t ;
213 double* trp =
new double [np+2] ;
214 double* trtp =
new double [(np+2)*nt] ;
221 som_tet[base_t](cf, nt, np, theta, trp) ;
228 som_r[base_r](cf, nr, nt, np,
x, trtp) ;
229 som_tet[base_t](trtp, nt, np, theta, trp) ;
239 som_phi[base_p](trp, np,
phi, &resu) ;
262 (
double*,
const int,
const int,
const int,
const double,
double*) ;
263static int premier_appel = 1 ;
267 if (premier_appel == 1) {
272 som_r[i] = som_r_pas_prevu ;
287 assert (
etat != ETATNONDEF) ;
292 if (
etat == ETATZERO ) {
298 int np =
mg->get_np(l) ;
299 int nt =
mg->get_nt(l) ;
300 int nr =
mg->get_nr(l) ;
310 Tbl tab_phi =
base.phi_functions(l, np) ;
311 Tbl tab_theta =
base.theta_functions(l, nt) ;
320 assert(
etat == ETATQCQ) ;
323 if (tbcf->
get_etat() == ETATZERO ) {
329 assert(tbcf->
get_etat() == ETATQCQ) ;
331 double* cf = tbcf->
t ;
334 double* coef_tp =
new double [(np+2)*nt] ;
340 som_r[base_r](cf, nr, nt, np,
x, coef_tp) ;
345 double* pi = coef_tp ;
350 for (
int j=0 ; j<nt ; j++) {
351 somt += (*pi) * tab_theta(0, j, j0) ;
354 resu = somt * tab_phi(0, k0) ;
374 for (
int k=2 ; k<np+1 ; k++) {
376 for (
int j=0 ; j<nt ; j++) {
377 somt += (*pi) * tab_theta(0, j, j0) ;
380 resu += somt * tab_phi(k, k0) ;
392 for (
int k=2 ; k<np+1 ; k++) {
393 int m_par = (k/2)%2 ;
395 for (
int j=0 ; j<nt ; j++) {
396 somt += (*pi) * tab_theta(m_par, j, j0) ;
399 resu += somt * tab_phi(k, k0) ;
405 cout <<
"Mtbl_cf::val_point_jk: unknown theta basis ! " << endl ;
438 int nr =
mg->get_nr(l) ;
440 for (
int i=0; i<nr; i++)
441 resu +=
operator()(l, k0, j0, i) ;
460 int nr =
mg->get_nr(l) ;
463 for (
int i=0; i<nr; i++) {
double val_point_jk(int l, double x, int j, int k) const
Computes the value of the field represented by *this at an arbitrary point in , but collocation point...
Base_val base
Bases of the spectral expansions.
const Tbl & operator()(int l) const
Read-only of the Tbl containing the coefficients in a given domain.
const Mg3d * mg
Pointer on the multi-grid Mgd3 on which this is defined.
int etat
Logical state (ETATNONDEF , ETATQCQ or ETATZERO ).
Tbl ** t
Array (size nzone ) of pointers on the Tbl 's which contain the spectral coefficients in each domain.
double val_point(int l, double x, double theta, double phi) const
Computes the value of the field represented by *this at an arbitrary point, by means of the spectral ...
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...
double val_in_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...
int get_etat() const
Gives the logical state.
double * t
The array of double.
#define MAX_BASE_2
Smaller maximum bases used for phi (and higher dimensions for now).
#define TRA_T
Translation en Theta, used for a bitwise shift (in hex).
#define P_COSSIN_P
dev. sur Phi = 2*phi, freq. paires
#define R_LEGP
base de Legendre paire (rare) seulement
#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 T_COSSIN_SP
sin pair-cos impair alternes, sin pour m=0
#define R_LEGI
base de Legendre impaire (rare) seulement
#define R_CHEBI
base de Cheb. impaire (rare) seulement
#define T_SIN_P
dev. sin seulement, harmoniques paires
#define MSQ_R
Extraction de l'info sur R.
#define T_COSSIN_S
dev. cos-sin alternes, sin pour m=0
#define R_CHEBPIM_I
Cheb. pair-impair suivant m, impair pour m=0.
#define T_COSSIN_SI
sin impair-cos pair alternes, sin pour m=0
#define R_CHEBPI_I
Cheb. pair-impair suivant l impair pour l=0.
#define R_LEG
base de Legendre ordinaire (fin)
#define T_COS_P
dev. cos seulement, harmoniques paires
#define T_COSSIN_CI
cos impair-sin pair alternes, cos pour m=0
#define P_COSSIN
dev. standart
#define P_COSSIN_I
dev. sur Phi = 2*phi, freq. impaires
#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 MSQ_T
Extraction de l'info sur Theta.
#define T_COSSIN_CP
cos pair-sin impair alternes, cos pour m=0
#define R_CHEB
base de Chebychev ordinaire (fin)
#define T_SIN_I
dev. sin seulement, harmoniques impaires
#define T_COS
dev. cos seulement
#define R_CHEBP
base de Cheb. paire (rare) seulement
#define MSQ_P
Extraction de l'info sur Phi.
#define T_SIN
dev. sin seulement
#define T_COS_I
dev. cos seulement, harmoniques impaires
#define T_COSSIN_C
dev. cos-sin alternes, cos pour m=0
#define TRA_P
Translation en Phi, used for a bitwise shift (in hex).
#define R_CHEBPI_P
Cheb. pair-impair suivant l pair pour l=0.
Coord phi
coordinate centered on the grid
Coord x
x coordinate centered on the grid