| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
8.20 Data filling (Pure C)
- C function:
voidmgl_data_fill (HMDTdat,floatx1,floatx2,chardir) Equidistantly fills the data values to range [x1, x2] in direction dir={‘x’,‘y’,‘z’}.
- C function:
voidmgl_data_fill (HMGLgr,HMDTdat,const char *eq,const HMDT *vdat,const HMDT *wdat) 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 bounding box of gr (in difference from
Modifyfunctions). Variable ‘u’ is the original value of the array. Variables ‘v’ and ‘w’ are values of vdat, wdat which can beNULL(i.e. can be omitted).
- C function:
voidmgl_data_modify (HMDTdat,const char *eq,intdim) Function fills the value of array according to the formula in string eq. Formula is an arbitrary expression depending on variables ‘x’, ‘y’, ‘z’, ‘u’. Coordinates ‘x’, ‘y’, ‘z’ are data indexes normalized in interval [0,1]. Variable ‘u’ is the original value of the array. Modification will be fulfilled only for slices >=dim.
- C function:
voidmgl_data_modify_vw (HMDTdat,const char *eq,const HMDTv,const HMDTw) Function 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 data indexes normalized in interval [0,1]. Variable ‘u’ is the original value of the array. Variables ‘v’ and ‘w’ are values of vdat, wdat which can be
NULL(i.e. can be ommited).
- mglData:
voidmgl_data_put_val (HMDTa,floatval,inti,intj,intk) Function sets value(s) of array a[i, j, k] = val. Negative indexes i, j, k=-1 set the value val to whole range in corresponding direction(s). For example,
mgl_data_put_val(a,val,-1,0,-1);sets a[i,0,j]=val for i=0...(a.nx-1), j=0...(a.nz-1).
- mglData:
voidmgl_data_put_dat (HMDTa,const HMDTv,inti,intj,intk) Function copies value(s) from array v to the range of array a. Negative indexes i, j, k=-1 set the range in corresponding direction(s). At this minor dimensions of array v should be large than corresponding dimensions of array a. For example,
mgl_data_put_dat(a,v,-1,0,-1);sets a[i,0,j]=v.ny>nz ? v[i,j] : v[i], where i=0...(a.nx-1), j=0...(a.nz-1) and condition v.nx>=a.nx is true.
- C function:
voidmgl_data_set_value (HMDTdat,floatv,inti,intj,intk) Sets the value in specified cell of the data with border checking.
- C function:
floatmgl_data_get_value (HMDTdat,inti,intj,intk) Gets the value in specified cell of the data with border checking.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
