Base class for Godunov-type grids. More...
#include <grille_val.h>
Public Member Functions | |
| void | operator= (const Grille_val &) |
| Assignment to another Grille_val. | |
| 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. | |
| 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 interpolation to be done. | |
| Tbl | interpol1 (const Tbl &rdep, const Tbl &rarr, const Tbl &fdep, int flag, const int type_inter) const |
| Performs 1D interpolation. | |
| 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 =0 |
| Performs 3D interpolation. | |
| 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, lmax[, if the numbers of dimensions are the same (1,2 or 3D), and if the symmetries are compatible. | |
Public Attributes | |
| 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 | |
| Tbl * | fait_grille1D (const double rmin, const double rmax, const int n) |
| Auxilliary function used to allocate memory and construct 1D grid. | |
| 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). | |
| Grille_val (const double, const double, const int n2, const int n1, const int itype_t, const int fantome=2) | |
| Standard 2D constructor (the sizes are to be given without hidden cells). | |
| Grille_val (const double, const double, const int n3, const int n2, const int n1, const int itype_t, const int itype_p, const int fantome=2) | |
| Standard 3D constructor (the sizes are to be given without hidden cells). | |
| Grille_val (const Grille_val &) | |
| Copy constructor. | |
| Grille_val (FILE *) | |
Constructor from a file (see sauve(FILE*) ). | |
| virtual | ~Grille_val () |
| Destructor. | |
| virtual ostream & | operator>> (ostream &) const |
| Operator >> (virtual function called by the operator <<). | |
| 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 . | |
| virtual void | somme_spectrale2 (const Scalar &meudon, double *t, int taille) const =0 |
| Same as before but for the 2D case. | |
| virtual void | somme_spectrale3 (const Scalar &meudon, double *t, int taille) const =0 |
| Same as before but for the 3D case. | |
Protected Attributes | |
| 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. | |
Base class for Godunov-type grids.
()
Takes into account hidden cells and interfaces between cells, in 1,2 or 3D. The derived classes stand for spherical and cartesian grids. this base class settles quantities for 1D grid, which is minimal and independent from the geometry (cartesian or spherical). Therefore, the coordinates z and r are identified.
This is an abstract class (cannot be instanciated).
Definition at line 90 of file grille_val.h.
| Grille_val::Grille_val | ( | const double | izrmin, | |
| const double | izrmax, | |||
| const int | n1, | |||
| const int | fantome = 2 | |||
| ) | [protected] |
Standard 1D constructor (the size is to be given without hidden cells).
Definition at line 83 of file grille_val.C.
References fait_grille1D(), nfantome, zr, zri, zrmax, and zrmin.
| Grille_val::Grille_val | ( | const double | izrmin, | |
| const double | izrmax, | |||
| const int | n2, | |||
| const int | n1, | |||
| const int | itype_t, | |||
| const int | fantome = 2 | |||
| ) | [protected] |
Standard 2D constructor (the sizes are to be given without hidden cells).
Definition at line 101 of file grille_val.C.
References fait_grille1D(), nfantome, zr, zri, zrmax, and zrmin.
| Grille_val::Grille_val | ( | const double | izrmin, | |
| const double | izrmax, | |||
| const int | n3, | |||
| const int | n2, | |||
| const int | n1, | |||
| const int | itype_t, | |||
| const int | itype_p, | |||
| const int | fantome = 2 | |||
| ) | [protected] |
Standard 3D constructor (the sizes are to be given without hidden cells).
Definition at line 121 of file grille_val.C.
References fait_grille1D(), nfantome, zr, zri, zrmax, and zrmin.
| Grille_val::Grille_val | ( | const Grille_val & | titi | ) | [protected] |
| Grille_val::Grille_val | ( | FILE * | fd | ) | [protected] |
Constructor from a file (see sauve(FILE*) ).
Definition at line 156 of file grille_val.C.
References fread_be(), nfantome, type_p, type_t, zr, zri, zrmax, and zrmin.
| Grille_val::~Grille_val | ( | ) | [protected, virtual] |
| virtual bool Grille_val::compatible | ( | const Map * | mp, | |
| const int | lmax, | |||
| const int | lmin = 0 | |||
| ) | const [pure 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 ).
Implemented in Gval_cart, and Gval_spher.
| virtual bool Grille_val::contenue_dans | ( | const Map & | mp, | |
| const int | lmax, | |||
| const int | lmin = 0 | |||
| ) | const [pure virtual] |
Checks if Grille_val 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.
Implemented in Gval_cart, and Gval_spher.
| Tbl * Grille_val::fait_grille1D | ( | const double | rmin, | |
| const double | rmax, | |||
| const int | n | |||
| ) | [protected] |
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] |
Returns the size (without hidden cells).
Definition at line 184 of file grille_val.h.
References Dim_tbl::dim, dim, and Dim_tbl::ndim.
| const Dim_tbl* Grille_val::get_dim_tbl | ( | ) | const [inline] |
Returns the Dim_tbl associated with the grid.
Definition at line 190 of file grille_val.h.
References dim.
| int Grille_val::get_fantome | ( | ) | const [inline] |
Returns the number of hidden cells.
Definition at line 164 of file grille_val.h.
References nfantome.
| int Grille_val::get_ndim | ( | ) | const [inline] |
Returns the number of dimensions.
Definition at line 179 of file grille_val.h.
References dim, and Dim_tbl::ndim.
| int Grille_val::get_type_p | ( | ) | const [inline] |
| int Grille_val::get_type_t | ( | ) | const [inline] |
| double Grille_val::get_zr | ( | const int | i | ) | const [inline] |
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, dim, nfantome, Tbl::t, and zr.
| double Grille_val::get_zri | ( | const int | i | ) | const [inline] |
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, dim, nfantome, Tbl::t, and zri.
| Tbl Grille_val::interpol1 | ( | const Tbl & | rdep, | |
| const Tbl & | rarr, | |||
| const Tbl & | fdep, | |||
| int | flag, | |||
| const int | type_inter | |||
| ) | const |
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.
| virtual Tbl Grille_val::interpol2 | ( | const Tbl & | fdep, | |
| const Tbl & | rarr, | |||
| const Tbl & | tetarr, | |||
| const int | type_inter | |||
| ) | const [pure virtual] |
Performs 2D 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 | |
| type_inter | [input] type of interpolation (see Tbl_val ) |
Implemented in Gval_cart, and Gval_spher.
| virtual Tbl Grille_val::interpol3 | ( | const Tbl & | fdep, | |
| const Tbl & | rarr, | |||
| const Tbl & | tetarr, | |||
| const Tbl & | phiarr, | |||
| const int | type_inter | |||
| ) | const [pure 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 ) |
Implemented in Gval_cart, and Gval_spher.
| void Grille_val::operator= | ( | const Grille_val & | titi | ) |
Assignment to another Grille_val.
Reimplemented in Gval_cart, and Gval_spher.
Definition at line 195 of file grille_val.C.
References Dim_tbl::dim, dim, nfantome, Tbl::t, type_p, type_t, zr, zri, zrmax, and zrmin.
| ostream & Grille_val::operator>> | ( | ostream & | o | ) | const [protected, virtual] |
Operator >> (virtual function called by the operator <<).
Reimplemented in Gval_cart, and Gval_spher.
Definition at line 244 of file grille_val.C.
References Dim_tbl::dim, dim, Dim_tbl::ndim, and nfantome.
| void Grille_val::sauve | ( | FILE * | fd | ) | const [virtual] |
Save in a file.
Reimplemented in Gval_cart, and Gval_spher.
Definition at line 220 of file grille_val.C.
References dim, fwrite_be(), nfantome, Tbl::sauve(), Dim_tbl::sauve(), type_p, type_t, zr, zri, zrmax, and zrmin.
| void Grille_val::somme_spectrale1 | ( | const Scalar & | meudon, | |
| double * | t, | |||
| int | taille | |||
| ) | const [protected] |
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, dim, Tensor::get_mp(), Scalar::get_spectral_va(), nfantome, Tbl::t, Map::val_lx(), Valeur::val_point_jk(), and zr.
| virtual void Grille_val::somme_spectrale2 | ( | const Scalar & | meudon, | |
| double * | t, | |||
| int | taille | |||
| ) | const [protected, pure virtual] |
Same as before but for the 2D case.
Implemented in Gval_cart, and Gval_spher.
| virtual void Grille_val::somme_spectrale3 | ( | const Scalar & | meudon, | |
| double * | t, | |||
| int | taille | |||
| ) | const [protected, pure virtual] |
Same as before but for the 3D case.
Implemented in Gval_cart, and Gval_spher.
| ostream& operator<< | ( | ostream & | , | |
| const Grille_val & | ||||
| ) | [friend] |
Display.
friend class Tbl_val [friend] |
Arrays defined on Godunov-type grids.
Reimplemented in Gval_cart, and Gval_spher.
Definition at line 92 of file grille_val.h.
Dim_tbl Grille_val::dim [protected] |
The dimensions of the grid.
Definition at line 98 of file grille_val.h.
int Grille_val::nfantome [protected] |
The number of hidden cells (same on each side).
Definition at line 100 of file grille_val.h.
int Grille_val::type_p [protected] |
int Grille_val::type_t [protected] |
Arrays containing the values of coordinate z (or r) on the nodes.
Definition at line 120 of file grille_val.h.
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] |
Higher boundary for z (or r ) direction.
Definition at line 116 of file grille_val.h.
double* Grille_val::zrmin [protected] |
Lower boundary for z (or r ) direction.
Definition at line 113 of file grille_val.h.
1.6.1