ESTER
Evolution STEllaire en Rotation
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
mapping.h
Go to the documentation of this file.
1 #ifndef _MAPPING_H
2 #define _MAPPING_H
3 
4 #include "ester-config.h"
5 #include "matrix.h"
6 #include "numdiff.h"
7 #include "graphics.h"
8 #include "solver.h"
9 
10 #define MAP_BONAZZOLA 0
11 #define MAP_LINEAR 1
12 
13 class mapping {
15  public:
18  const int &nr,&nt,&ndomains;
19  int mode;
20  int *&npts;
21  const matrix η
24  matrix &I,&It;
27  matrix J[4];
28  class ext_map {
30  ext_map(mapping *);
31  void copy(const ext_map &);
32  public:
36  matrix J[4];
37 
38  operator mapping();
39  friend class mapping;
40  } ex;
41  const int &nex;
42 
43  mapping();
44  ~mapping();
45  mapping(const mapping &);
46  mapping &operator=(const mapping &);
47  void copy(const mapping &);
48  void set_ndomains(int ndom);
49  void set_npts(int npts);
50  void set_nt(int nt);
51  void set_nex(int nex);
52  void set_npts(int *npts);
53  void set_mode(int mode);
54  int init();
55  int remap();
56 
57  matrix eval(const matrix &y,const matrix &ri, const matrix &thi,int parity=0) const;
58 
59 
60  matrix dr(const matrix &) const;
61  matrix dt(const matrix &) const;
62  matrix dt_odd(const matrix &) const;
63  matrix dt2(const matrix &) const;
64 
65  matrix stream(const matrix &Fz,matrix &Ft) const;
66  matrix stream(const matrix &Fz) const;
67  matrix zeta_to_r(const matrix &z) const;
68 
69 
70  matrix draw0(const matrix &A,int parity,matrix &x,matrix &y) const;
71  void draw(figure *pfig,const matrix &A,int parity=0) const;
72  matrix drawi0(const matrix &A,int sr,int st,int parity,matrix &x,matrix &y) const;
73  void drawi(figure *pfig,const matrix &A,int sr,int st,int parity=0) const;
74  void drawc(figure *pfig,const matrix &A,int ncontours,int parity=0) const;
75  void drawci(figure *pfig,const matrix &A,int sr,int st,int ncontours,int parity=0) const;
76  void spectrum(figure *pfig,const matrix &y,int parity=0) const;
77 
78  friend class ext_map;
79 
80 };
81 
82 class remapper {
87  void remap();
88 public:
89  remapper(const mapping &map);
90  ~remapper();
91  void set_nt(int nt);
92  void set_nex(int nex);
93  void set_ndomains(int ndom);
94  void set_npts(int *npts);
95  void set_npts(int npts);
96  void set_R(const matrix &R);
97  void set_fixed(int idom_new,int idom_old);
98  void set_mode(int mode);
99  mapping get_map();
100  matrix interp(const matrix &y,int parity=0);
101  matrix_map interp(const matrix_map &y,int parity=0);
102  matrix interp_ex(const matrix &y,int parity=0);
103 };
104 
105 #endif
void remap()
Definition: remapper.cpp:166
matrix & Dt2_10
Definition: mapping.h:23
void spectrum(figure *pfig, const matrix &y, int parity=0) const
Definition: mapping.cpp:591
matrix J[4]
Definition: mapping.h:27
mapping()
Definition: mapping.cpp:8
void set_npts(int npts)
Definition: mapping.cpp:58
matrix & I
Definition: mapping.h:24
matrix rt
Definition: mapping.h:25
Definition: matrix.h:287
matrix_block_diag & D
Definition: mapping.h:22
matrix eta_
Definition: mapping.h:14
friend class mapping
Definition: mapping.h:39
mapping * parent
Definition: mapping.h:29
mapping map_new
Definition: mapping.h:83
matrix & Dt
Definition: mapping.h:23
matrix gzz
Definition: mapping.h:25
matrix rzz
Definition: mapping.h:25
matrix gzz
Definition: mapping.h:34
int nex
Definition: mapping.h:85
void set_nt(int nt)
Definition: mapping.cpp:69
mapping map
Definition: mapping.h:83
matrix interp(const matrix &y, int parity=0)
Definition: remapper.cpp:113
diff_gl gl
Definition: mapping.h:16
matrix & th
Definition: mapping.h:23
void set_nex(int nex)
Definition: mapping.cpp:75
matrix & Dt2
Definition: mapping.h:23
void set_ndomains(int ndom)
Definition: mapping.cpp:52
The matrix class is used to facilitate the work with regular dense matrices.
Definition: matrix.h:9
matrix rtt
Definition: mapping.h:25
matrix dr(const matrix &) const
Definition: mapping.cpp:233
matrix rzt
Definition: mapping.h:34
matrix & Dt2_01
Definition: mapping.h:23
matrix & Dt_10
Definition: mapping.h:23
The matrix_block_diag class is used to store block diagonal matrices.
Definition: matrix.h:202
int nt
Definition: mapping.h:85
Definition: mapping.h:28
void set_mode(int mode)
Definition: mapping.cpp:81
matrix dt_odd(const matrix &) const
Definition: mapping.cpp:243
int init()
Definition: mapping.cpp:87
ext_map(mapping *)
Definition: mapping.cpp:635
matrix rzt
Definition: mapping.h:25
const int & nex
Definition: mapping.h:41
matrix rz
Definition: mapping.h:25
void set_R(const matrix &R)
Definition: remapper.cpp:72
matrix Tex
Definition: mapping.h:86
Definition: mapping.h:82
matrix rt
Definition: mapping.h:34
matrix D
Definition: mapping.h:33
matrix eval(const matrix &y, const matrix &ri, const matrix &thi, int parity=0) const
Definition: mapping.cpp:283
diff_gl gl
Definition: mapping.h:35
matrix dt2(const matrix &) const
Definition: mapping.cpp:248
int remap()
Definition: mapping.cpp:96
matrix gtt
Definition: mapping.h:34
int mode
Definition: mapping.h:19
~remapper()
Definition: remapper.cpp:21
int remapped
Definition: mapping.h:84
matrix J[4]
Definition: mapping.h:36
void set_nex(int nex)
Definition: remapper.cpp:35
matrix & It
Definition: mapping.h:24
matrix gzt
Definition: mapping.h:34
mapping & operator=(const mapping &)
Definition: mapping.cpp:45
void copy(const ext_map &)
Definition: mapping.cpp:641
int * fixed
Definition: mapping.h:85
matrix zeta_to_r(const matrix &z) const
Definition: mapping.cpp:330
matrix rz
Definition: mapping.h:34
const int & ndomains
Definition: mapping.h:18
matrix stream(const matrix &Fz, matrix &Ft) const
Definition: mapping.cpp:253
Definition: mapping.h:13
int *& npts
Definition: mapping.h:20
class mapping::ext_map ex
matrix & z
Definition: mapping.h:23
void set_nt(int nt)
Definition: remapper.cpp:28
int redist
Definition: mapping.h:84
matrix gzt
Definition: mapping.h:25
~mapping()
Definition: mapping.cpp:21
const matrix & eta
Definition: mapping.h:21
matrix r
Definition: mapping.h:25
const int & nr
Definition: mapping.h:18
void set_npts(int *npts)
Definition: remapper.cpp:56
matrix dt(const matrix &) const
Definition: mapping.cpp:238
matrix & Dt_01
Definition: mapping.h:23
int mode
Definition: mapping.h:85
int ndomains
Definition: mapping.h:85
matrix T
Definition: mapping.h:86
int changed_npts
Definition: mapping.h:84
void drawi(figure *pfig, const matrix &A, int sr, int st, int parity=0) const
Definition: mapping.cpp:514
matrix R
Definition: mapping.h:26
matrix R
Definition: mapping.h:86
void set_fixed(int idom_new, int idom_old)
Definition: remapper.cpp:80
matrix & Dt2_11
Definition: mapping.h:23
void draw(figure *pfig, const matrix &A, int parity=0) const
Definition: mapping.cpp:503
The diff_gl class implements the Gauss-Lobatto (or more properly Gauss-Lobatto-Chebyshev) collocation...
Definition: numdiff.h:16
Definition: graphics.h:7
int * npts
Definition: mapping.h:85
matrix zmap
Definition: mapping.h:86
void drawc(figure *pfig, const matrix &A, int ncontours, int parity=0) const
Definition: mapping.cpp:525
void copy(const mapping &)
Definition: mapping.cpp:32
The diff_leg class implements Legendre numerical differentiation.
Definition: numdiff.h:48
diff_leg leg
Definition: mapping.h:17
matrix z
Definition: mapping.h:33
matrix Tt[4]
Definition: mapping.h:86
void drawci(figure *pfig, const matrix &A, int sr, int st, int ncontours, int parity=0) const
Definition: mapping.cpp:557
matrix & Dt_11
Definition: mapping.h:23
const int & nt
Definition: mapping.h:18
void set_mode(int mode)
Definition: remapper.cpp:90
matrix gtt
Definition: mapping.h:25
matrix interp_ex(const matrix &y, int parity=0)
Definition: remapper.cpp:149
remapper(const mapping &map)
Definition: remapper.cpp:6
matrix drawi0(const matrix &A, int sr, int st, int parity, matrix &x, matrix &y) const
Definition: mapping.cpp:410
void set_ndomains(int ndom)
Definition: remapper.cpp:42
matrix draw0(const matrix &A, int parity, matrix &x, matrix &y) const
Definition: mapping.cpp:344
matrix r
Definition: mapping.h:34
matrix rzz
Definition: mapping.h:34
matrix rtt
Definition: mapping.h:34
mapping get_map()
Definition: remapper.cpp:96