23 char valeur_val_propre_1d_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Valeur/valeur_val_propre_1d.C,v 1.3 2014/10/13 08:53:51 j_novak Exp $" ;
55 #include "type_parite.h"
66 void rotate_propre_pair (
Valeur& so,
bool sens) {
71 static int nt_courant = 0 ;
78 if (nt != nt_courant) {
89 for (
int i=0 ; i<nt ; i++)
90 for (
int j=0 ; j<nt ; j++)
93 double c_courant = 0 ;
94 for (
int j=0 ; j<nt ; j++) {
96 for (
int i=1 ; i<j ; i++)
98 ope.
set(j,j) = c_courant ;
99 c_courant -= 8*j + 2 ;
112 for (
int i=0 ; i<nt ; i++) {
113 for (
int j=0 ; j<nt ; j++)
117 for (
int j=0 ; j<nt ; j++)
118 inv->
set(j,i) = sortie(j) ;
125 for (
int k=0 ; k<so.
mg->
get_np(l) ; k++)
126 for (
int i=0 ; i<so.
mg->
get_nr(l) ; i++) {
130 for (
int j=0 ; j<nt ; j++)
131 coefs.
set(j) = (*so.
c_cf)(l,k,j,i) ;
134 for (
int j=0 ; j<nt ; j++)
139 for (
int j=0 ; j<nt ; j++)
140 for (
int jb=0 ; jb<nt ; jb++)
141 prod.
set(j) += (*inv)(j, jb) * coefs(jb) ;
145 for (
int j=0 ; j<nt ; j++)
146 for (
int jb=0 ; jb<nt ; jb++)
147 prod.
set(j) += (*passage)(j, jb) * coefs(jb) ;
150 for (
int j=0 ; j<nt ; j++)
151 so.
c_cf->
set(l,k,j,i) = prod(j) ;
168 cout <<
"Problem in rotate_propre_pair" << endl ;
182 cout <<
"Problem in rotate_propre_pair" << endl ;
196 void rotate_propre_impair (
Valeur& so,
bool sens) {
200 static int nt_courant = 0 ;
201 static Matrice* passage = 0x0 ;
207 if (nt != nt_courant) {
218 for (
int i=0 ; i<nt ; i++)
219 for (
int j=0 ; j<nt ; j++)
222 double c_courant = 0 ;
223 for (
int j=0 ; j<nt ; j++) {
224 for (
int i=0 ; i<j ; i++)
225 ope.
set(i,j) = 2+4*j ;
226 ope.
set(j,j) = c_courant ;
227 c_courant -= 8*j + 6 ;
240 for (
int i=0 ; i<nt ; i++) {
241 for (
int j=0 ; j<nt ; j++)
245 for (
int j=0 ; j<nt ; j++)
246 inv->
set(j,i) = sortie(j) ;
254 for (
int k=0 ; k<so.
mg->
get_np(l) ; k++)
255 for (
int i=0 ; i<so.
mg->
get_nr(l) ; i++) {
259 for (
int j=0 ; j<nt ; j++)
260 coefs.
set(j) = (*so.
c_cf)(l,k,j,i) ;
263 for (
int j=0 ; j<nt ; j++)
268 for (
int j=0 ; j<nt ; j++)
269 for (
int jb=0 ; jb<nt ; jb++)
270 prod.
set(j) += (*inv)(j, jb) * coefs(jb) ;
274 for (
int j=0 ; j<nt ; j++)
275 for (
int jb=0 ; jb<nt ; jb++)
276 prod.
set(j) += (*passage)(j, jb) * coefs(jb) ;
279 for (
int j=0 ; j<nt ; j++)
280 so.
c_cf->
set(l,k,j,i) = prod(j) ;
297 cout <<
"Problem in rotate_propre_impair" << endl ;
311 cout <<
"Problem in rotate_propre_impair" << endl ;
328 for (
int i=1 ; i<nz ; i++)
353 cout <<
"Unknown basis in Valeur::val_propre_1d" << endl ;
364 for (
int i=1 ; i<nz ; i++)
389 cout <<
"Unknown basis in Valeur::val_propre_1d_i" << endl ;
double & set(int i)
Read/write of a particular element (index i) (1D case)
Bases of the spectral expansions.
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 set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Values and coefficients of a (real-value) function.
Matrice vect_propre() const
Returns the eigenvectors of the matrix, calculated using LAPACK.
void set_base_t(int base_t)
Sets the expansion basis for functions in all domains.
friend void rotate_propre_pair(Valeur &, bool)
Friend fonction.
Tbl ** t
Array (size nzone ) of pointers on the Tbl 's which contain the spectral coefficients in each domain.
Mtbl_cf * c_cf
Coefficients of the spectral expansion of the function.
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
#define T_CL_COS_P
CL of even cosines.
#define T_COS_I
dev. cos seulement, harmoniques impaires
Tbl & set(int l)
Read/write of the Tbl containing the coefficients in a given domain.
void coef() const
Computes the coeffcients of *this.
#define T_CL_SIN_I
CL of odd sines.
Tbl inverse(const Tbl &sec_membre) const
Solves the linear system represented by the matrix.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
#define T_CL_SIN_P
CL of even sines.
#define T_SIN_P
dev. sin seulement, harmoniques paires
#define T_COS_P
dev. cos seulement, harmoniques paires
friend void rotate_propre_impair(Valeur &, bool)
Friend fonction.
void set_band(int up, int low) const
Calculate the band storage of *std.
const Mg3d * mg
Multi-grid Mgd3 on which this is defined.
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.
void val_propre_1d_i()
Inverse transformation of val_propre_1d.
Base_val base
Bases of the spectral expansions.
void val_propre_1d()
Set the basis to the eigenvalues of .
Base_val base
Bases on which the spectral expansion is performed.
double & set(int j, int i)
Read/write of a particuliar element.
int get_etat() const
Gives the logical state.
#define T_CL_COS_I
CL of odd cosines.
int get_base_t(int l) const
Returns the expansion basis for functions in the domain of index l (e.g.
void set_lu() const
Calculate the LU-representation, assuming the band-storage has been done.
#define T_SIN_I
dev. sin seulement, harmoniques impaires