30char Grille_val_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Valencia/grille_val.C,v 1.7 2014/10/13 08:53:48 j_novak Exp $" ;
66#include "grille_val.h"
67#include "utilitaires.h"
81 resu->set_etat_qcq() ;
89 dim(
n1), nfantome(
fantome), type_t(SYM), type_p(SYM)
126 const int n3,
const int n2,
const int n1,
146 nfantome(
titi.nfantome), type_t(
titi.type_t), type_p(
titi.type_p)
252 o.setf(ios::showpoint);
253 o <<
"*** Grille_val " << ndim <<
"D" <<
" size: " ;
254 for (
int i = 0;
i<ndim-1;
i++) {
256 if (ndim-
i == 3)
o <<
" x " ;
257 if (ndim-
i == 2)
o <<
" x " ;
260 o <<
nfant <<
" hidden cells on each side " <<
endl ;
282 xmin(0x0), xmax(0x0),
283 ymin(0x0), ymax(0x0),
293 ymin(0x0), ymax(0x0),
315 const int nx,
const int nz,
const int itype_t,
392 if (
x != 0x0)
delete x ;
393 if (
xi != 0x0)
delete xi ;
396 if (
y != 0x0)
delete y ;
397 if (
yi != 0x0)
delete yi ;
455 o <<
"*** Cartesian grid ***" <<
endl ;
460 o <<
"Z nodes: " <<
endl ;
470 o <<
"X nodes: " <<
endl ;
476 o <<
"Z nodes: " <<
endl ;
486 o <<
"Y nodes: " <<
endl ;
492 o <<
"X nodes: " <<
endl ;
498 o <<
"Z nodes: " <<
endl ;
508 cout <<
"operator>> Gval_cart : unexpected dimension !" <<
endl ;
509 cout <<
" ndim = " << ndim <<
endl ;
563 const int nt,
const int nr,
const int itype_t,
626 if (
tet != 0x0)
delete tet ;
628 if (
phi != 0x0)
delete phi ;
642 if (
titi.tet != 0x0) {
649 if (
tet != 0x0)
delete tet ;
652 if (
titi.teti != 0x0) {
662 if (
titi.phi != 0x0) {
669 if (
phi != 0x0)
delete phi ;
672 if (
titi.phii != 0x0) {
714 o <<
"*** Spherical grid ***" <<
endl ;
719 o <<
"R nodes: " <<
endl ;
729 o <<
"THETA nodes: " <<
endl ;
735 o <<
"R nodes: " <<
endl ;
745 o <<
"PHI nodes: " <<
endl ;
751 o <<
"THETA nodes: " <<
endl ;
757 o <<
"R nodes: " <<
endl ;
767 cout <<
"operator>> Gval_spher : unexpected dimension !" <<
endl ;
768 cout <<
" ndim = " << ndim <<
endl ;
void sauve(FILE *) const
Save in a file.
int * dim
Array of dimensions (size: ndim).
int ndim
Number of dimensions of the Tbl: can be 1, 2 or 3.
Time evolution with partial storage (*** under development ***).
Base class for Godunov-type grids.
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 <<).
virtual void sauve(FILE *) const
Save in a file.
Dim_tbl dim
The dimensions of the grid.
Tbl * zr
Arrays containing the values of coordinate z (or r) on the nodes
virtual ~Grille_val()
Destructor.
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 :
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)
void operator=(const Grille_val &)
Assignment to another Grille_val.
Tbl * zri
Arrays containing the values of coordinate z (or r) on the interfaces.
double * zrmax
Higher boundary for z (or r ) direction
Class for cartesian Godunov-type grids.
double * xmax
Higher boundary for x dimension.
double * xmin
Lower boundary for x dimension.
double * ymin
Lower boundary for y dimension.
virtual void sauve(FILE *) const
Save in a file.
double * ymax
Higher boundary for y dimension.
Tbl * y
Arrays containing the values of coordinate y on the nodes.
void operator=(const Gval_cart &)
Assignment to another Gval_cart.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
Tbl * xi
Arrays containing the values of coordinate x on the interfaces.
Gval_cart(const double izmin, const double izmax, const int n1, const int fantome=2)
Standard 1D constructor.
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.
Class for spherical Godunov-type grids.
void operator=(const Gval_spher &)
Assignment to another Gval_spher.
Tbl * phi
Arrays containing the values of coordinate on the nodes.
Tbl * teti
Arrays containing the values of coordinate on the interfaces.
virtual void sauve(FILE *) const
Save in a file.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
Tbl * phii
Arrays containing the values of coordinate on the interfaces.
Gval_spher(const double irmin, const double irmax, const int nr, const int fantome=2)
Standard 1D constructor.
virtual ~Gval_spher()
Destructor.
Tbl * tet
Arrays containing the values of coordinate on the nodes.
void sauve(FILE *) const
Save in a file.
double & set(int i)
Read/write of a particular element (index i) (1D case)
double * t
The array of double.
int fread_be(int *aa, int size, int nb, FILE *fich)
Reads integer(s) from a binary file according to the big endian convention.
int fwrite_be(const int *aa, int size, int nb, FILE *fich)
Writes integer(s) into a binary file according to the big endian convention.