28 char diff_mx_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Diff/diff_mx.C,v 1.4 2014/10/13 08:52:50 j_novak Exp $" ;
83 tab[j*max_points+i] = 0x0 ;
100 for (indice =0; indice<
max_points; indice++) {
101 if (nr_done[indice] ==
npoints) {
102 if (tab[
base*max_points + indice] != 0x0) done = true ;
105 if (nr_done[indice] == -1)
109 if (indice == max_points) {
110 cerr <<
"Diff_mx::get_matrice() : no space left!!" <<
'\n' 111 <<
"The value of Diff.max_points must be increased..." << endl ;
119 double* vect =
new double[
npoints] ;
120 double* cres =
new double[
npoints] ;
121 for (
int i=0; i<
npoints; i++) {
126 mult_xm1_1d_cheb(npoints, vect, cres) ;
128 resu.
set(j,i) = cres[j] ;
131 multxpun_1d(npoints, &vect,
base <<
TRA_R) ;
133 resu.
set(j,i) = vect[j] ;
136 multx_1d(npoints, &vect,
base <<
TRA_R) ;
138 resu.
set(j,i) = vect[j] ;
144 return *tab[
base*max_points + indice] ;
149 ost <<
" Multiplication by x " << endl ;
Base (abstract) class for 1D spectral differential operators in one domain.
static const int max_points
Maximal number of matrices stored per base.
Class for the elementary differential operator multiplication by (see the base class Diff )...
#define R_JACO02
base de Jacobi(0,2) ordinaire (finjac)
int npoints
Number of coefficients.
#define TRA_R
Translation en R, used for a bitwise shift (in hex)
#define R_CHEBI
base de Cheb. impaire (rare) seulement
#define R_CHEBP
base de Cheb. paire (rare) seulement
int base
Base in radial direction.
virtual const Matrice & get_matrice() const
Returns the matrix associated with the operator.
void operator=(const Diff &)
Assignment to another Diff.
virtual ~Diff_mx()
Destructor.
double & set(int j, int i)
Read/write of a particuliar element.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
void initialize()
Initializes arrays.
#define R_CHEBU
base de Chebychev ordinaire (fin), dev. en 1/r
void operator=(const Diff_mx &)
Assignment to another Diff_mx.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
#define MAX_BASE
Nombre max. de bases differentes.
Diff_mx(int base_r, int nr)
Standard constructor.