58 #include "type_parite.h" 69 void rotate_propre_pair (
Valeur& so,
bool sens) {
74 static int nt_courant = 0 ;
81 if (nt != nt_courant) {
92 for (
int i=0 ; i<nt ; i++)
93 for (
int j=0 ; j<nt ; j++)
96 double c_courant = 0 ;
97 for (
int j=0 ; j<nt ; j++) {
99 for (
int i=1 ; i<j ; i++)
101 ope.
set(j,j) = c_courant ;
102 c_courant -= 8*j + 2 ;
115 for (
int i=0 ; i<nt ; i++) {
116 for (
int j=0 ; j<nt ; j++)
120 for (
int j=0 ; j<nt ; j++)
121 inv->
set(j,i) = sortie(j) ;
128 for (
int k=0 ; k<so.
mg->
get_np(l) ; k++)
129 for (
int i=0 ; i<so.
mg->
get_nr(l) ; i++) {
133 for (
int j=0 ; j<nt ; j++)
134 coefs.
set(j) = (*so.
c_cf)(l,k,j,i) ;
137 for (
int j=0 ; j<nt ; j++)
142 for (
int j=0 ; j<nt ; j++)
143 for (
int jb=0 ; jb<nt ; jb++)
144 prod.
set(j) += (*inv)(j, jb) * coefs(jb) ;
148 for (
int j=0 ; j<nt ; j++)
149 for (
int jb=0 ; jb<nt ; jb++)
150 prod.
set(j) += (*passage)(j, jb) * coefs(jb) ;
153 for (
int j=0 ; j<nt ; j++)
154 so.
c_cf->
set(l,k,j,i) = prod(j) ;
171 cout <<
"Problem in rotate_propre_pair" << endl ;
185 cout <<
"Problem in rotate_propre_pair" << endl ;
199 void rotate_propre_impair (
Valeur& so,
bool sens) {
203 static int nt_courant = 0 ;
204 static Matrice* passage = 0x0 ;
210 if (nt != nt_courant) {
221 for (
int i=0 ; i<nt ; i++)
222 for (
int j=0 ; j<nt ; j++)
225 double c_courant = 0 ;
226 for (
int j=0 ; j<nt ; j++) {
227 for (
int i=0 ; i<j ; i++)
228 ope.
set(i,j) = 2+4*j ;
229 ope.
set(j,j) = c_courant ;
230 c_courant -= 8*j + 6 ;
243 for (
int i=0 ; i<nt ; i++) {
244 for (
int j=0 ; j<nt ; j++)
248 for (
int j=0 ; j<nt ; j++)
249 inv->
set(j,i) = sortie(j) ;
257 for (
int k=0 ; k<so.
mg->
get_np(l) ; k++)
258 for (
int i=0 ; i<so.
mg->
get_nr(l) ; i++) {
262 for (
int j=0 ; j<nt ; j++)
263 coefs.
set(j) = (*so.
c_cf)(l,k,j,i) ;
266 for (
int j=0 ; j<nt ; j++)
271 for (
int j=0 ; j<nt ; j++)
272 for (
int jb=0 ; jb<nt ; jb++)
273 prod.
set(j) += (*inv)(j, jb) * coefs(jb) ;
277 for (
int j=0 ; j<nt ; j++)
278 for (
int jb=0 ; jb<nt ; jb++)
279 prod.
set(j) += (*passage)(j, jb) * coefs(jb) ;
282 for (
int j=0 ; j<nt ; j++)
283 so.
c_cf->
set(l,k,j,i) = prod(j) ;
300 cout <<
"Problem in rotate_propre_impair" << endl ;
314 cout <<
"Problem in rotate_propre_impair" << endl ;
331 for (
int i=1 ; i<nz ; i++)
356 cout <<
"Unknown basis in Valeur::val_propre_1d" << endl ;
367 for (
int i=1 ; i<nz ; i++)
392 cout <<
"Unknown basis in Valeur::val_propre_1d_i" << endl ;
friend void rotate_propre_pair(Valeur &, bool)
Friend fonction.
Mtbl_cf * c_cf
Coefficients of the spectral expansion of the function.
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
void set_etat_cf_qcq()
Sets the logical state to ETATQCQ (ordinary state) for values in the configuration space (Mtbl_cf c_c...
void coef() const
Computes the coeffcients of *this.
void set_lu() const
Calculate the LU-representation, assuming the band-storage has been done.
Tbl & set(int l)
Read/write of the Tbl containing the coefficients in a given domain.
int get_base_t(int l) const
Returns the expansion basis for functions in the domain of index l (e.g.
Tbl inverse(const Tbl &sec_membre) const
Solves the linear system represented by the matrix.
double & set(int i)
Read/write of a particular element (index i) (1D case)
Values and coefficients of a (real-value) function.
int get_etat() const
Gives the logical state.
void set_base_t(int base_t)
Sets the expansion basis for functions in all domains.
#define T_CL_COS_P
CL of even cosines.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
const Mg3d * mg
Multi-grid Mgd3 on which this is defined.
#define T_COS_I
dev. cos seulement, harmoniques impaires
#define T_CL_SIN_P
CL of even sines.
#define T_COS_P
dev. cos seulement, harmoniques paires
#define T_CL_SIN_I
CL of odd sines.
Base_val base
Bases on which the spectral expansion is performed.
friend void rotate_propre_impair(Valeur &, bool)
Friend fonction.
#define T_SIN_P
dev. sin seulement, harmoniques paires
int get_nzone() const
Returns the number of domains.
void val_propre_1d()
Set the basis to the eigenvalues of .
double & set(int j, int i)
Read/write of a particuliar element.
void set_band(int up, int low) const
Calculate the band storage of *std.
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
void val_propre_1d_i()
Inverse transformation of val_propre_1d.
Bases of the spectral expansions.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Base_val base
Bases of the spectral expansions.
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
#define T_CL_COS_I
CL of odd cosines.
#define T_SIN_I
dev. sin seulement, harmoniques impaires
Matrice vect_propre() const
Returns the eigenvectors of the matrix, calculated using LAPACK.
Tbl ** t
Array (size nzone ) of pointers on the Tbl 's which contain the spectral coefficients in each domain...