126 int typep,
int baser)
127 : nr(nrs), nt(nts), np(nps), type_r(typer), type_t(typet),
128 type_p(typep), base_r(baser)
139 tet =
new double[
nt] ;
140 double fac_tet = M_PI ;
141 if (
type_t == SYM) fac_tet *= 0.5 ;
145 fac_tet /= double(
nt-1) ;
146 for (
int i=0; i<
nt; i++)
147 tet[i] =
double(i)*fac_tet ;
149 cout <<
"Grille3d: unknown type in theta!" << endl ;
155 phi =
new double[
np] ;
156 double fac_phi = M_PI / double(
np) ;
157 if (
type_p == NONSYM) fac_phi *= 2. ;
158 for (
int i=0; i<
np; i++)
159 phi[i] =
double(i)*fac_phi ;
161 cout <<
"Grille3d: unknown type in phi!" << endl ;
184 xx = M_PI/double(2*(
nr-1)) ;
185 for (
int i=0; i<
nr; i++)
186 x[i] =
sin(xx*
double(i)) ;
188 case FIN:
case UNSURR :
189 xx = M_PI/double(
nr-1) ;
190 for (
int i=0 ; i<
nr ; i++)
191 x[i] = -
cos(xx*
double(i)) ;
194 cout <<
"Grille3d::compute_radial_grid : " << endl ;
195 cout <<
"Unknown type of sampling for the Chebyshev basis!" << endl ;
202 legendre_collocation_points(
nr,
x) ;
207 legendre_collocation_points(2*
nr - 1, full_x.
t) ;
208 for (
int i=0; i<
nr; i++)
209 x[i] = full_x(i+
nr-1) ;
213 cout <<
"Grille3d::compute_radial_grid : " << endl ;
214 cout <<
"Unknown type of sampling for the Legendre basis!" << endl ;
219 double* yy = pointsgausslobatto(
nr-1);
220 for (
int i=0 ; i<
nr ; i++) {
227 cout <<
"Grille3d::compute_radial_grid : " << endl ;
228 cout <<
"Unknown type of basis!" << endl ;
int type_t
Type of sampling in (SYM,NONSYM)
const int nr
Number of points in r ( )
virtual ~Grille3d()
Destructor.
double * phi
Array of values of at the np collocation points.
double * x
Array of values of at the nr collocation points.
Cmp cos(const Cmp &)
Cosine.
void compute_radial_grid()
Computes the collocation point coordinates in the radial direction.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
int type_p
Type of sampling in (SYM,NONSYM)
double * t
The array of double.
double * tet
Array of values of at the nt collocation points.
const int np
Number of points in .
int base_r
Type of radial spectral basis (BASE_CHEB, BASE_LEG, BASE_JAC02 )
int type_r
Type of sampling in r ( ) (RARE,FIN,UNSURR )
Cmp sin(const Cmp &)
Sine.
Grille3d(int n_r, int n_t, int n_p, int typer, int typet, int typep, int baser)
Constructor.
const int nt
Number of points in .