LORENE
des_map_et.C
1/*
2 * Plots the coefficients of the functions F_l(theta', phi') and
3 * G_l(theta', phi') which define a mapping of the class Map_et.
4 *
5 * (see file graphique.h for the documentation).
6 *
7 */
8
9/*
10 * Copyright (c) 1999-2001 Eric Gourgoulhon
11 *
12 * This file is part of LORENE.
13 *
14 * LORENE is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * LORENE is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with LORENE; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 *
28 */
29
30
31
32
33/*
34 * $Id: des_map_et.C,v 1.5 2016/12/05 16:18:06 j_novak Exp $
35 * $Log: des_map_et.C,v $
36 * Revision 1.5 2016/12/05 16:18:06 j_novak
37 * Suppression of some global variables (file names, loch, ...) to prevent redefinitions
38 *
39 * Revision 1.4 2014/10/13 08:53:22 j_novak
40 * Lorene classes and functions now belong to the namespace Lorene.
41 *
42 * Revision 1.3 2014/10/06 15:16:05 j_novak
43 * Modified #include directives to use c++ syntax.
44 *
45 * Revision 1.2 2008/08/19 06:42:00 j_novak
46 * Minor modifications to avoid warnings with gcc 4.3. Most of them concern
47 * cast-type operations, and constant strings that must be defined as const char*
48 *
49 * Revision 1.1.1.1 2001/11/20 15:19:29 e_gourgoulhon
50 * LORENE
51 *
52 * Revision 2.4 2000/11/20 21:43:57 eric
53 * Correction erreur affichage k=3 --> k=4 pour G.
54 *
55 * Revision 1.3 2000/11/14 15:12:27 eric
56 * Traitement du cas np=1
57 *
58 * Revision 1.2 1999/12/20 14:48:42 eric
59 * *** empty log message ***
60 *
61 * Revision 1.1 1999/12/20 14:27:36 eric
62 * Initial revision
63 *
64 *
65 * $Header: /cvsroot/Lorene/C++/Source/Non_class_members/Graphics/des_map_et.C,v 1.5 2016/12/05 16:18:06 j_novak Exp $
66 *
67 */
68
69// Header C
70#include <cstdio>
71#include <cstring>
72
73// Headers Lorene
74#include "map.h"
75#include "graphique.h"
76
77namespace Lorene {
78void des_map_et(const Map_et& mp, int lz) {
79
80 double pzero = 1.e-14 ;
81
82 char nom_zone[3] ;
83 sprintf(nom_zone, "%d", lz) ;
84
85 char title[50] ;
86 char nomy[50] ;
87 char nom_k[4] ;
88
89 char bslash[2] = {92, '\0'} ; // 92 is the ASCII code for the backslash
90 // character
91
92 strcpy(nomy, "log(abs( c" ) ;
93 strcat(nomy, bslash) ;
94 strcat(nomy, "dkj" ) ;
95 strcat(nomy, bslash) ;
96 strcat(nomy, "u ))" ) ;
97
98 const char* device = 0x0 ;
99 int newgraph = 1 ; // to open the graphic device
100 int nxpage = 2 ;
101 int nypage = 2 ;
102
103 int np = mp.get_mg()->get_np(lz) ;
104
105 int k ;
106 if ( (lz == 0) && (np > 1) ) {
107 k = 2 ;
108 }
109 else {
110 k = 0 ;
111 }
112 sprintf(nom_k, "%d", k) ;
113
114 strcpy(title, " ") ;
115 strcat(title, "Theta coef. of F for k=" ) ;
116 strcat(title, nom_k) ;
117 strcat(title, " (domain ") ;
118 strcat(title, nom_zone) ;
119 strcat(title, ")") ;
120
121 des_coef_theta(mp.get_ff(), lz, k, 0, pzero, nomy, title, device,
122 newgraph, nxpage, nypage) ;
123
124 k = 0 ;
125 sprintf(nom_k, "%d", k) ;
126 strcpy(title, " ") ;
127 strcat(title, "Theta coef. of G for k=" ) ;
128 strcat(title, nom_k) ;
129 strcat(title, " (domain ") ;
130 strcat(title, nom_zone) ;
131 strcat(title, ")") ;
132
133 newgraph = 0 ; // graphic device already opened
134 if (np == 1) newgraph = 2 ;
135 des_coef_theta(mp.get_gg(), lz, k, 0, pzero, nomy, title, device,
136 newgraph, nxpage, nypage) ;
137
138 if (np > 1) {
139
140 k = (lz == 0) ? 3 : 2 ;
141
142 sprintf(nom_k, "%d", k) ;
143
144 strcpy(title, " ") ;
145 strcat(title, "Theta coef. of F for k=" ) ;
146 strcat(title, nom_k) ;
147 strcat(title, " (domain ") ;
148 strcat(title, nom_zone) ;
149 strcat(title, ")") ;
150 des_coef_theta(mp.get_ff(), lz, k, 0, pzero, nomy, title, device,
151 newgraph, nxpage, nypage) ;
152
153
154 k = (lz == 0) ? 4 : 2 ;
155
156 sprintf(nom_k, "%d", k) ;
157
158 strcpy(title, " ") ;
159 strcat(title, "Theta coef. of G for k=" ) ;
160 strcat(title, nom_k) ;
161 strcat(title, " (domain ") ;
162 strcat(title, nom_zone) ;
163 strcat(title, ")") ;
164
165 newgraph = 2 ; // closes the graphic device
166 des_coef_theta(mp.get_gg(), lz, k, 0, pzero, nomy, title, device,
167 newgraph, nxpage, nypage) ;
168
169 int j = 0 ;
170
171 strcpy(title, " ") ;
172 strcat(title, "Phi coef. of F for j=0 (domain ") ;
173 strcat(title, nom_zone) ;
174 strcat(title, ")") ;
175
176 newgraph = 1 ;
177 nxpage = 2 ;
178 nypage = 1 ;
179 des_coef_phi(mp.get_ff(), lz, j, 0, pzero, nomy, title, device,
180 newgraph, nxpage, nypage) ;
181
182 strcpy(title, " ") ;
183 strcat(title, "Phi coef. of G for j=0 (domain ") ;
184 strcat(title, nom_zone) ;
185 strcat(title, ")") ;
186
187 newgraph = 2 ;
188 des_coef_phi(mp.get_gg(), lz, j, 0, pzero, nomy, title, device,
189 newgraph, nxpage, nypage) ;
190
191 }
192
193}
194}
Radial mapping of rather general form.
Definition map.h:2770
Lorene prototypes.
Definition app_hor.h:67