29char grille3d_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Grille3d/grille3d.C,v 1.10 2014/10/13 08:52:59 j_novak Exp $" ;
123 int typep,
int baser)
124 : nr(nrs), nt(nts), np(nps), type_r(typer), type_t(typet),
125 type_p(typep), base_r(baser)
136 tet =
new double[
nt] ;
137 double fac_tet = M_PI ;
138 if (
type_t == SYM) fac_tet *= 0.5 ;
142 fac_tet /= double(
nt-1) ;
143 for (
int i=0; i<
nt; i++)
144 tet[i] =
double(i)*fac_tet ;
146 cout <<
"Grille3d: unknown type in theta!" << endl ;
152 phi =
new double[
np] ;
153 double fac_phi = M_PI / double(
np) ;
154 if (
type_p == NONSYM) fac_phi *= 2. ;
155 for (
int i=0; i<
np; i++)
156 phi[i] =
double(i)*fac_phi ;
158 cout <<
"Grille3d: unknown type in phi!" << endl ;
181 xx = M_PI/double(2*(
nr-1)) ;
182 for (
int i=0; i<
nr; i++)
183 x[i] =
sin(xx*
double(i)) ;
185 case FIN:
case UNSURR :
186 xx = M_PI/double(
nr-1) ;
187 for (
int i=0 ; i<
nr ; i++)
188 x[i] = -
cos(xx*
double(i)) ;
191 cout <<
"Grille3d::compute_radial_grid : " << endl ;
192 cout <<
"Unknown type of sampling for the Chebyshev basis!" << endl ;
199 legendre_collocation_points(
nr,
x) ;
204 legendre_collocation_points(2*
nr - 1, full_x.
t) ;
205 for (
int i=0; i<
nr; i++)
206 x[i] = full_x(i+
nr-1) ;
210 cout <<
"Grille3d::compute_radial_grid : " << endl ;
211 cout <<
"Unknown type of sampling for the Legendre basis!" << endl ;
216 double* yy = pointsgausslobatto(
nr-1);
217 for (
int i=0 ; i<
nr ; i++) {
224 cout <<
"Grille3d::compute_radial_grid : " << endl ;
225 cout <<
"Unknown type of basis!" << endl ;
const int nt
Number of points in .
double * x
Array of values of at the nr collocation points.
double * phi
Array of values of at the np collocation points.
int type_p
Type of sampling in (SYM,NONSYM)
double * tet
Array of values of at the nt collocation points.
virtual ~Grille3d()
Destructor.
int base_r
Type of radial spectral basis (BASE_CHEB, BASE_LEG, BASE_JAC02 )
int type_t
Type of sampling in (SYM,NONSYM)
void compute_radial_grid()
Computes the collocation point coordinates in the radial direction.
const int np
Number of points in .
Grille3d(int n_r, int n_t, int n_p, int typer, int typet, int typep, int baser)
Constructor.
const int nr
Number of points in r ( )
int type_r
Type of sampling in r ( ) (RARE,FIN,UNSURR )
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
double * t
The array of double.
Cmp sin(const Cmp &)
Sine.
Cmp cos(const Cmp &)
Cosine.