77 #include "type_parite.h" 82 void phi_funct_pas_prevu(
int,
double*) ;
83 void phi_funct_cossin(
int,
double*) ;
84 void phi_funct_cossin_p(
int,
double*) ;
85 void phi_funct_cossin_i(
int,
double*) ;
94 static int nb_done = 0 ;
95 static int base_p_done[nmax] ;
96 static int np_done[nmax] ;
97 static Tbl* tab[nmax] ;
99 static void(*vbasecol[
MAX_BASE_2])(int,
double*) ;
101 static int premier_appel = 1 ;
105 if (premier_appel == 1) {
110 vbasecol[i] = phi_funct_pas_prevu ;
127 for (
int i=0; i<nb_done; i++) {
128 if ( (base_p_done[i] == base_p) && (np_done[i] == np) ) {
136 if ( nb_done >= nmax ) {
137 cout <<
"Base_val::phi_functions : nb_done >= nmax ! " << endl ;
143 tab[index] =
new Tbl( np+1, np ) ;
144 (tab[index])->set_etat_qcq() ;
146 vbasecol[base_p](np, (tab[index])->t ) ;
148 base_p_done[index] = base_p ;
149 np_done[index] = np ;
155 return *(tab[index]) ;
168 void phi_funct_pas_prevu(
int,
double*) {
170 cout <<
"Base_val::phi_functions : phi basis not implemented !" 180 void phi_funct_cossin(
int np,
double* ff) {
182 double xx = 2.*M_PI / double(np) ;
189 for (
int i = 0; i < np-1 ; i+=2 ) {
191 for (
int k = 0; k < np ; k++ ) {
193 ff[np*i + k] =
cos(m * phi) ;
194 ff[np*(i+1) + k] =
sin(m * phi) ;
198 for (
int k = 0; k < np ; k++ ) {
200 ff[np*np + k] =
cos(np/2 * phi) ;
210 void phi_funct_cossin_p(
int np,
double* ff) {
212 double xx = M_PI/double(np) ;
214 for (
int i = 0; i < np+1 ; i+=2 ) {
215 for (
int k = 0; k < np ; k++ ) {
217 ff[np*i+ k] =
cos(i * phi);
221 for (
int i = 1; i < np ; i+=2 ) {
222 for (
int k = 0; k < np ; k++ ) {
224 ff[np*i+ k] =
sin((i-1) * phi);
235 void phi_funct_cossin_i(
int np,
double* ff) {
237 double xx = M_PI/double(np) ;
239 for (
int i = 0; i < np+1 ; i+=2 ) {
240 for (
int k = 0; k < np ; k++ ) {
242 ff[np*i+ k] =
sin(i * phi);
246 for (
int i = 1; i < np ; i+=2 ) {
247 for (
int k = 0; k < np ; k++ ) {
249 ff[np*i+ k] =
cos((i-1) * phi);
#define MAX_BASE_2
Smaller maximum bases used for phi (and higher dimensions for now)
#define P_COSSIN
dev. standart
#define TRA_P
Translation en Phi, used for a bitwise shift (in hex)
#define MSQ_P
Extraction de l'info sur Phi.
Cmp cos(const Cmp &)
Cosine.
int * b
Array (size: nzone ) of the spectral basis in each domain.
const Tbl & phi_functions(int l, int np) const
Values of the phi basis functions at the phi collocation points.
Cmp sin(const Cmp &)
Sine.
#define P_COSSIN_I
dev. sur Phi = 2*phi, freq. impaires
#define P_COSSIN_P
dev. sur Phi = 2*phi, freq. paires