GRDPWR is a PIL command which creates non-BFC grids, whether CARTES is true or false.
It is a command with four arguments, namely:
To avoid repetition, all the following examples relate to the time dimension; but they are equally valid for X, Y and Z.
GRDPWR(T, 10, 50.0, 2.0)
sets:
LSTEP=10; TLAST=50.0
and the LSTEP elements of the array TFRAC, as:
TFRAC(i) = ( i / LSTEP ) ** 2.0 .
When the exponent, i.e. the last argument of GRDPWR, is 1.0, the grid is therefore uniform.
When it is greater than 1.0, then low-i intervals are smaller than the high-i ones; and when it is less than 1.0 the reverse is true.
GRDPWR(T, 10, 50.0, -2.0)
which differs from example 1 in having a negative fourth argument, sets the elements of the TFRAC array as:
TFRAC(i)=1.0 - ( (LSTEP-i) / (LSTEP) ) ** 2.0 .
The consequence is now that when the exponent is greater than 1.0, the low-i intervals are smaller than the high-i ones; and when it is less than 1.0 the reverse is true.
The above examples represent power-law grids starting from the time=0.0 and time=TLAST respectively.
A symmetrical grid, consisting of power-law grids, which start from each end of the dimension and meet in the middle, can be formed by inserting a minus sign in front of the number of intervals, as in:
GRDPWR(T, -10, 50.0, 2.0)
GRDPWR can also create so-called 'geometric-progression' grids, in which each interval is a constant factor times its predecessor.
This is effected by placing a minus sign in front of the third argument, thus:
GRDPWR(T, 10, -50.0, 1.1)
This has the effect of setting:
TFRAC(i+1) = 1.1 * TFRAC(i) and of multiplying all the TFRACs by the constant multiplier which ensures that they sum to unity.
Minus signs in front of the second and third arguments have the same effects as before: the former replaces i by LSTEP+1-i; and the latter makes the grid symmetrical.
The total extent of the dimension can be divided into 'regions' by setting NREGT (or of course NREGX, NREGY, NREGZ) to be a number in excess of unity.
The GRDPWR command can then be set separately for each region, as in the following example:
NREGT=2
IREGT=1; GRDPWR(T, 10, 10.0, 1.5)
IREGT=2; GRDPWR(T, 5, 10.0, 1.0)
This will set:
LSTEP=15 (ie the sum of the second arguments) and TLAST=20.0 (ie the sum of the third arguments), with a power-law distribution for the first 10 time-steps over 10s and a uniform distribution for the last 5 steps over the next 10s.
Minus signs have the same significances as before.
wbs