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 ;
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 ;
307ostream& 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 ;
Bases of the spectral expansions.
Storage of array dimensions.
int * dim
Array of dimensions (size: ndim).
int ndim
Number of dimensions of the Tbl: can be 1, 2 or 3.
Base class for Godunov-type grids.
int get_type_t() const
Returns the type of symmetry in .
virtual void somme_spectrale2(const Scalar &meudon, double *t, int taille) const =0
Same as before but for the 2D case.
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,...
int get_type_p() const
Returns the type of symmetry in .
int get_fantome() const
Returns the number of hidden cells.
const Dim_tbl * get_dim_tbl() const
Returns the Dim_tbl associated with the grid.
int type_p
Type of symmetry in :
int nfantome
The number of hidden cells (same on each side)
double * zrmin
Lower boundary for z (or r ) direction
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
friend ostream & operator<<(ostream &, const Grille_val &)
Display.
int get_dim(const int i) const
Returns the size (without hidden cells)
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...
virtual void sauve(FILE *) const
Save in a file.
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...
Dim_tbl dim
The dimensions of the grid.
Tbl * zr
Arrays containing the values of coordinate z (or r) on the nodes
virtual Tbl interpol2(const Tbl &fdep, const Tbl &rarr, const Tbl &tetarr, const int type_inter) const =0
Performs 2D interpolation.
double get_zr(const int i) const
Read-only of a particular value of the coordinate z (or r ) at the nodes.
virtual ~Grille_val()
Destructor.
virtual Tbl interpol3(const Tbl &fdep, const Tbl &rarr, const Tbl &tetarr, const Tbl &phiarr, const int type_inter) const =0
Performs 3D interpolation.
Tbl * fait_grille1D(const double rmin, const double rmax, const int n)
Auxilliary function used to allocate memory and construct 1D grid.
int type_t
Type of symmetry in :
void operator=(const Grille_val &)
Assignment to another Grille_val.
Tbl * zri
Arrays containing the values of coordinate z (or r) on the interfaces.
int get_ndim() const
Returns the number of dimensions.
double get_zri(const int i) const
Read-only of a particular value of the coordinate z (or r ) at the interfaces.
Tbl interpol1(const Tbl &rdep, const Tbl &rarr, const Tbl &fdep, int flag, const int type_inter) const
Performs 1D interpolation.
double * zrmax
Higher boundary for z (or r ) direction
virtual void somme_spectrale3(const Scalar &meudon, double *t, int taille) const =0
Same as before but for the 3D case.
Class for cartesian Godunov-type grids.
double * xmax
Higher boundary for x dimension.
double * xmin
Lower boundary for x dimension.
double get_yi(const int i) const
Read-only of a particular value of the coordinate y at the interfaces.
double get_x(const int i) const
Read-only of a particular value of the coordinate x at the nodes.
double get_ymax() const
Returns the higher boundary for x.
double * ymin
Lower boundary for y dimension.
virtual void sauve(FILE *) const
Save in a file.
double get_xmax() const
Returns the higher boundary for x.
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...
double get_y(const int i) const
Read-only of a particular value of the coordinate y at the nodes.
double * ymax
Higher boundary for y dimension.
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).
double get_ymin() const
Returns the lower boundary for y.
virtual Tbl interpol3(const Tbl &fdep, const Tbl &rarr, const Tbl &tetarr, const Tbl &phiarr, const int type_inter) const
Performs 3D interpolation.
Tbl * y
Arrays containing the values of coordinate y on the nodes.
virtual void somme_spectrale3(const Scalar &meudon, double *t, int taille) const
Same as before but for the 3D case.
void operator=(const Gval_cart &)
Assignment to another Gval_cart.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
double get_xi(const int i) const
Read-only of a particular value of the coordinate x at the interfaces.
virtual Tbl interpol2(const Tbl &fdep, const Tbl &rarr, const Tbl &tetarr, const int type_inter) const
Performs 2D interpolation.
double get_xmin() const
Returns the lower boundary for x.
Tbl * xi
Arrays containing the values of coordinate x on the interfaces.
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...
virtual ~Gval_cart()
Destructor.
Tbl * x
Arrays containing the values of coordinate x on the nodes.
Tbl * yi
Arrays containing the values of coordinate y on the interfaces.
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,...
Class for spherical Godunov-type grids.
virtual void somme_spectrale3(const Scalar &meudon, double *t, int taille) const
Same as before but for the 3D case.
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...
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_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 operator=(const Gval_spher &)
Assignment to another Gval_spher.
double get_teti(const int i) const
Read-only of a particular value of coordinate at the interfaces.
Tbl * phi
Arrays containing the values of coordinate on the nodes.
Tbl * teti
Arrays containing the values of coordinate on the interfaces.
double get_tet(const int i) const
Read-only of a particular value of the coordinate at the nodes.
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.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
double * somme_spectrale2ri(const Scalar &meudon) const
Same as before but at radial grid interfaces.
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_phii(const int i) const
Read-only of a particular value of coordinate at the interfaces.
Tbl * phii
Arrays containing the values of coordinate on the interfaces.
double * somme_spectrale2ti(const Scalar &meudon) const
Same as before but at angular grid interfaces.
virtual Tbl interpol2(const Tbl &fdep, const Tbl &rarr, const Tbl &tetarr, const int type_inter) const
Performs 2D interpolation.
virtual ~Gval_spher()
Destructor.
Tbl * tet
Arrays containing the values of coordinate on the nodes.
Base class for coordinate mappings.
Tensor field of valence 0 (or component of a tensorial field).
Finite-difference array intended to store field values.
double * t
The array of double.