functionGenerateGrid
Generate grid discretization from scale functions
Extends from ClaRa.Basics.Icons.Function.
Information
This function computes the discretization of a given interval I of length L into N cells.
The input SizeFunc[:] consists of a vector of signed reals, e.g {i_1,i_2,....,i_K}. The number K of reals corresponds to a subdivision of I into K subintervals I_K of length L/K. Accordingly every subinterval I_K contains (up to rounding) N/K cells. For each I_K the number i_K prescribes a distribution of cells. Here i_K=0 corresponds to equidistant cell spacing, i_K > 0 to increasing cell width from beginning to the end of I_K, i_K < 0 to decreasing cell width from beginning to the end of I_K. The modulus |i_K| determines the stretching rate.