30char map_log_C[] =
"$Header $" ;
68 Map_radial(mgrille), alpha (mgrille.get_nzone()), beta (mgrille.get_nzone()),
78 for (
int l=0 ; l<nzone ; l++) {
83 alpha.
set(l) = bornes(l+1) - 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) ;
98 beta.
set(l) = (umin + umax) * .5 ;
103 cout <<
"Map_log::Map_log: unkown type_r ! " << endl ;
120 cout <<
"Map_log::Map_log: unkown type_r ! " << endl ;
129 cout <<
"Map_log::Map_log: unkown type_r ! " << endl ;
140 type_var(so.type_var) {
146 alpha (mgrille.get_nzone()),
147 beta (mgrille.get_nzone()),
148 type_var (mgrille.get_nzone()) {
175 double precis = 1e-10 ;
206 ost <<
"Log mapping (class Map_log)" << endl ;
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++) {
222 ost <<
" " << (+
r)(l, 0, 0, nrm1) ;
257void Map_log::set_coord(){
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.
void sauve(FILE *) const
Save in a file.
const double * get_beta() const
Returns the pointer on the array beta.
const double * get_alpha() const
Returns the pointer on the array alpha.
Logarithmic radial mapping.
friend Mtbl * map_log_fait_r(const Map *)
< Not implemented
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.
Base class for pure radial mappings.
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.
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).
Base class for coordinate mappings.
double get_ori_z() const
Returns the z coordinate of the origin.
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping,...
Coord y
y coordinate centered on the grid
double ori_x
Absolute coordinate x of the origin.
Coord ya
Absolute y coordinate.
void set_rot_phi(double phi0)
Sets a new rotation angle.
double ori_y
Absolute coordinate y of the origin.
Coord r
r coordinate centered on the grid
Base_vect_spher bvect_spher
Orthonormal vectorial basis associated with the coordinates of the mapping.
void set_ori(double xa0, double ya0, double za0)
Sets a new origin.
double get_ori_y() const
Returns the y coordinate of the origin.
Coord za
Absolute z coordinate.
Coord tet
coordinate centered on the grid
const Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
Base_vect_cart bvect_cart
Cartesian basis associated with the coordinates (x,y,z) of the mapping, i.e.
Coord z
z coordinate centered on the grid
double get_ori_x() const
Returns the x coordinate of the origin.
Coord x
x coordinate centered on the grid
Coord phi
coordinate centered on the grid
double ori_z
Absolute coordinate z of the origin.
double get_rot_phi() const
Returns the angle between the x –axis and X –axis.
Coord xa
Absolute x coordinate.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
const Mg3d * mg
Pointer on the multi-grid Mgd3 on which this is defined
int get_nzone() const
Returns the number of domains.
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
int get_type_r(int l) const
Returns the type of sampling in the radial direction in domain no.
void sauve(FILE *) const
Save in a file.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
double & set(int i)
Read/write of a particular element (index i) (1D case)
Tbl diffrelmax(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (max version).
Cmp log(const Cmp &)
Neperian logarithm.