32 #include "ope_elementary.h" 40 Matrice _sec_order_r2_mat_pas_prevu(
int,
double,
double,
double,
42 cout <<
"Sec_order_r2 : base not implemented..." << endl ;
55 Matrice _sec_order_r2_mat_r_cheb (
int n,
double alpha,
double beta,
56 double a,
double b,
double c) {
58 double echelle = beta / alpha ;
60 double* vect =
new double[n] ;
61 double* auxi =
new double[n] ;
62 double* res =
new double[n] ;
73 for (
int i=0 ; i<n ; i++) {
74 for (
int j=0 ; j<n ; j++)
78 d2sdx2_1d (n, &vect,
R_CHEB) ;
80 for (
int j=0 ; j<n ; j++)
82 multx_1d (n, &auxi,
R_CHEB) ;
83 multx_1d (n, &auxi,
R_CHEB) ;
84 for (
int j=0 ; j<n ; j++)
87 for (
int j=0 ; j<n ; j++)
89 multx_1d (n, &auxi,
R_CHEB) ;
90 for (
int j=0 ; j<n ; j++)
91 res[j] += auxi[j]*2*echelle ;
93 for (
int j=0 ; j<n ; j++)
94 res[j] += echelle*echelle*vect[j] ;
96 for (
int j=0 ; j<n ; j++)
97 dd.set(j,i) = res[j] ;
101 for (
int i=0 ; i<n ; i++) {
102 for (
int j=0 ; j<n ; j++)
106 sxdsdx_1d (n, &vect,
R_CHEB) ;
108 for (
int j=0 ; j<n ; j++)
110 multx_1d (n, &auxi,
R_CHEB) ;
111 for (
int j=0 ; j<n ; j++)
114 for (
int j=0 ; j<n ; j++)
115 res[j] += echelle*vect[j] ;
117 for (
int j=0 ; j<n ; j++)
118 df.set(j,i) = res[j] ;
122 for (
int i=0 ; i<n ; i++) {
123 for (
int j=0 ; j<n ; j++)
132 return a*dd+b*df+c*ff ;
140 static Matrice (*sec_order_r2_mat[
MAX_BASE])(int, double, double, double,
148 sec_order_r2_mat[i] = _sec_order_r2_mat_pas_prevu ;
151 sec_order_r2_mat[
R_CHEB >>
TRA_R] = _sec_order_r2_mat_r_cheb ;
double alpha
Parameter of the associated mapping.
double beta
Parameter of the associated mapping.
Matrice * ope_mat
Pointer on the matrix representation of the operator.
double a_param
The parameter a .
virtual void do_ope_mat() const
Computes the matrix of the operator.
int base_r
Radial basis of decomposition.
#define TRA_R
Translation en R, used for a bitwise shift (in hex)
double b_param
The parameter b .
int nr
Number of radial points.
double c_param
The parameter c .
#define MAX_BASE
Nombre max. de bases differentes.
#define R_CHEB
base de Chebychev ordinaire (fin)