des_map_et.C

00001 /*
00002  *  Plots the coefficients of the functions F_l(theta', phi') and
00003  *   G_l(theta',  phi') which define a mapping of the class Map_et.
00004  *
00005  * (see file graphique.h for the documentation).
00006  *
00007  */
00008 
00009 /*
00010  *   Copyright (c) 1999-2001 Eric Gourgoulhon
00011  *
00012  *   This file is part of LORENE.
00013  *
00014  *   LORENE is free software; you can redistribute it and/or modify
00015  *   it under the terms of the GNU General Public License as published by
00016  *   the Free Software Foundation; either version 2 of the License, or
00017  *   (at your option) any later version.
00018  *
00019  *   LORENE is distributed in the hope that it will be useful,
00020  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00021  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00022  *   GNU General Public License for more details.
00023  *
00024  *   You should have received a copy of the GNU General Public License
00025  *   along with LORENE; if not, write to the Free Software
00026  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00027  *
00028  */
00029 
00030 
00031 char des_map_et_C[] = "$Header: /cvsroot/Lorene/C++/Source/Non_class_members/Graphics/des_map_et.C,v 1.2 2008/08/19 06:42:00 j_novak Exp $" ;
00032 
00033 /*
00034  * $Id: des_map_et.C,v 1.2 2008/08/19 06:42:00 j_novak Exp $
00035  * $Log: des_map_et.C,v $
00036  * Revision 1.2  2008/08/19 06:42:00  j_novak
00037  * Minor modifications to avoid warnings with gcc 4.3. Most of them concern
00038  * cast-type operations, and constant strings that must be defined as const char*
00039  *
00040  * Revision 1.1.1.1  2001/11/20 15:19:29  e_gourgoulhon
00041  * LORENE
00042  *
00043  * Revision 2.4  2000/11/20  21:43:57  eric
00044  * Correction erreur affichage k=3 --> k=4 pour G.
00045  *
00046  * Revision 1.3  2000/11/14  15:12:27  eric
00047  * Traitement du cas np=1
00048  *
00049  * Revision 1.2  1999/12/20  14:48:42  eric
00050  * *** empty log message ***
00051  *
00052  * Revision 1.1  1999/12/20  14:27:36  eric
00053  * Initial revision
00054  *
00055  *
00056  * $Header: /cvsroot/Lorene/C++/Source/Non_class_members/Graphics/des_map_et.C,v 1.2 2008/08/19 06:42:00 j_novak Exp $
00057  *
00058  */
00059 
00060 // Header C
00061 #include <stdio.h>
00062 #include <string.h>
00063 
00064 // Headers Lorene
00065 #include "map.h"
00066 #include "graphique.h"
00067 
00068 void des_map_et(const Map_et& mp, int lz) {
00069     
00070     double pzero = 1.e-14 ; 
00071     
00072     char nom_zone[3] ; 
00073     sprintf(nom_zone, "%d", lz) ; 
00074     
00075     char title[50] ; 
00076     char nomy[50] ;
00077     char nom_k[4] ; 
00078     
00079     char bslash[2] = {92,  '\0'} ;  // 92 is the ASCII code for the backslash 
00080                     // character
00081 
00082     strcpy(nomy, "log(abs( c" ) ; 
00083     strcat(nomy, bslash) ; 
00084     strcat(nomy, "dkj" ) ; 
00085     strcat(nomy, bslash) ; 
00086     strcat(nomy, "u ))" ) ;     
00087      
00088     const char* device = 0x0 ; 
00089     int newgraph = 1 ;  // to open the graphic device
00090     int nxpage = 2 ; 
00091     int nypage = 2 ;     
00092 
00093     int np = mp.get_mg()->get_np(lz) ; 
00094 
00095     int k ; 
00096     if ( (lz == 0) && (np > 1) ) {
00097     k = 2 ;
00098     }
00099     else {
00100     k = 0 ; 
00101     }
00102     sprintf(nom_k, "%d", k) ; 
00103 
00104     strcpy(title, " ") ; 
00105     strcat(title, "Theta coef. of F for k=" ) ;
00106     strcat(title, nom_k) ; 
00107     strcat(title, " (domain ") ;
00108     strcat(title, nom_zone) ; 
00109     strcat(title, ")") ;  
00110 
00111     des_coef_theta(mp.get_ff(), lz, k, 0, pzero, nomy, title, device, 
00112                newgraph, nxpage, nypage) ;
00113 
00114     k = 0 ; 
00115     sprintf(nom_k, "%d", k) ; 
00116     strcpy(title, " ") ; 
00117     strcat(title, "Theta coef. of G for k=" ) ;
00118     strcat(title, nom_k) ; 
00119     strcat(title, " (domain ") ;
00120     strcat(title, nom_zone) ; 
00121     strcat(title, ")") ;  
00122 
00123     newgraph = 0 ;  // graphic device already opened
00124     if (np == 1) newgraph = 2 ; 
00125     des_coef_theta(mp.get_gg(), lz, k, 0, pzero, nomy, title, device, 
00126                newgraph, nxpage, nypage) ;
00127     
00128     if (np > 1) {
00129 
00130     k = (lz == 0) ? 3 : 2 ; 
00131         
00132     sprintf(nom_k, "%d", k) ; 
00133 
00134     strcpy(title, " ") ; 
00135     strcat(title, "Theta coef. of F for k=" ) ;
00136     strcat(title, nom_k) ; 
00137     strcat(title, " (domain ") ;
00138     strcat(title, nom_zone) ; 
00139     strcat(title, ")") ;  
00140     des_coef_theta(mp.get_ff(), lz, k, 0, pzero, nomy, title, device, 
00141                newgraph, nxpage, nypage) ;
00142     
00143     
00144     k = (lz == 0) ? 4 : 2 ; 
00145     
00146     sprintf(nom_k, "%d", k) ;
00147 
00148     strcpy(title, " ") ; 
00149     strcat(title, "Theta coef. of G for k=" ) ;
00150     strcat(title, nom_k) ; 
00151     strcat(title, " (domain ") ;
00152     strcat(title, nom_zone) ; 
00153     strcat(title, ")") ;  
00154 
00155     newgraph = 2 ;  // closes the graphic device
00156     des_coef_theta(mp.get_gg(), lz, k, 0, pzero, nomy, title, device, 
00157                newgraph, nxpage, nypage) ;
00158     
00159     int j = 0 ; 
00160 
00161     strcpy(title, " ") ; 
00162     strcat(title, "Phi coef. of F for j=0 (domain ") ;
00163     strcat(title, nom_zone) ; 
00164     strcat(title, ")") ;  
00165 
00166     newgraph = 1 ; 
00167     nxpage = 2 ; 
00168     nypage = 1 ; 
00169     des_coef_phi(mp.get_ff(), lz, j, 0, pzero, nomy, title, device, 
00170                newgraph, nxpage, nypage) ;
00171     
00172     strcpy(title, " ") ; 
00173     strcat(title, "Phi coef. of G for j=0 (domain ") ;
00174     strcat(title, nom_zone) ; 
00175     strcat(title, ")") ;  
00176 
00177     newgraph = 2 ; 
00178     des_coef_phi(mp.get_gg(), lz, j, 0, pzero, nomy, title, device, 
00179                newgraph, nxpage, nypage) ;
00180     
00181     }   
00182     
00183 }

Generated on Tue Feb 7 01:35:16 2012 for LORENE by  doxygen 1.4.6