21char ope_sec_order_r2_mat_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Ope_elementary/Ope_sec_order_r2/ope_sec_order_r2_mat.C,v 1.3 2014/10/13 08:53:36 j_novak Exp $" ;
32#include "ope_elementary.h"
40Matrice _sec_order_r2_mat_pas_prevu(
int,
double,
double,
double,
42 cout <<
"Sec_order_r2 : base not implemented..." << endl ;
55Matrice _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 ;
Time evolution with partial storage (*** under development ***).
Matrice * ope_mat
Pointer on the matrix representation of the operator.
double beta
Parameter of the associated mapping.
double alpha
Parameter of the associated mapping.
int base_r
Radial basis of decomposition.
int nr
Number of radial points.
virtual void do_ope_mat() const
Computes the matrix of the operator.
double b_param
The parameter b .
double a_param
The parameter a .
double c_param
The parameter c .
#define MAX_BASE
Nombre max. de bases differentes.
#define TRA_R
Translation en R, used for a bitwise shift (in hex)
#define R_CHEB
base de Chebychev ordinaire (fin)