亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? modified_quadratic_shepard_method.f90

?? FORTRAN程序 共有8個插值程序 希望能幫到大家
?? F90
?? 第 1 頁 / 共 4 頁
字號:
subroutine qshep3 ( n, x, y, z, f, nq, nw, nr, lcell, lnext, xyzmin, &
  xyzdel, rmax, rsq, a, ier )

!***********************************************************************
!
!! QSHEP3 defines a smooth trivariate interpolant of scattered 3D data.
!
!  Discussion:
!
!    This subroutine computes a set of parameters A and RSQ
!    defining a smooth (once continuously differentiable) trivariate 
!    function Q(X,Y,Z) which interpolates data values
!    F at scattered nodes (X,Y,Z).  The interpolant Q may be
!    evaluated at an arbitrary point by function QS3VAL, and
!    its first derivatives are computed by subroutine QS3GRD.
!
!    The interpolation scheme is a modified quadratic Shepard method:
!
!      Q = (W(1)*Q(1)+W(2)*Q(2)+..+W(N)*Q(N))/(W(1)+W(2)+..+W(N))
!
!    for trivariate functions W(K) and Q(K).  The nodal functions are 
!    given by
!
!      Q(K)(X,Y,Z) = 
!          A(1,K) * DX**2 
!        + A(2,K) * DX * DY 
!        + A(3,K) * DY**2
!        + A(4,K) * DX * DZ
!        + A(5,K) * DY * DZ 
!        + A(6,K) * DZ**2
!        + A(7,K) * DX 
!        + A(8,K) * DY 
!        + A(9,K) * DZ 
!        + F(K)
!
!    where DX = (X-X(K)), DY = (Y-Y(K)), and DZ = (Z-Z(K)).
!
!    Thus, Q(K) is a quadratic function which interpolates the
!    data value at node K.  Its coefficients A(*,K) are obtained
!    by a weighted least squares fit to the closest NQ data
!    points with weights similar to W(K).  Note that the radius
!    of influence for the least squares fit is fixed for each
!    K, but varies with K.
!
!    The weights are taken to be
!
!      W(K)(X,Y,Z) = ( (R(K)-D(K))+ / R(K)*D(K) )**2
!
!    where (R(K)-D(K))+ = 0 if R(K) <= D(K), and D(K)(X,Y,Z)
!    is the euclidean distance between (X,Y,Z) and node K.  The
!    radius of influence R(K) varies with K and is chosen so
!    that NW nodes are within the radius.  Note that W(K) is
!    not defined at node (X(K),Y(K),Z(K)), but Q(X,Y,Z) has
!    limit F(K) as (X,Y,Z) approaches (X(K),Y(K),Z(K)).
!
!  Author:
!
!    Robert Renka,
!    University of North Texas,
!    (817) 565-2767.
!
!  Reference:
!
!    Robert Renka,
!    Algorithm 661: QSHEP3D, Quadratic Shepard method for trivariate
!    interpolation of scattered data,
!    ACM Transactions on Mathematical Software,
!    Volume 14, 1988, pages 151-152.
!
!  Parameters:
!
!    Input, integer N, the number of nodes and associated data values.
!    10 <= N.
!
!    Input, real ( kind = 8 ) X(N), Y(N), Z(N), the coordinates of the nodes.
!
!    Input, real ( kind = 8 ) F(N), the data values at the nodes.
!
!    Input, integer NQ, the number of data points to be used in the least
!    squares fit for coefficients defining the nodal functions Q(K).  
!    A recommended value is NQ = 17.  9 <= NQ <= MIN ( 40, N-1 ).
!
!    Input, integer NW, the number of nodes within (and defining) the radii
!    of influence R(K) which enter into the weights W(K).  For N sufficiently
!    large, a recommended value is NW = 32.  1 <= NW <= min(40,N-1).
!
!    Input, integer NR, the number of rows, columns, and planes in the cell
!    grid defined in subroutine store3.  A box containing the nodes is
!    partitioned into cells in order to increase search efficiency.  
!    NR = (N/3)**(1/3) is recommended.  1 <= NR.
!
!    Output, integer LCELL(NR,NR,NR), nodal indices
!    associated with cells.  Refer to STORE3.
!
!    Output, integer LNEXT(N), next-node indices.  Refer to STORE3.
!
!    Output, real ( kind = 8 ) xyzmin(3), xyzdel(3), containing 
!    minimum nodal coordinates and cell dim-
!    ensions, respectively.  Refer to store3.
!
!    Output, real ( kind = 8 ) RMAX, square root of the largest element in 
!    RSQ, maximum radius R(K).
!
!    Output, real ( kind = 8 ) RSQ(N) = the squares of the radii r(k)
!    which enter into the weights W(K).
!
!    Output, real ( kind = 8 ) A(9,N), the coefficients for
!    quadratic nodal function Q(K) in column K.
!
!    Output, integer IER, error indicator.
!    0, if no errors were encountered.
!    1, if N, NQ, NW, or NR is out of range.
!    2, if duplicate nodes were encountered.
!    3, if all nodes are coplanar.
!
!  Local parameters:
!
! av =         root-mean-square distance between k and the
!     nodes in the least squares system (unless
!     additional nodes are introduced for stabil-
!     ity).  the first 6 columns of the matrix
!     are scaled by 1/avsq, the last 3 by 1/av
! avsq =       av*av
! b =         transpose of the augmented regression matrix
! c =         first component of the plane rotation used to
!     zero the lower triangle of b**t -- computed
!     by subroutine givens
! dmin =       minimum of the magnitudes of the diagonal
!     elements of the regression matrix after
!     zeros are introduced below the diagonal
! dtol =       tolerance for detecting an ill-conditioned
!     system.  the system is accepted when DTOL <= DMIN.
! fk =         data value at node k -- f(k)
! i =         index for a, b, npts, xyzmin, xyzmn, xyzdel,
!     and xyzdl
! ib =         do-loop index for back solve
! ierr =       error flag for the call to store3
! irm1 =       irow-1
! irow =       row index for b
! j =         index for a and b
! k =         nodal function index and column index for a
! lmax =       maximum number of npts elements (must be con-
!     sistent with the dimension statement above)
! lnp =        current length of npts
! neq =        number of equations in the least squares fit
! nn,nnq,nnr = local copies of n, nq, and nr
! nnw =        local copy of nw
! np =         npts element
! npts =       array containing the indices of a sequence of
!     nodes to be used in the least squares fit
!     or to compute rsq.  the nodes are ordered
!     by distance from k and the last element
!     (usually indexed by lnp) is used only to
!     determine rq, or rsq(k) if NQ < NW.
! nqwmax =     max(nq,nw)
! rq =         radius of influence which enters into the
!     weights for q(k) (see subroutine setup3)
! rs =         squared distance between k and npts(lnp) --
!     used to compute rq and rsq(k)
! rsmx =       maximum rsq element encountered
! rsold =      squared distance between k and npts(lnp-1) --
!     used to compute a relative change in rs
!     between succeeding npts elements
! rtol =       tolerance for detecting a sufficiently large
!     relative change in rs.  if the change is
!     not greater than rtol, the nodes are
!     treated as being the same distance from k
! rws =        current value of rsq(k)
! s =         second component of the plane givens rotation
! sf =         marquardt stabilization factor used to damp
!     out the first 6 solution components (second
!     partials of the quadratic) when the system
!     is ill-conditioned.  as sf increases, the
!     fitting function approaches a linear
! sum2 =        sum of squared euclidean distances between
!     node k and the nodes used in the least
!     squares fit (unless additional nodes are
!     added for stability)
! t =         temporary variable for accumulating a scalar
!     product in the back solve
! xk,yk,zk =   coordinates of node k -- x(k), y(k), z(k)
! xyzdl =      local variables for xyzdel
! xyzmn =      local variables for xyzmin
!
  implicit none

  integer n
  integer nr

  real ( kind = 8 ) a(9,n)
  real ( kind = 8 ) av
  real ( kind = 8 ) avsq
  real ( kind = 8 ) b(10,10)
  real ( kind = 8 ) c
  real ( kind = 8 ) dmin
  real ( kind = 8 ), parameter :: dtol = 0.01D+00
  real ( kind = 8 ) f(n)
  real ( kind = 8 ) fk
  integer i
  integer ib
  integer ier
  integer ierr
  integer irm1
  integer irow
  integer j
  integer k
  integer lcell(nr,nr,nr)
  integer lmax
  integer lnext(n)
  integer lnp
  integer neq
  integer nn
  integer nnq
  integer nnr
  integer nnw
  integer np
  integer npts(40)
  integer nq
  integer nqwmax
  integer nw
  real ( kind = 8 ) rmax
  real ( kind = 8 ) rq
  real ( kind = 8 ) rs
  real ( kind = 8 ) rsmx
  real ( kind = 8 ) rsold
  real ( kind = 8 ) rsq(n)
  real ( kind = 8 ), parameter :: rtol = 1.0D-05
  real ( kind = 8 ) rws
  real ( kind = 8 ) s
  real ( kind = 8 ), parameter :: sf = 1.0D+00
  real ( kind = 8 ) sum2
  real ( kind = 8 ) t
  real ( kind = 8 ) x(n)
  real ( kind = 8 ) xk
  real ( kind = 8 ) xyzdel(3)
  real ( kind = 8 ) xyzdl(3)
  real ( kind = 8 ) xyzmin(3)
  real ( kind = 8 ) xyzmn(3)
  real ( kind = 8 ) y(n)
  real ( kind = 8 ) yk
  real ( kind = 8 ) z(n)
  real ( kind = 8 ) zk

  nn = n
  nnq = nq
  nnw = nw
  nnr = nr
  nqwmax = max ( nnq, nnw )
  lmax = min ( 40, nn - 1 )

  if ( nnq < 9 ) then
    ier = 1
    return
  end if

  if ( nnw < 1 ) then
    ier = 1
    return
  end if

  if ( lmax < nqwmax ) then
    ier = 1
    return
  end if

  if ( nnr < 1 ) then
    ier = 1
    return
  end if
!
!  Create the cell data structure, and initialize RSMX.
!
  call store3 ( nn, x, y, z, nnr, lcell, lnext, xyzmn, xyzdl, ierr )

  if ( ierr /= 0 ) then
    xyzmin(1:3) = xyzmn(1:3)
    xyzdel(1:3) = xyzdl(1:3)
    ier = 3
    return
  end if

  rsmx = 0.0D+00
!
!  Outer loop on node K.
!
  do k = 1, nn

    xk = x(k)
    yk = y(k)
    zk = z(k)
    fk = f(k)
!
!  Mark node K to exclude it from the search for nearest neighbors.
!
    lnext(k) = -lnext(k)
!
!  Initialize for loop on NPTS.
!
    rs = 0.0D+00
    sum2 = 0.0D+00
    rws = 0.0D+00
    rq = 0.0D+00
    lnp = 0
!
!  Compute NPTS, LNP, rws, neq, rq, and avsq.
!
1   continue

    sum2 = sum2 + rs

    if ( lnp == lmax ) then
      go to 3
    end if

    lnp = lnp + 1
    rsold = rs
    call getnp3 ( xk, yk, zk, x, y, z, nnr, lcell, lnext, xyzmn, xyzdl, np, rs )

    if ( rs == 0.0D+00 ) then
      go to 21
    end if

    npts(lnp) = np

    if ( ( rs - rsold ) / rs < rtol ) then
      go to 1
    end if

    if ( rws == 0.0D+00 .and. nnw < lnp ) then
      rws = rs
    end if

    if ( rq /= 0.0D+00 .or. lnp <= nnq ) then
      go to 2
    end if
!
!  RQ = 0 (not yet computed) and NQ < LNP.  rq =
!  sqrt(rs) is sufficiently large to (strictly) include
!  nq nodes.  The least squares fit will include neq =
!  lnp-1 equations for 9 <= nq <= neq < lmax <= n-1.
!
    neq = lnp - 1
    rq = sqrt ( rs )
    avsq = sum2 / real ( neq, kind = 8 )
!
!  Bottom of loop -- test for termination.
!
2   continue

    if ( nqwmax < lnp ) then
      go to 4
    else
      go to 1
    end if
!
!  All LMAX nodes are included in npts.  rws and/or rq**2 is
!  (arbitrarily) taken to be 10 percent larger than the
!  distance RS to the last node included.
!
3   continue

    if ( rws == 0.0D+00 ) then
      rws = 1.1D+00 * rs
    end if

    if ( rq == 0.0D+00 ) then
      neq = lmax
      rq = sqrt ( 1.1D+00 * rs )
      avsq = sum2 / real ( neq,  kind = 8 )
    end if
!
!  Store RSQ(K), update RSMX if necessary, and compute av.
!
4   continue

    rsq(k) = rws
    rsmx = max ( rsmx, rs )
    av = sqrt ( avsq )
!
!  Set up the augmented regression matrix (transposed) as the
!  columns of B, and zero out the lower triangle (upper
!  triangle of b) with givens rotations -- qr decomposition
!  with orthogonal matrix q not stored.
!
    i = 0

5   continue

    i = i + 1
    np = npts(i)
    irow = min ( i, 10 )
    call setup3 ( xk, yk, zk, fk, x(np), y(np), z(np), f(np), av, avsq, &
      rq, b(1,irow) )

    if ( i == 1 ) then
      go to 5
    end if

    irm1 = irow-1

    do j = 1, irow-1
      call givens ( b(j,j), b(j,irow), c, s )
      call rotate ( 10-j, c, s, b(j+1,j), b(j+1,irow) )
    end do

    if ( i < neq ) then
      go to 5
    end if
!
!  Test the system for ill-conditioning.
!
    dmin = min ( abs(b(1,1)), abs(b(2,2)), abs(b(3,3)), &
               abs(b(4,4)), abs(b(5,5)), abs(b(6,6)), &
               abs(b(7,7)), abs(b(8,8)), abs(b(9,9)) )

    if ( dtol <= dmin * rq ) then
      go to 13
    end if

    if ( neq == lmax ) then
      go to 10
    end if
!
!  Increase RQ and add another equation to the system to
!  improve the conditioning.  The number of NPTS elements
!  is also increased if necessary.
!
7   continue

    rsold = rs
    neq = neq + 1
    if ( neq == lmax ) go to 9
    if ( neq == lnp ) go to 8
!
!  NEQ < LNP
!
    np = npts(neq+1)
    rs = (x(np)-xk)**2 + (y(np)-yk)**2 + (z(np)-zk)**2
    if ( ( rs - rsold ) / rs < rtol ) go to 7
    rq = sqrt ( rs )
    go to 5
!
!  Add an element to NPTS.
!
8   continue

    lnp = lnp + 1
    call getnp3 ( xk, yk, zk, x, y, z, nnr, lcell, lnext, xyzmn, xyzdl, np, rs )

    if ( np == 0 ) then
      go to 21
    end if

    npts(lnp) = np

    if ( ( rs - rsold ) / rs < rtol ) then
      go to 7
    end if

    rq = sqrt ( rs )
    go to 5

9   continue

    rq = sqrt ( 1.1D+00 * rs )
    go to 5
!
!  Stabilize the system by damping second partials.  Add
!  multiples of the first six unit vectors to the first
!  six equations.
!
10  continue

    do i = 1, 6

      b(i,10) = sf
      b(i+1:10,10) = 0.0D+00

      do j = i, 9
        call givens ( b(j,j), b(j,10), c, s )
        call rotate ( 10-j, c, s, b(j+1,j), b(j+1,10) )
      end do

    end do
!
!  Test the stabilized system for ill-conditioning.
!
    dmin = min ( abs(b(1,1)),abs(b(2,2)),abs(b(3,3)), &
               abs(b(4,4)),abs(b(5,5)),abs(b(6,6)), &
               abs(b(7,7)),abs(b(8,8)),abs(b(9,9)) )
!
!  No unique solution due to collinear nodes.
!
    if ( dmin * rq < dtol ) then
      xyzmin(1:3) = xyzmn(1:3)
      xyzdel(1:3) = xyzdl(1:3)
      ier = 3
      return
    end if
!
!  Solve the 9 by 9 triangular system for the coefficients
!
13  continue

    do ib = 1, 9

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩电影一区| 亚洲国产欧美一区二区三区丁香婷| 日韩精品午夜视频| 色妹子一区二区| 亚洲国产精品久久人人爱| 91麻豆自制传媒国产之光| 国产精品无码永久免费888| 成人一区二区三区中文字幕| 国产嫩草影院久久久久| 亚洲成在人线在线播放| 日韩亚洲欧美中文三级| 免费成人av在线播放| 精品国产一区二区在线观看| 国产自产视频一区二区三区| 久久久高清一区二区三区| 91丨porny丨首页| 亚洲精品国产品国语在线app| 成人美女在线观看| 亚洲五月六月丁香激情| 欧美福利一区二区| 国产精品99久久久久久宅男| 欧美国产禁国产网站cc| 91国产免费看| 日韩中文字幕区一区有砖一区| 这里只有精品免费| 日韩中文字幕区一区有砖一区| 久久久不卡影院| 一本到不卡精品视频在线观看| 五月天欧美精品| 日韩三级伦理片妻子的秘密按摩| 精品中文字幕一区二区小辣椒 | 亚洲午夜国产一区99re久久| 91久久精品日日躁夜夜躁欧美| 视频一区在线播放| 国产嫩草影院久久久久| 欧美亚一区二区| 麻豆91免费观看| 亚洲青青青在线视频| 欧美一区午夜精品| 99免费精品视频| 麻豆精品在线播放| 国产精品嫩草影院com| 日韩午夜在线影院| 成人性视频网站| 视频一区中文字幕| 国产精品久久毛片| 欧美日韩高清在线播放| 成人福利视频在线| 性做久久久久久免费观看| 欧美综合一区二区三区| 国产精品99精品久久免费| 亚洲精品国产一区二区精华液 | 欧美日韩和欧美的一区二区| 男女激情视频一区| 亚洲综合免费观看高清完整版| 欧美精品一区在线观看| 91国产成人在线| 成人av网址在线观看| 日本美女视频一区二区| 亚洲综合在线观看视频| 国产午夜亚洲精品不卡| 欧美美女视频在线观看| 色噜噜久久综合| 国产成+人+日韩+欧美+亚洲| 国内精品免费**视频| 午夜欧美电影在线观看| 亚洲日本va午夜在线电影| 国产日韩在线不卡| 欧美精品第1页| 欧美日韩国产高清一区二区 | 亚洲国产美国国产综合一区二区| 国产精品久久久久精k8 | 欧美日韩国产乱码电影| 国产.欧美.日韩| 精品在线一区二区| 青青青伊人色综合久久| 日本一区中文字幕| 偷拍日韩校园综合在线| 亚洲精品日韩一| 国产精品成人一区二区艾草| 欧美sm美女调教| 久久只精品国产| 精品国产制服丝袜高跟| 精品久久99ma| 日韩精品影音先锋| 制服视频三区第一页精品| 91精品婷婷国产综合久久| 91国在线观看| 欧美精品免费视频| 56国语精品自产拍在线观看| 欧美蜜桃一区二区三区| 777欧美精品| 欧美疯狂做受xxxx富婆| 3d动漫精品啪啪| 日韩欧美第一区| 日韩精品一区二区三区在线观看 | 国产成人综合在线播放| 国内精品伊人久久久久影院对白| 国产精品888| 成人精品视频一区二区三区| 国产剧情一区在线| eeuss国产一区二区三区| 成人黄页毛片网站| 欧美日韩一区三区| 欧美一区二区视频在线观看2020| 日韩一区二区电影| 久久你懂得1024| 国产精品国产成人国产三级| 一级特黄大欧美久久久| 亚洲成人动漫一区| 日日摸夜夜添夜夜添精品视频| 激情小说亚洲一区| 国产大陆亚洲精品国产| 欧美私人免费视频| 日韩欧美在线不卡| 国产精品卡一卡二| 亚洲电影视频在线| 午夜一区二区三区视频| 岛国精品在线播放| 在线观看欧美日本| 国产日韩欧美一区二区三区综合 | 国产高清精品网站| 99v久久综合狠狠综合久久| 7777精品久久久大香线蕉| 精品对白一区国产伦| 久久亚洲影视婷婷| 亚洲日本在线a| 蜜桃av一区二区三区| 99久久综合狠狠综合久久| 欧美午夜片在线看| 国产亚洲精品中文字幕| 亚洲国产aⅴ天堂久久| 日本中文字幕一区二区视频| 99国产精品久| 欧美mv和日韩mv国产网站| 一区二区三区影院| 麻豆精品在线观看| 在线观看视频一区| 日本一二三四高清不卡| 天天影视色香欲综合网老头| a美女胸又www黄视频久久| 欧美一区二区在线看| 亚洲成人av中文| 国产成人综合视频| 欧美大尺度电影在线| 国产午夜亚洲精品不卡| thepron国产精品| 亚洲国产岛国毛片在线| 毛片av中文字幕一区二区| 不卡视频一二三| 99久久精品免费看| 日韩视频一区在线观看| 亚洲日本一区二区| 不卡视频一二三四| 精品少妇一区二区三区日产乱码 | 蜜臀av一级做a爰片久久| 91亚洲国产成人精品一区二区三| 日韩欧美一二区| 日韩精品欧美精品| 日本丶国产丶欧美色综合| 欧美成人精品福利| 蜜桃视频一区二区| 欧美日本在线播放| 91丨九色porny丨蝌蚪| 亚洲理论在线观看| 日韩无一区二区| 性久久久久久久| 6080日韩午夜伦伦午夜伦| 亚洲另类春色国产| 日本韩国一区二区三区| 国产精品久线观看视频| 国产一区二区在线电影| 久久久噜噜噜久久人人看| 另类小说综合欧美亚洲| 日韩精品专区在线影院重磅| 美女高潮久久久| 欧美综合一区二区三区| 亚洲444eee在线观看| 91老司机福利 在线| 亚洲1区2区3区4区| 在线视频欧美精品| 五月婷婷久久综合| 欧美一区二区三区人| 一区二区三区影院| 欧美一级艳片视频免费观看| 日韩制服丝袜av| 久久久亚洲高清| 成人一区在线看| 亚洲男女一区二区三区| 一本久道中文字幕精品亚洲嫩 | 国产九九视频一区二区三区| 国产欧美日韩在线| 成人午夜碰碰视频| 亚洲自拍都市欧美小说| 91福利视频网站| 久久爱另类一区二区小说| 久久青草欧美一区二区三区| 国产资源在线一区| 亚洲色图在线视频| 91久久精品一区二区|