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