Generated from /asc/asci2/site/flashcode/secure/release_4p5/source/numericalTools/Interpolate/Interpolate_cubic2DFd1.F90 with ROBODoc v4.99.8 on Tue Mar 05 16:16:16 2019


[Functions] source/numericalTools/Interpolate/Interpolate_cubic2DFd1





  Interpolate_cubic2DFd1 (real, intent (in) :: a (1:16),
                          real, intent (in) :: x,
                          real, intent (in) :: y)


  Calculates the function value and all rescaled 1st derivative values for a pair [x,y]
  of rescaled [0,1] coordinates and the 16 bicubic expansion coefficients. The bicubic
  expansion reads, for one square, in terms of rescaled [0,1] x,y coordinates:

                                   3   3            i j
                        F (x,y) = sum sum  a (i,j) x y
                                  i=0 j=0

  The order of the supplied expansion coefficients a (i,j) must be such, that the
  j index has the highest ranking, followed by the i index. The overall location index
  of the a (i,j) inside the 16-dimensional vector is given by the following formula:

                location index of (i,j)  =  1 + i + 4j

  The rescaled derivatives are given by the general formula:

                 r+s    r  s    3   3                         i-r j-s
                d   / dx dy  = sum sum (i) * (j) * a (i,j) * x   y
                               i=r j=s    r     s

  where the Pochhammer symbols are defined as:

                  (i)  = i * (i-1) * (i-2) * ... * (i-r+1)

  The rescaled derivatives are therefore also sums of appropriate expansion coefficients
  times monomial products. From the general formula we see, that the highest non-zero
  derivative is of 6-th order.

  Since this function is (potentially) called many times from external applications,
  efficiency is key here and intermediate common summation terms are reused as much as
  possible. The strategy is partial summation and reduction at each index summation stage.
  The individual x- and y-coordinate cubic polynomial sections are always evaluated
  using the Horner scheme to minimize accumulation of computation rounding errors.


  a (i) : the i-th bicubic expansion coefficient
  x     : rescaled [0,1] x coordinate
  y     : rescaled [0,1] y coordinate


  1) The function is defined as a real array of size 3:

           Interpolate_cubic2DFd1 (1) = the function value
           Interpolate_cubic2DFd1 (2) = the rescaled d/dx value
           Interpolate_cubic2DFd1 (3) = the rescaled d/dy value

  2) The code checks, if the supplied pair [x,y] is rescaled.