28 char diff_x3dsdx_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Diff/diff_x3dsdx.C,v 1.5 2014/10/13 08:52:51 j_novak Exp $" ;
65 void xpundsdx_1d(
int,
double**,
int) ;
66 void mult2_xp1_1d(
int,
double**,
int) ;
89 tab[j*max_points+i] = 0x0 ;
106 for (indice =0; indice<
max_points; indice++) {
107 if (nr_done[indice] ==
npoints) {
108 if (tab[
base*max_points + indice] != 0x0) done = true ;
111 if (nr_done[indice] == -1)
115 if (indice == max_points) {
116 cerr <<
"Diff_x3dsdx::get_matrice() : no space left!!" <<
'\n' 117 <<
"The value of Diff.max_points must be increased..." << endl ;
125 double* vect =
new double[
npoints] ;
126 double* cres =
new double[
npoints] ;
127 for (
int i=0; i<
npoints; i++) {
132 dsdx_1d(npoints, &vect,
R_CHEBU) ;
133 mult_xm1_1d_cheb(npoints, vect, cres) ;
134 mult2_xm1_1d_cheb(npoints, cres, vect) ;
136 resu.
set(j,i) = vect[j] ;
139 xpundsdx_1d(npoints, &vect,
base <<
TRA_R) ;
140 mult2_xp1_1d(npoints, &vect,
base <<
TRA_R) ;
142 resu.
set(j,i) = vect[j] ;
145 xdsdx_1d(npoints, &vect,
base <<
TRA_R) ;
146 multx2_1d(npoints, &vect,
base <<
TRA_R) ;
148 resu.
set(j,i) = vect[j] ;
156 return *tab[
base*max_points + indice] ;
161 ost <<
" xi^3 * d / dx " << endl ;
Base (abstract) class for 1D spectral differential operators in one domain.
static const int max_points
Maximal number of matrices stored per base.
#define R_JACO02
base de Jacobi(0,2) ordinaire (finjac)
void operator=(const Diff_x3dsdx &)
Assignment to another Diff_x3dsdx.
int npoints
Number of coefficients.
#define TRA_R
Translation en R, used for a bitwise shift (in hex)
int base
Base in radial direction.
virtual ~Diff_x3dsdx()
Destructor.
void operator=(const Diff &)
Assignment to another Diff.
double & set(int j, int i)
Read/write of a particuliar element.
Diff_x3dsdx(int base_r, int nr)
Standard constructor.
Class for the elementary differential operator (see the base class Diff ).
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
virtual const Matrice & get_matrice() const
Returns the matrix associated with the operator.
#define R_CHEBU
base de Chebychev ordinaire (fin), dev. en 1/r
void initialize()
Initializes arrays.
#define MAX_BASE
Nombre max. de bases differentes.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).