manpagez: man pages & more
info mathgl
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.17 Data filling (MGL)

MGL command: fill dat v1 v2 ['dir'='x']

Equidistantly fills the data values to range [x1, x2] in direction dir={‘x’,‘y’,‘z’}.

MGL command: fill dat 'eq'
MGL command: fill dat 'eq' vdat
MGL command: fill dat 'eq' vdat wdat

Command 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 (in difference from modify commands). Variable ‘u’ is the original value of the array. Variables ‘v’ and ‘w’ are values of vdat, wdat.

MGL command: modify dat 'eq' [dim=0]
MGL command: modify dat 'eq' vdat
MGL command: modify dat 'eq' vdat wdat

Command 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 range [0,1]. Variable ‘u’ is the original value of the array. If dim>0 is specified then modification will be fulfilled only for slices >=dim.

MGL command: put dat val [i=: j=: k=:]

Function sets value(s) of array dat[i, j, k] = val. Negative indexes i, j, k=‘:’ set the value val to whole range in corresponding direction(s). For example, put dat val : 0 : sets dat[i,0,j]=val for i=0...(dat.nx-1), j=0...(dat.nz-1).

MGL command: put dat vdat [i=: j=: k=:]

Function copies value(s) from array vdat to the range of array dat. Negative indexes i, j, k=‘:’ set the range in corresponding direction(s). At this minor dimensions of array vdat should be large than corresponding dimensions of array dat. For example, put dat v : 0 : sets dat[i,0,j]=vdat.ny>dat.nz ? vdat[i,j] : vdat[i], where i=0...(dat.nx-1), j=0...(dat.nz-1) and condition vdat.nx>=dat.nx is true.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2024
Individual documents may contain additional copyright information.