Previous: fitvpt Up: ../plot79_f.html Next: fitvta


FITVSF

       SUBROUTINE  FITVSF (MD, NCP, NDP, XD, YD, ZD, NXI, NYI,
      X                    XI, YI, ZI, IWK, WK, IERROR)
 C$    (ALG526 - Smooth Surface Fitting)
 C$    This subroutine performs  smooth surface  fitting when  the
 C$    projections of  the  data  points  in  the  X-Y  plane  are
 C$    irregularly distributed in the plane.  The input parameters
 C$    are
 C$
 C$    MD.............Mode of computation (must be 1, 2, or 3),
 C$                   = 1 for new NCP and/or new XD-YD,
 C$                   = 2 for old NCP, old XD-YD, new XI-YI,
 C$                   = 3 for old NCP, old XD-YD, old XI-YI,
 C$    NCP............Number of  additional data  points used  for
 C$                   estimating partial derivatives at each  data
 C$                   point (must  be 2  or greater,  but  smaller
 C$                   than NDP),
 C$    NDP............Number of data points (must be 4 or greater),
 C$    XD(*)..........Array of dimension NDP containing the X
 C$                   coordinates of the data points,
 C$    YD(*)..........Array of dimension NDP containing the Y
 C$                   coordinates of the data points,
 C$    ZD(*)..........Array of dimension NDP containing the Z
 C$                   coordinates of the data points,
 C$    NXI............Number  of  output  grid  points  in  the  X
 C$                   coordinate (must be 1 or greater),
 C$    NYI............Number of output grid points in the Y
 C$                   coordinate (must be 1 or greater),
 C$    XI(*)..........Array of dimension NXI containing the X
 C$                   coordinates of the output grid points,
 C$    YI(*)..........Array of dimension NYI containing the Y
 C$                   coordinates of the output grid points.
 C$
 C$    The output parameters are
 C$
 C$    ZI(*,*)........Doubly-dimensioned   array   of    dimension
 C$                   (NXI,NYI), where the  interpolated Z  values
 C$                   at the output grid points are to be  stored.
 C$    IERROR.........0 (Normal return)
 C$                   1  (Abnormal  return.   a  message  will  be
 C$                   printed  giving  all   the  arguments,   and
 C$                   nothing more will be done)
 C$
 C$    The other parameters are
 C$
 C$    IWK(*).........INTEGER       array       of       dimension
 C$                   MAX0(31,27+NCP)*NDP    +    NXI*NYI     used
 C$                   internally as a work area,
 C$    WK(*)..........Array of dimension  5*NDP used internally as
 C$                   a work area.
 C$
 C$    The very first call to this subroutine and the call with  a
 C$    new NCP value, a new NDP value, and/or new contents of  the
 C$    XD and YD  arrays must be  made with MD=1.   The call  with
 C$    MD=2 must be preceded by another call with the same NCP and
 C$    NDP values and  with the  same contents  of the  XD and  YD
 C$    arrays.  The call  with MD=3  must be  preceded by  another
 C$    call with the same NCP, NDP,  NXI, and NYI values and  with
 C$    the same  contents  of  the  XD, YD,  XI,  and  YI  arrays.
 C$    Between the call with MD=2 or MD=3 and its preceding  call,
 C$    the IWK and  WK arrays  must not  be disturbed.   Use of  a
 C$    value between 3  and 5 (inclusive)  for NCP is  recommended
 C$    unless there are evidences that dictate otherwise.
 C$
 C$    This subroutine calls the  FITVCL, FITVGR, FITVPD,  FITVPT,
 C$    and FITVTA subroutines.
 C$
 C$    This routine  incorporates  the  corrections  published  in
 C$    Hiroshi Akima, "Remark on Algorithm 526", ACM Trans.  Math.
 C$    Software 5, No. 2, 242-243 (June 1979).
 C$
 C$    (03-APR-82)