| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
4.17 Data manipulation
- MGL command: hist RES xdat adat
- MGL command: hist RES xdat ydat adat
- MGL command: hist RES xdat ydat zdat adat
- Method on
mglGraph:mglDataHist (const mglData &x,const mglData &a,const char *opt="") - Method on
mglGraph:mglDataHist (const mglData &x,const mglData &y,const mglData &a,const char *opt="") - Method on
mglGraph:mglDataHist (const mglData &x,const mglData &y,const mglData &z,const mglData &a,const char *opt="") - C function:
HMDTmgl_hist_x (HMGLgr,HCDTx,HCDTa,const char *opt) - C function:
HMDTmgl_hist_xy (HMGLgr,HCDTx,HCDTy,HCDTa,const char *opt) - C function:
HMDTmgl_hist_xyz (HMGLgr,HCDTx,HCDTy,HCDTz,HCDTa,const char *opt) These functions make distribution (histogram) of data. They do not draw the obtained data themselves. These functions can be useful if user have data defined for random points (for example, after PIC simulation) and he want to produce a plot which require regular data (defined on grid(s)). The range for grids is always selected as axis range. Arrays x, y, z define the positions (coordinates) of random points. Array a define the data value. Number of points in output array res is selected as maximal value of res size and the value of mglFitPnts.
- MGL command: fill dat 'eq'
- MGL command: fill dat 'eq' vdat
- MGL command: fill dat 'eq' vdat wdat
- Method on
mglGraph:voidFill (mglData &u,const char *eq,const char *opt="") - Method on
mglGraph:voidFill (mglData &u,const char *eq,const mglData &v,const char *opt="") - Method on
mglGraph:voidFill (mglData &u,const char *eq,const mglData &v,const mglData &w,const char *opt="") - C function:
voidmgl_data_fill_eq (HMGLgr,HMDTu,const char *eq,HCDTv,HCDTw,const char *opt) Fills the value of array according to the formula in string eq. Formula is an arbitrary expression depending on variables ‘x’, ‘y’, ‘z’, ‘u’, ‘v’, ‘w’. Coordinates ‘x’, ‘y’, ‘z’ are supposed to be normalized in axis range. Variable ‘u’ is the original value of the array. Variables ‘v’ and ‘w’ are values of arrays v, w which can be
NULL(i.e. can be omitted).
- MGL command: pde RES 'ham' ini_re ini_im [
dz=0.1 k0=100] - Method on
mglGraph:mglDataPDE (const char *ham,const mglData &ini_re,const mglData &ini_im,floatdz=0.1,floatk0=100,const char *opt="") - C function:
HMDTmgl_pde_solve (HMGLgr,const char *ham,HCDTini_re,HCDTini_im,floatdz,floatk0,const char *opt) Solves equation du/dz = i*k0*ham(p,q,x,y,z,|u|)[u], where p=-i/k0*d/dx, q=-i/k0*d/dy are pseudo-differential operators. Parameters ini_re, ini_im specify real and imaginary part of initial field distribution. Parameters Min, Max set the bounding box for the solution. Note, that really this ranges are increased by factor 3/2 for purpose of reducing reflection from boundaries. Parameter dz set the step along evolutionary coordinate z. At this moment, simplified form of function ham is supported – all “mixed” terms (like ‘x*p’->x*d/dx) are excluded. For example, in 2D case this function is effectively ham = f(p,z) + g(x,z,u). However commutable combinations (like ‘x*q’->x*d/dy) are allowed. Here variable ‘u’ is used for field amplitude |u|. This allow one solve nonlinear problems – for example, for nonlinear Shrodinger equation you may set
ham="p^2 + q^2 - u^2". You may specify imaginary part for wave absorption, likeham = "p^2 + i*x*(x>0)", but only if dependence on variable ‘i’ is linear (i.e. ham = hre+i*him). See section PDE solving hints, for sample code and picture.
| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on April 13, 2012 using texi2html 5.0.
