92#include "utilitaires.h"
98void des_coupe_y(
const Cmp& uu,
double y0,
int nzdes,
const char* title,
99 const Cmp* defsurf,
double zoom,
bool draw_bound,
100 int ncour,
int nx,
int nz) {
102 const Map& mp = *(uu.get_mp()) ;
104 double a1 = mp.val_r(nzdes-1, 1., M_PI/2., 0.) ;
105 double a2 = mp.val_r(nzdes-1, 1., M_PI/2., M_PI/2.) ;
106 double a3 = mp.val_r(nzdes-1, 1., M_PI/2., M_PI) ;
107 double ray = mp.val_r(nzdes-1, 1., 0., 0.) ;
109 ray = ( a1 > ray ) ? a1 : ray ;
110 ray = ( a2 > ray ) ? a2 : ray ;
111 ray = ( a3 > ray ) ? a3 : ray ;
115 double x_min = mp.get_ori_x() - ray ;
116 double x_max = mp.get_ori_x() + ray ;
117 double z_min = mp.get_ori_z() - ray ;
118 double z_max = mp.get_ori_z() + ray ;
120 des_coupe_y(uu, y0, x_min, x_max, z_min, z_max, title, defsurf, draw_bound,
127void des_coupe_y(
const Cmp& uu,
double y0,
double x_min,
double x_max,
128 double z_min,
double z_max,
const char* title,
const Cmp* defsurf,
129 bool draw_bound,
int ncour,
int nx,
int nz) {
131 using namespace Unites ;
133 const Map& mp = *(uu.get_mp()) ;
138 float* uutab =
new float[nx*nz] ;
140 double hx = (x_max - x_min) /
double(nx-1) ;
141 double hza = (z_max - z_min) /
double(nz-1) ;
145 for (
int j=0; j<nz; j++) {
147 double z = z_min + hza * j ;
149 for (
int i=0; i<nx; i++) {
151 double x = x_min + hx * i ;
154 double r, theta,
phi ;
155 mp.convert_absolute(
x, y0,
z,
r, theta,
phi) ;
157 uutab[nx*j+i] = float(uu.val_point(
r, theta,
phi)) ;
161 float xmin1 = float(x_min / km) ;
162 float xmax1 = float(x_max / km) ;
163 float zmin1 = float(z_min / km) ;
164 float zmax1 = float(z_max / km) ;
166 const char* nomx =
"x [km]" ;
167 const char* nomz =
"z [km]" ;
174 const char* device = 0x0 ;
175 int newgraph = ( (defsurf != 0x0) || draw_bound ) ? 1 : 3 ;
177 des_equipot(uutab, nx, nz, xmin1, xmax1, zmin1, zmax1, ncour, nomx, nomz,
178 title, device, newgraph) ;
183 if (defsurf != 0x0) {
185 assert(defsurf->get_mp() == uu.get_mp()) ;
187 newgraph = draw_bound ? 0 : 2 ;
189 des_surface_y(*defsurf, y0, device, newgraph) ;
200 int ndom = mp.get_mg()->get_nzone() ;
202 for (
int l=0; l<ndom-1; l++) {
205 newgraph = (l == ndom-2) ? 2 : 0 ;
207 des_domaine_y(mp, l, y0, device, newgraph) ;
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Coord z
z coordinate centered on the grid
Map(const Mg3d &)
Constructor from a multi-domain 3D grid.
Coord phi
coordinate centered on the grid
Coord x
x coordinate centered on the grid
Coord r
r coordinate centered on the grid