00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 char des_coef_valeur_C[] = "$Header: /cvsroot/Lorene/C++/Source/Non_class_members/Graphics/des_coef_valeur.C,v 1.2 2008/08/19 06:42:00 j_novak Exp $" ;
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065 #include <stdlib.h>
00066 #include <string.h>
00067
00068
00069 #include "valeur.h"
00070 #include "graphique.h"
00071
00072
00073
00074
00075
00076 void des_coef_xi(const Valeur& uu, int l, int k, int j, double pzero,
00077 const char* nomy, const char* title, const char* device,
00078 int newgraph, int nxpage, int nypage) {
00079
00080 assert(uu.get_etat() != ETATNONDEF) ;
00081 uu.coef() ;
00082
00083 int nr = uu.get_mg()->get_nr(l) ;
00084
00085 double* cf = new double[nr] ;
00086
00087
00088
00089 if (uu.get_etat() == ETATZERO) {
00090 for (int i=0; i<nr; i++) {
00091 cf[i] = 0 ;
00092 }
00093 }
00094 else{
00095 assert(uu.get_etat() == ETATQCQ) ;
00096 for (int i=0; i<nr; i++) {
00097 cf[i] = (*(uu.c_cf))(l, k, j, i) ;
00098 }
00099 }
00100
00101 const char* nomx = "i" ;
00102
00103 char title1[80] ;
00104 char nomy1[80] ;
00105 char bslash[2] = {92, '\0'} ;
00106
00107 char nom_l[3] ;
00108 sprintf(nom_l, "%d", l) ;
00109 char nom_k[4] ;
00110 sprintf(nom_k, "%d", k) ;
00111 char nom_j[4] ;
00112 sprintf(nom_j, "%d", j) ;
00113
00114 if (title == 0x0) {
00115 strcpy(title1, bslash ) ;
00116 strcat(title1, "gc coef. for k=" ) ;
00117 strcat(title1, nom_k) ;
00118 strcat(title1, ", j=" ) ;
00119 strcat(title1, nom_j) ;
00120 strcat(title1, " (domain " ) ;
00121 strcat(title1, nom_l) ;
00122 strcat(title1, ")" ) ;
00123 }
00124 else{
00125 strncpy(title1, title, 80) ;
00126 }
00127
00128 if (nomy == 0x0) {
00129 strcpy(nomy1, "log| c" ) ;
00130 strcat(nomy1, bslash ) ;
00131 strcat(nomy1, "d" ) ;
00132 strcat(nomy1, nom_k ) ;
00133 strcat(nomy1, "," ) ;
00134 strcat(nomy1, nom_j ) ;
00135 strcat(nomy1, "," ) ;
00136 strcat(nomy1, "i" ) ;
00137 strcat(nomy1, bslash ) ;
00138 strcat(nomy1, "u |" ) ;
00139 }
00140 else{
00141 strncpy(nomy1, nomy, 80) ;
00142 }
00143
00144 des_coef(cf, nr, pzero, nomx, nomy1, title1, device, newgraph,
00145 nxpage, nypage) ;
00146
00147 delete [] cf ;
00148
00149 }
00150
00151
00152
00153
00154
00155 void des_coef_theta(const Valeur& uu, int l, int k, int i, double pzero,
00156 const char* nomy, const char* title, const char* device,
00157 int newgraph, int nxpage, int nypage) {
00158
00159 assert(uu.get_etat() != ETATNONDEF) ;
00160 uu.coef() ;
00161
00162 int nt = uu.get_mg()->get_nt(l) ;
00163
00164 double* cf = new double[nt] ;
00165
00166
00167
00168 if (uu.get_etat() == ETATZERO) {
00169 for (int j=0; j<nt; j++) {
00170 cf[j] = 0 ;
00171 }
00172 }
00173 else{
00174 assert(uu.get_etat() == ETATQCQ) ;
00175 for (int j=0; j<nt; j++) {
00176 cf[j] = (*(uu.c_cf))(l, k, j, i) ;
00177 }
00178 }
00179
00180 const char* nomx = "j" ;
00181
00182 char title1[80] ;
00183 char nomy1[80] ;
00184 char bslash[2] = {92, '\0'} ;
00185
00186 char nom_l[3] ;
00187 sprintf(nom_l, "%d", l) ;
00188 char nom_k[4] ;
00189 sprintf(nom_k, "%d", k) ;
00190 char nom_i[4] ;
00191 sprintf(nom_i, "%d", i) ;
00192
00193 if (title == 0x0) {
00194 strcpy(title1, bslash ) ;
00195 strcat(title1, "gh coef. for k=" ) ;
00196 strcat(title1, nom_k) ;
00197 strcat(title1, ", i=" ) ;
00198 strcat(title1, nom_i) ;
00199 strcat(title1, " (domain " ) ;
00200 strcat(title1, nom_l) ;
00201 strcat(title1, ")" ) ;
00202 }
00203 else{
00204 strncpy(title1, title, 80) ;
00205 }
00206
00207 if (nomy == 0x0) {
00208 strcpy(nomy1, "log| c" ) ;
00209 strcat(nomy1, bslash ) ;
00210 strcat(nomy1, "d" ) ;
00211 strcat(nomy1, nom_k ) ;
00212 strcat(nomy1, ",j," ) ;
00213 strcat(nomy1, nom_i ) ;
00214 strcat(nomy1, bslash ) ;
00215 strcat(nomy1, "u |" ) ;
00216 }
00217 else{
00218 strncpy(nomy1, nomy, 80) ;
00219 }
00220
00221 des_coef(cf, nt, pzero, nomx, nomy1, title1, device, newgraph,
00222 nxpage, nypage) ;
00223
00224 delete [] cf ;
00225
00226 }
00227
00228
00229
00230
00231
00232
00233 void des_coef_phi(const Valeur& uu, int l, int j, int i, double pzero,
00234 const char* nomy, const char* title, const char* device,
00235 int newgraph, int nxpage, int nypage) {
00236
00237 assert(uu.get_etat() != ETATNONDEF) ;
00238 uu.coef() ;
00239
00240 int np = uu.get_mg()->get_np(l) + 2 ;
00241
00242 double* cf = new double[np] ;
00243
00244
00245
00246 if (uu.get_etat() == ETATZERO) {
00247 for (int k=0; k<np; k++) {
00248 cf[k] = 0 ;
00249 }
00250 }
00251 else{
00252 assert(uu.get_etat() == ETATQCQ) ;
00253 for (int k=0; k<np; k++) {
00254 cf[k] = (*(uu.c_cf))(l, k, j, i) ;
00255 }
00256 }
00257
00258 const char* nomx = "k" ;
00259
00260 char title1[80] ;
00261 char nomy1[80] ;
00262 char bslash[2] = {92, '\0'} ;
00263
00264 char nom_l[3] ;
00265 sprintf(nom_l, "%d", l) ;
00266 char nom_j[4] ;
00267 sprintf(nom_j, "%d", j) ;
00268 char nom_i[4] ;
00269 sprintf(nom_i, "%d", i) ;
00270
00271 if (title == 0x0) {
00272 strcpy(title1, bslash ) ;
00273 strcat(title1, "gf coef. for j=" ) ;
00274 strcat(title1, nom_j) ;
00275 strcat(title1, ", i=" ) ;
00276 strcat(title1, nom_i) ;
00277 strcat(title1, " (domain " ) ;
00278 strcat(title1, nom_l) ;
00279 strcat(title1, ")" ) ;
00280 }
00281 else{
00282 strncpy(title1, title, 80) ;
00283 }
00284
00285 if (nomy == 0x0) {
00286 strcpy(nomy1, "log| c" ) ;
00287 strcat(nomy1, bslash ) ;
00288 strcat(nomy1, "dk," ) ;
00289 strcat(nomy1, nom_j ) ;
00290 strcat(nomy1, "," ) ;
00291 strcat(nomy1, nom_i ) ;
00292 strcat(nomy1, bslash ) ;
00293 strcat(nomy1, "u |" ) ;
00294 }
00295 else{
00296 strncpy(nomy1, nomy, 80) ;
00297 }
00298
00299 des_coef(cf, np, pzero, nomx, nomy1, title1, device, newgraph,
00300 nxpage, nypage) ;
00301
00302 delete [] cf ;
00303
00304 }