30char map_log_C[] =
"$Header $" ;
73 int nzone = mg->get_nzone() ;
75 alpha.set_etat_qcq() ;
78 for (
int l=0 ; l<nzone ; l++) {
81 switch (mg->get_type_r(l)) {
83 alpha.set(l) = bornes(l+1) - bornes(l) ;
84 beta.set(l) = bornes(l) ;
89 alpha.set(l) = (bornes(l+1) - bornes(l)) * .5 ;
90 beta.set(l) = (bornes(l+1) + bornes(l)) * .5 ;
95 double umax = 1./bornes(l) ;
96 double umin = 1./bornes(l+1) ;
97 alpha.set(l) = (umin - umax) * .5 ;
98 beta.set(l) = (umin + umax) * .5 ;
103 cout <<
"Map_log::Map_log: unkown type_r ! " << endl ;
112 switch (mg->get_type_r(l)) {
114 alpha.set(l) = (
log(bornes(l+1)) -
log(bornes(l))) * .5 ;
115 beta.set(l) = (
log(bornes(l+1)) +
log(bornes(l))) * .5 ;
120 cout <<
"Map_log::Map_log: unkown type_r ! " << endl ;
129 cout <<
"Map_log::Map_log: unkown type_r ! " << endl ;
146 alpha (mgrille.get_nzone()),
147 beta (mgrille.get_nzone()),
175 double precis = 1e-10 ;
183 if (*mg != *(mpi.get_mg()))
186 if (fabs(ori_x-mpi.get_ori_x()) > precis) resu = false ;
187 if (fabs(ori_y-mpi.get_ori_y()) > precis) resu = false ;
188 if (fabs(ori_z-mpi.get_ori_z()) > precis) resu = false ;
190 if (
bvect_spher != mpi.get_bvect_spher()) resu = false ;
191 if (
bvect_cart != mpi.get_bvect_cart()) resu = false ;
206 ost <<
"Log mapping (class Map_log)" << endl ;
207 int nz = mg->get_nzone() ;
208 for (
int l=0; l<nz; l++) {
209 ost <<
" Domain #" << l <<
" ; Variable type " ;
214 ost <<
"alpha_l = " <<
alpha(l)
215 <<
" , beta_l = " <<
beta(l) << endl ;
219 ost <<
" Coord r : " ;
220 for (
int l=0; l<nz; l++) {
221 int nrm1 = mg->get_nr(l) - 1 ;
222 ost <<
" " << (+
r)(l, 0, 0, nrm1) ;
232 assert(mpi.get_mg() == mg) ;
234 set_ori( mpi.get_ori_x(), mpi.get_ori_y(), mpi.get_ori_z() ) ;
241 for (
int l=0; l<mg->get_nzone(); l++){
257void Map_log::set_coord(){
260 r.set(
this, map_log_fait_r) ;
261 tet.set(
this, map_log_fait_tet) ;
262 phi.set(
this, map_log_fait_phi) ;
263 sint.set(
this, map_log_fait_sint) ;
264 cost.set(
this, map_log_fait_cost) ;
265 sinp.set(
this, map_log_fait_sinp) ;
266 cosp.set(
this, map_log_fait_cosp) ;
268 x.set(
this, map_log_fait_x) ;
269 y.set(
this, map_log_fait_y) ;
270 z.set(
this, map_log_fait_z) ;
272 xa.set(
this, map_log_fait_xa) ;
273 ya.set(
this, map_log_fait_ya) ;
274 za.set(
this, map_log_fait_za) ;
277 xsr.
set(
this, map_log_fait_xsr) ;
278 dxdr.
set(
this, map_log_fait_dxdr) ;
279 drdt.
set(
this, map_log_fait_drdt) ;
void set(const Map *mp, Mtbl *(*construct)(const Map *))
Semi-constructor from a mapping and a method.
Basic integer array class.
const double * get_beta() const
Returns the pointer on the array beta.
const double * get_alpha() const
Returns the pointer on the array alpha.
Itbl type_var
Array (size: mg->nzone ) of the type of variable in each domain.
virtual void sauve(FILE *) const
Save in a file.
Tbl alpha
Array (size: mg->nzone ) of the values of in each domain.
virtual ostream & operator>>(ostream &) const
Operator >>.
Map_log(const Mg3d &mgrille, const Tbl &r_limits, const Itbl &typevar)
Standard Constructor.
virtual ~Map_log()
Destructor.
Coord dxdlnr
Same as dxdr if the domains where the description is affine and where it is logarithmic.
virtual void operator=(const Map_af &mpa)
Assignment to an affine mapping.
virtual bool operator==(const Map &) const
Comparison operator (egality).
Tbl beta
Array (size: mg->nzone ) of the values of in each domain.
Coord d2rdx2
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Coord sr2drdt
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Coord srstdrdp
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Coord d2rdtdx
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Coord sstd2rdpdx
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
virtual void reset_coord()
Resets all the member Coords.
Coord lapr_tp
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Coord sr2stdrdp
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Coord drdt
in the nucleus and in the non-compactified shells; \ in the compactified external domain (CED).
Coord srdrdt
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Map_radial(const Mg3d &mgrid)
Constructor from a grid (protected to make Map_radial an abstract class).
Coord xsr
in the nucleus; \ 1/R in the non-compactified shells; \ in the compactified outer domain.
virtual void sauve(FILE *) const
Save in a file.
Coord dxdr
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Coord sr2d2rdt2
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Coord stdrdp
in the nucleus and in the non-compactified shells; \ in the compactified external domain (CED).
Tbl diffrelmax(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (max version).
Cmp log(const Cmp &)
Neperian logarithm.
Base_vect_spher bvect_spher
Base class for coordinate mappings.
Coord z
z coordinate centered on the grid
Base_vect_cart bvect_cart
Cartesian basis associated with the coordinates (x,y,z) of the mapping, i.e.
Coord y
y coordinate centered on the grid
Map(const Mg3d &)
Constructor from a multi-domain 3D grid.
Coord phi
coordinate centered on the grid
Coord tet
coordinate centered on the grid
void set_rot_phi(double phi0)
Sets a new rotation angle.
Coord x
x coordinate centered on the grid
Coord xa
Absolute x coordinate.
Coord za
Absolute z coordinate.
void set_ori(double xa0, double ya0, double za0)
Sets a new origin.
Coord r
r coordinate centered on the grid
Coord ya
Absolute y coordinate.