Class for cartesian Godunov-type grids. More...
#include <grille_val.h>
Public Member Functions | |
| Gval_cart (const double izmin, const double izmax, const int n1, const int fantome=2) | |
| Standard 1D constructor. | |
| Gval_cart (const double ixmin, const double ixmax, const double izmin, const double izmax, const int nx, const int nz, const int type_t, const int fantome=2) | |
| Standard 2D constructor. | |
| Gval_cart (const double iymin, const double iymax, const double ixmin, const double ixmax, const double izmin, const double izmax, const int ny, const int nx, const int nz, const int itype_t, const int itype_p, const int fantome=2) | |
| Standard 3D constructor. | |
| Gval_cart (const Gval_cart &) | |
| Copy constructor. | |
| Gval_cart (FILE *) | |
Constructor from a file (see sauve(FILE*) ). | |
| virtual | ~Gval_cart () |
| Destructor. | |
| void | operator= (const Gval_cart &) |
| Assignment to another Gval_cart. | |
| double | get_x (const int i) const |
| Read-only of a particular value of the coordinate x at the nodes. | |
| double | get_y (const int i) const |
| Read-only of a particular value of the coordinate y at the nodes. | |
| double | get_xi (const int i) const |
| Read-only of a particular value of the coordinate x at the interfaces. | |
| double | get_yi (const int i) const |
| Read-only of a particular value of the coordinate y at the interfaces. | |
| double | get_xmin () const |
| Returns the lower boundary for x. | |
| double | get_xmax () const |
| Returns the higher boundary for x. | |
| double | get_ymin () const |
| Returns the lower boundary for y. | |
| double | get_ymax () const |
| Returns the higher boundary for x. | |
| virtual void | sauve (FILE *) const |
| Save in a file. | |
| 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 interpolation to be done. | |
| virtual Tbl | interpol2 (const Tbl &fdep, const Tbl &rarr, const Tbl &tetarr, const int type_inter) const |
| Performs 2D interpolation. | |
| 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 Tbl | interpol3 (const Tbl &fdep, const Tbl &rarr, const Tbl &tetarr, const Tbl &phiarr, const int type_inter) const |
| Performs 3D interpolation. | |
| 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, lmax[, if the numbers of dimensions are the same (1,2 or 3D), and if the symmetries are compatible. | |
| int | get_fantome () const |
| Returns the number of hidden cells. | |
| int | get_type_t () const |
Returns the type of symmetry in . | |
| int | get_type_p () const |
Returns the type of symmetry in . | |
| int | get_ndim () const |
| Returns the number of dimensions. | |
| int | get_dim (const int i) const |
| Returns the size (without hidden cells). | |
| const Dim_tbl * | get_dim_tbl () const |
Returns the Dim_tbl associated with the grid. | |
| double | get_zr (const int i) const |
| Read-only of a particular value of the coordinate z (or r ) at the nodes. | |
| 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. | |
Public Attributes | |
| Tbl * | x |
| Arrays containing the values of coordinate x on the nodes. | |
| Tbl * | xi |
| Arrays containing the values of coordinate x on the interfaces. | |
| Tbl * | y |
| Arrays containing the values of coordinate y on the nodes. | |
| Tbl * | yi |
| Arrays containing the values of coordinate y on the interfaces. | |
| Tbl * | zr |
| Arrays containing the values of coordinate z (or r) on the nodes. | |
| Tbl * | zri |
| Arrays containing the values of coordinate z (or r) on the interfaces. | |
Protected Member Functions | |
| virtual ostream & | operator>> (ostream &) const |
| Operator >> (virtual function called by the operator <<). | |
| 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 the Scalar meudon at the points of the 2D Godunov grid this . | |
| 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. | |
| 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 the Scalar meudon at the points of the 1D Godunov grid this . | |
Protected Attributes | |
| double * | xmin |
| Lower boundary for x dimension. | |
| double * | xmax |
| Higher boundary for x dimension. | |
| double * | ymin |
| Lower boundary for y dimension. | |
| double * | ymax |
| Higher boundary for y dimension. | |
| Dim_tbl | dim |
| The dimensions of the grid. | |
| int | nfantome |
| The number of hidden cells (same on each side). | |
| int | type_t |
Type of symmetry in :. | |
| int | type_p |
Type of symmetry in :. | |
| double * | zrmin |
| Lower boundary for z (or r ) direction. | |
| double * | zrmax |
| Higher boundary for z (or r ) direction. | |
Friends | |
| class | Tbl_val |
| Arrays defined on Godunov-type grids. | |
| ostream & | operator<< (ostream &, const Grille_val &) |
| Display. | |
Class for cartesian Godunov-type grids.
()
Can be used for 1D (only z-coordinate), 2D (x and z) or 3D (y,x and z) grids. The coordinates of the nodes are stored in Tbl 's zr (derived from Grille_val ),x and y. The coordinates of the interfaces are stored in Tbl 's zri (derived from Grille_val ),xi and yi. The standard constructors only allow for equally-spaced nodes.
Definition at line 321 of file grille_val.h.
| Gval_cart::Gval_cart | ( | const double | izmin, | |
| const double | izmax, | |||
| const int | n1, | |||
| const int | fantome = 2 | |||
| ) |
Standard 1D constructor.
| izmin | [input] lower z boundary | |
| izmax | [input] higher z boundary | |
| n1 | [input] the number of cells (without the hidden ones) | |
| fantome | [input] the number of hidden cells on each side |
Definition at line 275 of file grille_val.C.
| Gval_cart::Gval_cart | ( | const double | ixmin, | |
| const double | ixmax, | |||
| const double | izmin, | |||
| const double | izmax, | |||
| const int | nx, | |||
| const int | nz, | |||
| const int | type_t, | |||
| const int | fantome = 2 | |||
| ) |
Standard 2D constructor.
| ixmin | [input] lower x boundary | |
| ixmax | [input] higher x boundary | |
| izmin | [input] lower z boundary | |
| izmax | [input] higher z boundary | |
| nx | [input] the number of cells in x direction (without the hidden ones) | |
| nz | [input] the number of cells in z direction (without the hidden ones) | |
| type_t | [input] the type of symmetry in (SYM, NONSYM, see base class documentation) | |
| fantome | [input] the number of hidden cells on each side |
Definition at line 285 of file grille_val.C.
References Grille_val::fait_grille1D(), Grille_val::nfantome, Grille_val::type_t, x, xi, xmax, and xmin.
| Gval_cart::Gval_cart | ( | const double | iymin, | |
| const double | iymax, | |||
| const double | ixmin, | |||
| const double | ixmax, | |||
| const double | izmin, | |||
| const double | izmax, | |||
| const int | ny, | |||
| const int | nx, | |||
| const int | nz, | |||
| const int | itype_t, | |||
| const int | itype_p, | |||
| const int | fantome = 2 | |||
| ) |
Standard 3D constructor.
| iymin | [input] lower y boundary | |
| iymax | [input] higher y boundary | |
| ixmin | [input] lower x boundary | |
| ixmax | [input] higher x boundary | |
| izmin | [input] lower z boundary | |
| izmax | [input] higher z boundary | |
| ny | [input] the number of cells in y direction (without the hidden ones) | |
| nx | [input] the number of cells in x direction (without the hidden ones) | |
| nz | [input] the number of cells in z direction (without the hidden ones) | |
| type_t | [input] the type of symmetry in (SYM, NONSYM, see base class documentation) | |
| type_p | [input] the type of symmetry in (SYM, NONSYM, see base class documentation) | |
| fantome | [input] the number of hidden cells on each side |
Definition at line 308 of file grille_val.C.
References Grille_val::fait_grille1D(), Grille_val::nfantome, Grille_val::type_p, Grille_val::type_t, x, xi, xmax, xmin, y, yi, ymax, and ymin.
| Gval_cart::Gval_cart | ( | const Gval_cart & | titi | ) |
| Gval_cart::Gval_cart | ( | FILE * | fd | ) |
Constructor from a file (see sauve(FILE*) ).
Definition at line 358 of file grille_val.C.
References Grille_val::dim, fread_be(), Dim_tbl::ndim, x, xi, xmax, xmin, y, yi, ymax, and ymin.
| Gval_cart::~Gval_cart | ( | ) | [virtual] |
| bool Gval_cart::compatible | ( | const Map * | mp, | |
| const int | lmax, | |||
| const int | lmin = 0 | |||
| ) | const [virtual] |
Checks if the spectral grid and mapping are compatible with the Grille_val caracteristics for the interpolation to be done.
It checks wether the spectral grid is included in the Godunov one, if the numbers of dimensions are the same (1,2 or 3D), and if the spectral collocation points in
and
are well defined across all the domains (see the documentation of Tbl_val .
Implements Grille_val.
Definition at line 93 of file grille_val_interp.C.
References Grille_val::dim, Map::get_mg(), Mg3d::get_np(), Mg3d::get_nr(), Mg3d::get_nt(), Mg3d::get_type_p(), Mg3d::get_type_t(), Dim_tbl::ndim, Map::r, Grille_val::type_p, Grille_val::type_t, xmax, xmin, ymax, ymin, Grille_val::zrmax, and Grille_val::zrmin.
| bool Gval_cart::contenue_dans | ( | const Map & | mp, | |
| const int | lmax, | |||
| const int | lmin = 0 | |||
| ) | const [virtual] |
Checks if Gval_cart is contained inside the spectral grid/mapping within the domains [lmin, lmax[, if the numbers of dimensions are the same (1,2 or 3D), and if the symmetries are compatible.
Implements Grille_val.
Definition at line 210 of file grille_val_interp.C.
References Grille_val::dim, Map::get_mg(), Mg3d::get_np(), Mg3d::get_nr(), Mg3d::get_nt(), Mg3d::get_type_p(), Mg3d::get_type_t(), Dim_tbl::ndim, Map::r, Grille_val::type_p, Grille_val::type_t, xmax, xmin, ymax, ymin, Grille_val::zrmax, and Grille_val::zrmin.
| Tbl * Grille_val::fait_grille1D | ( | const double | rmin, | |
| const double | rmax, | |||
| const int | n | |||
| ) | [protected, inherited] |
Auxilliary function used to allocate memory and construct 1D grid.
Definition at line 71 of file grille_val.C.
References Tbl::set(), and Tbl::set_etat_qcq().
| int Grille_val::get_dim | ( | const int | i | ) | const [inline, inherited] |
Returns the size (without hidden cells).
Definition at line 184 of file grille_val.h.
References Dim_tbl::dim, Grille_val::dim, and Dim_tbl::ndim.
| const Dim_tbl* Grille_val::get_dim_tbl | ( | ) | const [inline, inherited] |
Returns the Dim_tbl associated with the grid.
Definition at line 190 of file grille_val.h.
References Grille_val::dim.
| int Grille_val::get_fantome | ( | ) | const [inline, inherited] |
Returns the number of hidden cells.
Definition at line 164 of file grille_val.h.
References Grille_val::nfantome.
| int Grille_val::get_ndim | ( | ) | const [inline, inherited] |
Returns the number of dimensions.
Definition at line 179 of file grille_val.h.
References Grille_val::dim, and Dim_tbl::ndim.
| int Grille_val::get_type_p | ( | ) | const [inline, inherited] |
Returns the type of symmetry in
.
Definition at line 174 of file grille_val.h.
References Grille_val::type_p.
| int Grille_val::get_type_t | ( | ) | const [inline, inherited] |
Returns the type of symmetry in
.
Definition at line 169 of file grille_val.h.
References Grille_val::type_t.
| double Gval_cart::get_x | ( | const int | i | ) | const [inline] |
Read-only of a particular value of the coordinate x at the nodes.
Definition at line 423 of file grille_val.h.
References Dim_tbl::dim, Grille_val::dim, Dim_tbl::ndim, Grille_val::nfantome, and x.
| double Gval_cart::get_xi | ( | const int | i | ) | const [inline] |
Read-only of a particular value of the coordinate x at the interfaces.
Definition at line 441 of file grille_val.h.
References Dim_tbl::dim, Grille_val::dim, Dim_tbl::ndim, Grille_val::nfantome, and xi.
| double Gval_cart::get_xmax | ( | ) | const [inline] |
| double Gval_cart::get_xmin | ( | ) | const [inline] |
| double Gval_cart::get_y | ( | const int | i | ) | const [inline] |
Read-only of a particular value of the coordinate y at the nodes.
Definition at line 432 of file grille_val.h.
References Dim_tbl::dim, Grille_val::dim, Dim_tbl::ndim, Grille_val::nfantome, and y.
| double Gval_cart::get_yi | ( | const int | i | ) | const [inline] |
Read-only of a particular value of the coordinate y at the interfaces.
Definition at line 450 of file grille_val.h.
References Dim_tbl::dim, Grille_val::dim, Dim_tbl::ndim, Grille_val::nfantome, and yi.
| double Gval_cart::get_ymax | ( | ) | const [inline] |
| double Gval_cart::get_ymin | ( | ) | const [inline] |
| double Grille_val::get_zr | ( | const int | i | ) | const [inline, inherited] |
Read-only of a particular value of the coordinate z (or r ) at the nodes.
Definition at line 195 of file grille_val.h.
References Dim_tbl::dim, Grille_val::dim, Grille_val::nfantome, Tbl::t, and Grille_val::zr.
| double Grille_val::get_zri | ( | const int | i | ) | const [inline, inherited] |
Read-only of a particular value of the coordinate z (or r ) at the interfaces.
Definition at line 203 of file grille_val.h.
References Dim_tbl::dim, Grille_val::dim, Grille_val::nfantome, Tbl::t, and Grille_val::zri.
| Tbl Grille_val::interpol1 | ( | const Tbl & | rdep, | |
| const Tbl & | rarr, | |||
| const Tbl & | fdep, | |||
| int | flag, | |||
| const int | type_inter | |||
| ) | const [inherited] |
Performs 1D interpolation.
| rdep | [input] the coordinates r of the source points | |
| rarr | [input] the coordinates r of the destination points | |
| fdep | [input] values of the function at the source points | |
| flag | [input] = 1 used for INSMTS -- ought to disappear | |
| type_inter | [input] type of interpolation (see Tbl_val ) |
Tbl 1D of the same size as rarr, containing the values of the function at destination points Definition at line 308 of file grille_val_interp.C.
References Tbl::dim, Tbl::get_dim(), Tbl::get_ndim(), Tbl::set(), Tbl::set_etat_qcq(), and Tbl::t.
| Tbl Gval_cart::interpol2 | ( | const Tbl & | fdep, | |
| const Tbl & | rarr, | |||
| const Tbl & | tetarr, | |||
| const int | type_inter | |||
| ) | const [virtual] |
Performs 2D interpolation.
| fdep | [input] values of the function at the source points, defined as the nodes of the Godunov grid | |
| rarr | [input] the coordinates r of the destination points | |
| tetarr | [input] the coordinates of the destination points | |
| type_inter | [input] type of interpolation (see Tbl_val ) |
Implements Grille_val.
Definition at line 466 of file grille_val_interp.C.
References interpol2c(), x, and Grille_val::zr.
| Tbl Gval_cart::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).
Definition at line 472 of file grille_val_interp.C.
References cos(), Tbl::get_dim(), Tbl::get_ndim(), Grille_val::interpol1(), Tbl::set(), Tbl::set_etat_qcq(), sin(), and x.
| Tbl Gval_cart::interpol3 | ( | const Tbl & | fdep, | |
| const Tbl & | rarr, | |||
| const Tbl & | tetarr, | |||
| const Tbl & | phiarr, | |||
| const int | type_inter | |||
| ) | const [virtual] |
Performs 3D interpolation.
| fdep | [input] values of the function at the source points | |
| rarr | [input] the coordinates r of the destination points | |
| tetarr | [input] the coordinates of the destination points | |
| phiarr | [input] the coordinates of the destination points | |
| type_inter | [input] type of interpolation (see Tbl_val ) |
Implements Grille_val.
Definition at line 681 of file grille_val_interp.C.
References Tbl::get_dim(), Tbl::get_ndim(), interpol2c(), Tbl::set(), Tbl::set_etat_qcq(), x, y, and Grille_val::zr.
| void Gval_cart::operator= | ( | const Gval_cart & | titi | ) |
| ostream & Gval_cart::operator>> | ( | ostream & | o | ) | const [protected, virtual] |
Operator >> (virtual function called by the operator <<).
Reimplemented from Grille_val.
Definition at line 446 of file grille_val.C.
References Dim_tbl::dim, Grille_val::dim, Dim_tbl::ndim, Grille_val::nfantome, Tbl::set(), x, y, and Grille_val::zr.
| void Gval_cart::sauve | ( | FILE * | fd | ) | const [virtual] |
Save in a file.
Reimplemented from Grille_val.
Definition at line 423 of file grille_val.C.
References Grille_val::dim, fwrite_be(), Dim_tbl::ndim, Tbl::sauve(), x, xi, xmax, xmin, y, yi, ymax, and ymin.
| void Grille_val::somme_spectrale1 | ( | const Scalar & | meudon, | |
| double * | t, | |||
| int | taille | |||
| ) | const [protected, inherited] |
Makes the sommation of the spectral basis functions to know the values of the function described by the Scalar meudon at the points of the 1D Godunov grid this .
The result is an array t of size taille of all the values of the function at this grid points.
Definition at line 86 of file gval_from_spectral.C.
References Dim_tbl::dim, Grille_val::dim, Tensor::get_mp(), Scalar::get_spectral_va(), Grille_val::nfantome, Tbl::t, Map::val_lx(), Valeur::val_point_jk(), and Grille_val::zr.
| void Gval_cart::somme_spectrale2 | ( | const Scalar & | meudon, | |
| double * | t, | |||
| int | taille | |||
| ) | const [protected, virtual] |
Makes the sommation of the spectral basis functions to know the values of the function described by the Scalar meudon at the points of the 2D Godunov grid this .
The result is an array t of size taille of all the values of the function at this grid points.
Implements Grille_val.
Definition at line 106 of file gval_from_spectral.C.
References acos(), Dim_tbl::dim, Grille_val::dim, Tensor::get_mp(), Scalar::get_spectral_va(), Grille_val::nfantome, sqrt(), Tbl::t, Map::val_lx(), Valeur::val_point(), x, and Grille_val::zr.
| void Gval_cart::somme_spectrale3 | ( | const Scalar & | meudon, | |
| double * | t, | |||
| int | taille | |||
| ) | const [protected, virtual] |
Same as before but for the 3D case.
Implements Grille_val.
Definition at line 154 of file gval_from_spectral.C.
References acos(), Dim_tbl::dim, Grille_val::dim, Tensor::get_mp(), Scalar::get_spectral_va(), Grille_val::nfantome, sqrt(), Tbl::t, Map::val_lx(), Valeur::val_point(), x, and Grille_val::zr.
| ostream& operator<< | ( | ostream & | , | |
| const Grille_val & | ||||
| ) | [friend, inherited] |
Display.
friend class Tbl_val [friend] |
Arrays defined on Godunov-type grids.
Reimplemented from Grille_val.
Definition at line 323 of file grille_val.h.
Dim_tbl Grille_val::dim [protected, inherited] |
The dimensions of the grid.
Definition at line 98 of file grille_val.h.
int Grille_val::nfantome [protected, inherited] |
The number of hidden cells (same on each side).
Definition at line 100 of file grille_val.h.
int Grille_val::type_p [protected, inherited] |
int Grille_val::type_t [protected, inherited] |
Arrays containing the values of coordinate x on the nodes.
Definition at line 339 of file grille_val.h.
Arrays containing the values of coordinate x on the interfaces.
Definition at line 341 of file grille_val.h.
double* Gval_cart::xmax [protected] |
Higher boundary for x dimension.
Definition at line 331 of file grille_val.h.
double* Gval_cart::xmin [protected] |
Lower boundary for x dimension.
Definition at line 329 of file grille_val.h.
Arrays containing the values of coordinate y on the nodes.
Definition at line 343 of file grille_val.h.
Arrays containing the values of coordinate y on the interfaces.
Definition at line 345 of file grille_val.h.
double* Gval_cart::ymax [protected] |
Higher boundary for y dimension.
Definition at line 335 of file grille_val.h.
double* Gval_cart::ymin [protected] |
Lower boundary for y dimension.
Definition at line 333 of file grille_val.h.
Tbl* Grille_val::zr [inherited] |
Arrays containing the values of coordinate z (or r) on the nodes.
Definition at line 120 of file grille_val.h.
Tbl* Grille_val::zri [inherited] |
Arrays containing the values of coordinate z (or r) on the interfaces.
Definition at line 122 of file grille_val.h.
double* Grille_val::zrmax [protected, inherited] |
Higher boundary for z (or r ) direction.
Definition at line 116 of file grille_val.h.
double* Grille_val::zrmin [protected, inherited] |
Lower boundary for z (or r ) direction.
Definition at line 113 of file grille_val.h.
1.6.1