28 char diff_x3dsdx2_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Diff/diff_x3dsdx2.C,v 1.4 2014/10/13 08:52:51 j_novak Exp $" ;
62 void multxpun_1d(
int,
double**,
int) ;
63 void mult2_xp1_1d(
int,
double**,
int) ;
88 tab[j*max_points+i] = 0x0 ;
105 for (indice =0; indice<
max_points; indice++) {
106 if (nr_done[indice] ==
npoints) {
107 if (tab[
base*max_points + indice] != 0x0) done = true ;
110 if (nr_done[indice] == -1)
114 if (indice == max_points) {
115 cerr <<
"Diff_x3dsdx2::get_matrice() : no space left!!" <<
'\n' 116 <<
"The value of Diff.max_points must be increased..." << endl ;
124 double* vect =
new double[
npoints] ;
125 double* cres =
new double[
npoints] ;
126 for (
int i=0; i<
npoints; i++) {
130 d2sdx2_1d(npoints, &vect,
base <<
TRA_R) ;
132 mult_xm1_1d_cheb(npoints, vect, cres) ;
133 mult2_xm1_1d_cheb(npoints, cres, vect) ;
135 resu.
set(j,i) = vect[j] ;
138 multxpun_1d(npoints, &vect,
base <<
TRA_R) ;
139 mult2_xp1_1d(npoints, &vect,
base <<
TRA_R) ;
141 resu.
set(j,i) = vect[j] ;
144 multx_1d(npoints, &vect,
base <<
TRA_R) ;
145 multx2_1d(npoints, &vect,
base <<
TRA_R) ;
147 resu.
set(j,i) = vect[j] ;
153 return *tab[
base*max_points + indice] ;
158 ost <<
" x^3 d2 / dx2 " << 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)
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
void initialize()
Initializes arrays.
int base
Base in radial direction.
void operator=(const Diff &)
Assignment to another Diff.
virtual const Matrice & get_matrice() const
Returns the matrix associated with the operator.
virtual ~Diff_x3dsdx2()
Destructor.
double & set(int j, int i)
Read/write of a particuliar element.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
void operator=(const Diff_x3dsdx2 &)
Assignment to another Diff_x3dsdx2.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Class for the elementary differential operator (see the base class Diff ).
Diff_x3dsdx2(int base_r, int nr)
Standard constructor.
#define R_CHEBU
base de Chebychev ordinaire (fin), dev. en 1/r
#define MAX_BASE
Nombre max. de bases differentes.