Following the computational algorithm developed by Bruma & Cuperman (1996) for the calculation of horizontal derivatives in problems of the type studied here, we use a ``flexible" fourteen-grid-point formulation designed to achieve optimal accuracy.
1. Denote by the coordinates of a set of equidistant grid points along the x-axis and by .., ,.. the values of the function F at the corresponding grid points; here F stands for either or . Also, use the notation . , where represents the equidistant grid size.
2. Concerning the meaning of subscripts used: (a) the subscripts define a ``moving" set of fifteen grid-point numbers; (b) the subscripts indicate the order of the moving-set along the x-axis, starting at (where i = 1 ) and ending at
3. At a point , the optimal value of the derivative is obtained through a systematic investigation leading to the minimization of the relative error involved. This procedure leads to one of the following two possibilities: (a) use of a symmetric fourteen-point formula, with seven points on each side of the point or, (b) use of a non-symmetric variable-number-of-terms-formula at the left or at the right of .
For illustration, in the case (a), one has
For the case (b)
A complete description on the general algorithm, including the criteria for the selection of the formulas for the horizontal derivations is given in Bruma & Cuperman (1996).