91#include "utilitaires.h"
97void des_coupe_x(
const Cmp& uu,
double x0,
int nzdes,
const char* title,
98 const Cmp* defsurf,
double zoom,
bool draw_bound,
99 int ncour,
int ny,
int nz) {
101 const Map& mp = *(uu.get_mp()) ;
103 double a1 = mp.val_r(nzdes-1, 1., M_PI/2., 0.) ;
104 double a2 = mp.val_r(nzdes-1, 1., M_PI/2., M_PI/2.) ;
105 double a3 = mp.val_r(nzdes-1, 1., M_PI/2., M_PI) ;
106 double ray = mp.val_r(nzdes-1, 1., 0., 0.) ;
108 ray = ( a1 > ray ) ? a1 : ray ;
109 ray = ( a2 > ray ) ? a2 : ray ;
110 ray = ( a3 > ray ) ? a3 : ray ;
114 double y_min = mp.get_ori_y() - ray ;
115 double y_max = mp.get_ori_y() + ray ;
116 double z_min = mp.get_ori_z() - ray ;
117 double z_max = mp.get_ori_z() + ray ;
119 des_coupe_x(uu, x0, y_min, y_max, z_min, z_max, title, defsurf, draw_bound,
128void des_coupe_x(
const Cmp& uu,
double x0,
double y_min,
double y_max,
129 double z_min,
double z_max,
const char* title,
const Cmp* defsurf,
130 bool draw_bound,
int ncour,
int ny,
int nz) {
132using namespace Unites ;
134 const Map& mp = *(uu.get_mp()) ;
139 float* uutab =
new float[ny*nz] ;
141 double hy = (y_max - y_min) /
double(ny-1) ;
142 double hza = (z_max - z_min) /
double(nz-1) ;
144 for (
int j=0; j<nz; j++) {
146 double z = z_min + hza * j ;
148 for (
int i=0; i<ny; i++) {
150 double y = y_min + hy * i ;
153 double r, theta,
phi ;
154 mp.convert_absolute(x0,
y,
z,
r, theta,
phi) ;
156 uutab[ny*j+i] = float(uu.val_point(
r, theta,
phi)) ;
160 float ymin1 = float(y_min / km) ;
161 float ymax1 = float(y_max / km) ;
162 float zmin1 = float(z_min / km) ;
163 float zmax1 = float(z_max / km) ;
165 const char* nomy =
"y [km]" ;
166 const char* nomz =
"z [km]" ;
172 const char* device = 0x0 ;
173 int newgraph = ( (defsurf != 0x0) || draw_bound ) ? 1 : 3 ;
175 des_equipot(uutab, ny, nz, ymin1, ymax1, zmin1, zmax1, ncour, nomy, nomz,
176 title, device, newgraph) ;
183 if (defsurf != 0x0) {
185 assert(defsurf->get_mp() == uu.get_mp()) ;
187 newgraph = draw_bound ? 0 : 2 ;
189 des_surface_x(*defsurf, x0, device, newgraph) ;
199 int ndom = mp.get_mg()->get_nzone() ;
201 for (
int l=0; l<ndom-1; l++) {
204 newgraph = (l == ndom-2) ? 2 : 0 ;
206 des_domaine_x(mp, l, x0, device, newgraph) ;
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Coord z
z coordinate centered on the grid
Coord y
y coordinate centered on the grid
Map(const Mg3d &)
Constructor from a multi-domain 3D grid.
Coord phi
coordinate centered on the grid
Coord r
r coordinate centered on the grid