77 #include "graphique.h" 83 void des_profile(
const Cmp& uu,
double r_min,
double r_max,
84 double theta,
double phi,
const char* nomy,
const char* title) {
92 double hr = (r_max - r_min) /
double(npt-1) ;
94 for (
int i=0; i<npt; i++) {
96 double r = hr * i + r_min ;
98 uutab[i] = float(uu.val_point(r, theta, phi)) ;
102 float xmin = float(r_min / km) ;
103 float xmax = float(r_max / km) ;
105 const char* nomx =
"r [km]" ;
116 des_profile(uutab, npt, xmin, xmax, nomx, nomy, title) ;
122 void des_profile(
const Cmp& uu,
double r_min,
double r_max,
double scale,
123 double theta,
double phi,
const char* nomx,
const char* nomy,
const char* title) {
126 const int npt = 400 ;
130 double hr = (r_max - r_min) /
double(npt-1) ;
132 for (
int i=0; i<npt; i++) {
134 double r = hr * i + r_min ;
136 uutab[i] = float(uu.val_point(r, theta, phi)) ;
140 float xmin = float(r_min * scale) ;
141 float xmax = float(r_max * scale) ;
157 des_profile(uutab, npt, xmin, xmax, nomx, nomy, title) ;
Standard units of space, time and mass.
void des_profile(const float *uutab, int nx, float xmin, float xmax, const char *nomx, const char *nomy, const char *title, const char *device=0x0, int nbound=0, float *xbound=0x0, bool logscale=false)
Basic routine for drawing a single profile with uniform x sampling.