28 #ifndef __GRILLE_VAL_H_
29 #define __GRILLE_VAL_H_
135 Grille_val(
const double,
const double,
const int n1,
136 const int fantome = 2) ;
139 Grille_val(
const double,
const double,
const int n2,
const int n1,
140 const int itype_t,
const int fantome = 2) ;
143 Grille_val(
const double,
const double,
const int n3,
const int n2,
const
144 int n1,
const int itype_t,
const int itype_p,
const int
189 assert ( (i>=0) && (i<
dim.
ndim) ) ;
219 virtual void sauve(FILE *)
const ;
226 virtual ostream&
operator>>(ostream& )
const ;
240 virtual bool compatible(
const Map* mp,
const int lmax,
const int lmin=0)
254 int flag,
const int type_inter)
const ;
266 const Tbl& tetarr,
const int type_inter)
const = 0 ;
279 const Tbl& tetarr,
const Tbl& phiarr,
280 const int type_inter)
const = 0 ;
307 ostream& operator<<(ostream& ,
const Grille_val& ) ;
361 Gval_cart(
const double izmin,
const double izmax,
const int n1,
362 const int fantome = 2) ;
378 Gval_cart(
const double ixmin,
const double ixmax,
const double izmin,
379 const double izmax,
const int nx,
const int nz,
const int type_t,
380 const int fantome = 2) ;
402 Gval_cart(
const double iymin,
const double iymax,
const double ixmin,
403 const double ixmax,
const double izmin,
const double izmax,
404 const int ny,
const int nx,
const int nz,
const int itype_t,
405 const int itype_p,
const int fantome = 2);
486 virtual void sauve(FILE *)
const ;
490 virtual ostream&
operator>>(ostream& )
const ;
504 virtual bool compatible(
const Map* mp,
const int lmax,
const int lmin=0)
518 const Tbl& tetarr,
const int type_inter)
const ;
525 const Tbl& rarr,
const Tbl& tetarr,
526 const int type_inter)
const ;
539 const Tbl& tetarr,
const Tbl& phiarr,
540 const int type_inter)
const ;
605 Gval_spher(
const double irmin,
const double irmax,
const int nr,
606 const int fantome = 2) ;
618 Gval_spher(
const double irmin,
const double irmax,
const int nt,
const
619 int nr,
const int type_t,
const int fantome = 2) ;
634 Gval_spher(
const double irmin,
const double irmax,
const int np,
const
635 int nt,
const int nr,
const int itype_t,
const int itype_p,
636 const int fantome = 2);
698 virtual void sauve(FILE *)
const ;
702 virtual ostream&
operator>>(ostream& )
const ;
716 virtual bool compatible(
const Map* mp,
const int lmax,
const int lmin=0)
730 const int type_inter)
const ;
744 const Tbl& phiarr,
const int type_inter)
const ;
773 void initialize_spectral_r(
const Map& mp,
const Base_val& base,
int*& idom,
774 double*& chebnri)
const ;
775 void initialize_spectral_theta(
const Map& mp,
const Base_val& base,
776 double*& tetlj)
const ;
777 void initialize_spectral_phi(
const Map& mp,
const Base_val& base,
778 double*& expmk)
const ;
Grille_val(const double, const double, const int n1, const int fantome=2)
Standard 1D constructor (the size is to be given without hidden cells)
Tbl interpol1(const Tbl &rdep, const Tbl &rarr, const Tbl &fdep, int flag, const int type_inter) const
Performs 1D interpolation.
double get_yi(const int i) const
Read-only of a particular value of the coordinate y at the interfaces.
double * zrmin
Lower boundary for z (or r ) direction
Storage of array dimensions.
friend ostream & operator<<(ostream &, const Grille_val &)
Display.
double get_tet(const int i) const
Read-only of a particular value of the coordinate at the nodes.
int type_p
Type of symmetry in :
Bases of the spectral expansions.
Tbl * teti
Arrays containing the values of coordinate on the interfaces.
virtual bool compatible(const Map *mp, const int lmax, const int lmin=0) const =0
Checks if the spectral grid and mapping are compatible with the Grille_val caracteristics for the int...
double get_y(const int i) const
Read-only of a particular value of the coordinate y at the nodes.
virtual void sauve(FILE *) const
Save in a file.
Tbl * x
Arrays containing the values of coordinate x on the nodes.
Tbl * phii
Arrays containing the values of coordinate on the interfaces.
double * ymax
Higher boundary for y dimension.
virtual ~Gval_spher()
Destructor.
Gval_spher(const double irmin, const double irmax, const int nr, const int fantome=2)
Standard 1D constructor.
virtual void sauve(FILE *) const
Save in a file.
double get_phi(const int i) const
Read-only of a particular value of the coordinate at the nodes.
double * somme_spectrale2ri(const Scalar &meudon) const
Same as before but at radial grid interfaces.
double get_ymax() const
Returns the higher boundary for x.
int get_dim(const int i) const
Returns the size (without hidden cells)
virtual void somme_spectrale2(const Scalar &meudon, double *t, int taille) const
Makes the sommation of the spectral basis functions to know the values of the function described by t...
virtual void sauve(FILE *) const
Save in a file.
virtual Tbl interpol2(const Tbl &fdep, const Tbl &rarr, const Tbl &tetarr, const int type_inter) const =0
Performs 2D interpolation.
virtual Tbl interpol3(const Tbl &fdep, const Tbl &rarr, const Tbl &tetarr, const Tbl &phiarr, const int type_inter) const
Performs 3D interpolation.
double get_ymin() const
Returns the lower boundary for y.
virtual void somme_spectrale3(const Scalar &meudon, double *t, int taille) const =0
Same as before but for the 3D case.
double * zrmax
Higher boundary for z (or r ) direction
virtual ~Grille_val()
Destructor.
int * dim
Array of dimensions (size: ndim).
virtual Tbl interpol3(const Tbl &fdep, const Tbl &rarr, const Tbl &tetarr, const Tbl &phiarr, const int type_inter) const
Performs 3D interpolation.
void operator=(const Gval_spher &)
Assignment to another Gval_spher.
Tbl * zr
Arrays containing the values of coordinate z (or r) on the nodes
Tensor field of valence 0 (or component of a tensorial field).
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
Tbl * phi
Arrays containing the values of coordinate on the nodes.
virtual Tbl interpol3(const Tbl &fdep, const Tbl &rarr, const Tbl &tetarr, const Tbl &phiarr, const int type_inter) const =0
Performs 3D interpolation.
double * t
The array of double.
virtual bool compatible(const Map *mp, const int lmax, const int lmin=0) const
Checks if the spectral grid and mapping are compatible with the Grille_val caracteristics for the int...
double get_xi(const int i) const
Read-only of a particular value of the coordinate x at the interfaces.
double * xmin
Lower boundary for x dimension.
int type_t
Type of symmetry in :
double get_teti(const int i) const
Read-only of a particular value of coordinate at the interfaces.
Tbl * zri
Arrays containing the values of coordinate z (or r) on the interfaces.
void operator=(const Gval_cart &)
Assignment to another Gval_cart.
int get_type_p() const
Returns the type of symmetry in .
Base class for Godunov-type grids.
const Dim_tbl * get_dim_tbl() const
Returns the Dim_tbl associated with the grid.
Class for cartesian Godunov-type grids.
virtual bool compatible(const Map *mp, const int lmax, const int lmin=0) const
Checks if the spectral grid and mapping are compatible with the Grille_val caracteristics for the int...
Tbl * y
Arrays containing the values of coordinate y on the nodes.
double * xmax
Higher boundary for x dimension.
virtual Tbl interpol2(const Tbl &fdep, const Tbl &rarr, const Tbl &tetarr, const int type_inter) const
Performs 2D interpolation.
int get_ndim() const
Returns the number of dimensions.
int get_fantome() const
Returns the number of hidden cells.
virtual void somme_spectrale2(const Scalar &meudon, double *t, int taille) const
Makes the sommation of the spectral basis functions to know the values of the function described by t...
void somme_spectrale1(const Scalar &meudon, double *t, int taille) const
Makes the sommation of the spectral basis functions to know the values of the function described by t...
double get_zri(const int i) const
Read-only of a particular value of the coordinate z (or r ) at the interfaces.
Tbl * xi
Arrays containing the values of coordinate x on the interfaces.
virtual bool contenue_dans(const Map &mp, const int lmax, const int lmin=0) const =0
Checks if Grille_val is contained inside the spectral grid/mapping within the domains [lmin,...
double get_xmin() const
Returns the lower boundary for x.
virtual ~Gval_cart()
Destructor.
double get_xmax() const
Returns the higher boundary for x.
virtual bool contenue_dans(const Map &mp, const int lmax, const int lmin=0) const
Checks if Gval_cart is contained inside the spectral grid/mapping within the domains [lmin,...
int nfantome
The number of hidden cells (same on each side)
Finite-difference array intended to store field values.
virtual bool contenue_dans(const Map &mp, const int lmax, const int lmin=0) const
Checks if Gval_spher is contained inside the spectral grid/mapping within the domains [lmin,...
virtual void somme_spectrale3(const Scalar &meudon, double *t, int taille) const
Same as before but for the 3D case.
Tbl * fait_grille1D(const double rmin, const double rmax, const int n)
Auxilliary function used to allocate memory and construct 1D grid.
virtual void somme_spectrale3(const Scalar &meudon, double *t, int taille) const
Same as before but for the 3D case.
Tbl interpol2c(const Tbl &xdep, const Tbl &zdep, const Tbl &fdep, const Tbl &rarr, const Tbl &tetarr, const int type_inter) const
Same as before, but the coordinates of source points are passed explicitly (xdep, zdep).
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
Tbl * tet
Arrays containing the values of coordinate on the nodes.
int ndim
Number of dimensions of the Tbl: can be 1, 2 or 3.
double get_phii(const int i) const
Read-only of a particular value of coordinate at the interfaces.
int get_type_t() const
Returns the type of symmetry in .
double * somme_spectrale2ti(const Scalar &meudon) const
Same as before but at angular grid interfaces.
Dim_tbl dim
The dimensions of the grid.
double get_zr(const int i) const
Read-only of a particular value of the coordinate z (or r ) at the nodes.
void operator=(const Grille_val &)
Assignment to another Grille_val.
virtual Tbl interpol2(const Tbl &fdep, const Tbl &rarr, const Tbl &tetarr, const int type_inter) const
Performs 2D interpolation.
Class for spherical Godunov-type grids.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
Tbl * yi
Arrays containing the values of coordinate y on the interfaces.
double * ymin
Lower boundary for y dimension.
Base class for coordinate mappings.
double get_x(const int i) const
Read-only of a particular value of the coordinate x at the nodes.
Gval_cart(const double izmin, const double izmax, const int n1, const int fantome=2)
Standard 1D constructor.
virtual void somme_spectrale2(const Scalar &meudon, double *t, int taille) const =0
Same as before but for the 2D case.