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

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

?? dtron.f90

?? 牛頓優化算法源fortran代碼
?? F90
?? 第 1 頁 / 共 5 頁
字號:
!        Compute q by solving L*q = A*z and save L*q for
!        use in updating the residual t.
  
  CALL dssyax(n, a, adiag, acol_ptr, arow_ind, z, q)
  z(1:n) = q(1:n)
  CALL dstrsol(n, l, ldiag, lcol_ptr, lrow_ind, q, 'N')
  
!        Compute alpha and determine sigma such that the trust region
!        constraint || w + sigma*p || = delta is satisfied.
  
  ptq = DOT_PRODUCT( p(1:n), q(1:n) )
  IF (ptq > zero) THEN
    alpha = rho/ptq
  ELSE
    alpha = zero
  END IF
  CALL dtrqsol(n, w, p, delta, sigma)
  
!        Exit if there is negative curvature or if the
!        iterates exit the trust region.
  
  IF (ptq <= zero .OR. alpha >= sigma) THEN
    w(1:n) = w(1:n) + sigma * p(1:n)
    IF (ptq <= zero) THEN
      info = 3
    ELSE
      info = 4
    END IF
    
    RETURN
    
  END IF
  
!        Update w and the residuals r and t.
!        Note that t = L*r.
  
  w(1:n) = w(1:n) + alpha * p(1:n)
  r(1:n) = r(1:n) - alpha * q(1:n)
  t(1:n) = t(1:n) - alpha * z(1:n)
  
!        Exit if the residual convergence test is satisfied.
  
  rtr = SUM( r(1:n)**2 )
  rnorm = SQRT(rtr)
  tnorm = dnrm2(n, t, 1)
  
  IF (tnorm <= tol) THEN
    info = 1
    RETURN
  END IF
  
  IF (rnorm <= stol) THEN
    info = 2
    RETURN
  END IF
  
!        Compute p = r + beta*p and update rho.
  
  beta = rtr/rho
  p(1:n) = beta * p(1:n)
  p(1:n) = p(1:n) + r(1:n)
  rho = rtr
  
END DO

info = 5

RETURN

END SUBROUTINE dtrpcg



SUBROUTINE dtrqsol(n, x, p, delta, sigma)
 
! Code converted using TO_F90 by Alan Miller
! Date: 1999-06-29  Time: 11:18:32

INTEGER, INTENT(IN)     :: n
REAL (dp), INTENT(IN)   :: x(:)
REAL (dp), INTENT(IN)   :: p(:)
REAL (dp), INTENT(IN)   :: delta
REAL (dp), INTENT(OUT)  :: sigma

!  **********

!  Subroutine dtrqsol

!  This subroutine computes the largest (non-negative) solution
!  of the quadratic trust region equation

!        ||x + sigma*p|| = delta.

!  The code is only guaranteed to produce a non-negative solution
!  if ||x|| <= delta, and p != 0. If the trust region equation has
!  no solution, sigma = 0.

!  The subroutine statement ix

!    dtrqsol(n, x, p, delta, sigma)

!  where

!    n is an integer variable.
!      On entry n is the number of variables.
!      On exit n is unchanged.

!    x is a REAL (dp) array of dimension n.
!      On entry x must contain the vector x.
!      On exit x is unchanged.

!    p is a REAL (dp) array of dimension n.
!      On entry p must contain the vector p.
!      On exit p is unchanged.

!    delta is a REAL (dp) variable.
!      On entry delta specifies the scalar delta.
!      On exit delta is unchanged.

!    sigma is a REAL (dp) variable.
!      On entry sigma need not be specified.
!      On exit sigma contains the non-negative solution.

!  Subprograms called

!    Level 1 BLAS  ...  ddot

!  MINPACK-2 Project. March 1999.
!  Argonne National Laboratory.
!  Chih-Jen Lin and Jorge J. More'.

!  **********


REAL (dp) :: dsq, ptp, ptx, rad, xtx

! REAL (dp) :: ddot

ptx = DOT_PRODUCT( p(1:n), x(1:n) )
ptp = SUM( p(1:n)**2 )
xtx = SUM( x(1:n)**2 )
dsq = delta**2

!     Guard against abnormal cases.

rad = ptx**2 + ptp*(dsq - xtx)
rad = SQRT(MAX(rad, zero))

IF (ptx > zero) THEN
  sigma = (dsq - xtx)/(ptx + rad)
ELSE IF (rad > zero) THEN
  sigma = (rad - ptx)/ptp
ELSE
  sigma = zero
END IF

RETURN

END SUBROUTINE dtrqsol



SUBROUTINE dssyax(n, a, adiag, jptr, indr, x, y)
 
! Code converted using TO_F90 by Alan Miller
! Date: 1999-06-29  Time: 14:03:11

INTEGER, INTENT(IN)     :: n
REAL (dp), INTENT(IN)   :: a(:)
REAL (dp), INTENT(IN)   :: adiag(:)
INTEGER, INTENT(IN)     :: jptr(:)    ! jptr(n+1)
INTEGER, INTENT(IN)     :: indr(:)
REAL (dp), INTENT(IN)   :: x(:)
REAL (dp), INTENT(OUT)  :: y(:)

!  **********

!  Subroutine dssyax

!  This subroutine computes the matrix-vector product y = A*x,
!  where A is a symmetric matrix with the strict lower triangular
!  part in compressed column storage.

!  The subroutine statement is

!    subroutine dssyax(n, a, adiag, jptr, indr, x, y)

!  where

!    n is an integer variable.
!      On entry n is the order of A.
!      On exit n is unchanged.

!    a is a REAL (dp) array of dimension *.
!      On entry a must contain the strict lower triangular part
!         of A in compressed column storage.
!      On exit a is unchanged.

!    adiag is a REAL (dp) array of dimension n.
!      On entry adiag must contain the diagonal elements of A.
!      On exit adiag is unchanged.

!    jptr is an integer array of dimension n + 1.
!      On entry jptr must contain pointers to the columns of A.
!         The nonzeros in column j of A must be in positions
!         jptr(j), ... , jptr(j+1) - 1.
!      On exit jptr is unchanged.

!    indr is an integer array of dimension *.
!      On entry indr must contain row indices for the strict
!         lower triangular part of A in compressed column storage.
!      On exit indr is unchanged.

!    x is a REAL (dp) array of dimension n.
!      On entry x must contain the vector x.
!      On exit x is unchanged.

!    y is a REAL (dp) array of dimension n.
!      On entry y need not be specified.
!      On exit y contains the product A*x.

!  MINPACK-2 Project. May 1998.
!  Argonne National Laboratory.

!  **********


INTEGER   :: i, j, k
REAL (dp) :: sum

y(1:n) = adiag(1:n)*x(1:n)

DO j = 1, n
  sum = zero
  DO i = jptr(j), jptr(j+1) - 1
    k = indr(i)
    sum = sum + a(i)*x(k)
    y(k) = y(k) + a(i)*x(j)
  END DO
  y(j) = y(j) + sum
END DO

RETURN

END SUBROUTINE dssyax



FUNCTION dnrm2 ( n, x, incx) RESULT(fn_val)

!  Euclidean norm of the n-vector stored in x() with storage increment incx .
!  if n <= 0 return with result = 0.
!  if n >= 1 then incx must be >= 1

!  c.l.lawson, 1978 jan 08
!  modified to correct failure to update ix, 1/25/92.
!  modified 3/93 to return if incx <= 0.
!  This version by Alan.Miller @ vic.cmis.csiro.au
!  Latest revision - 22 January 1999

!  four phase method using two built-in constants that are
!  hopefully applicable to all machines.
!      cutlo = maximum of  SQRT(u/eps)  over all known machines.
!      cuthi = minimum of  SQRT(v)      over all known machines.
!  where
!      eps = smallest no. such that eps + 1. > 1.
!      u   = smallest positive no.   (underflow limit)
!      v   = largest  no.            (overflow  limit)

!  brief outline of algorithm..

!  phase 1    scans zero components.
!  move to phase 2 when a component is nonzero and <= cutlo
!  move to phase 3 when a component is > cutlo
!  move to phase 4 when a component is >= cuthi/m
!  where m = n for x() real and m = 2*n for complex.

INTEGER, INTENT(IN)   :: n, incx
REAL (dp), INTENT(IN) :: x(:)
REAL (dp)             :: fn_val

! Local variables
INTEGER     :: i, ix, j, next
REAL (dp)   :: cuthi, cutlo, hitest, sum, xmax

IF(n <= 0 .OR. incx <= 0) THEN
  fn_val = zero
  RETURN
END IF

! Set machine-dependent constants

cutlo = SQRT( TINY(one) / EPSILON(one) )
cuthi = SQRT( HUGE(one) )

next = 1
sum = zero
i = 1
ix = 1
!                                                 begin main loop
20 SELECT CASE (next)
  CASE (1)
     IF( ABS(x(i)) > cutlo) GO TO 85
     next = 2
     xmax = zero
     GO TO 20

  CASE (2)
!                   phase 1.  sum is zero

     IF( x(i) == zero) GO TO 200
     IF( ABS(x(i)) > cutlo) GO TO 85

!                                prepare for phase 2.   x(i) is very small.
     next = 3
     GO TO 105

  CASE (3)
!                   phase 2.  sum is small.
!                             scale to avoid destructive underflow.

     IF( ABS(x(i)) > cutlo ) THEN
!                  prepare for phase 3.

       sum = (sum * xmax) * xmax
       GO TO 85
     END IF

  CASE (4)
     GO TO 110
END SELECT

! ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
!                     common code for phases 2 and 4.
!                     in phase 4 sum is large.  scale to avoid overflow.

110 IF( ABS(x(i)) <= xmax ) GO TO 115
sum = one + sum * (xmax / x(i))**2
xmax = ABS(x(i))
GO TO 200

! ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

!                   phase 3.  sum is mid-range.  no scaling.

!     for real or d.p. set hitest = cuthi/n
!     for complex      set hitest = cuthi/(2*n)

85 hitest = cuthi / REAL( n, dp )

DO j = ix, n
  IF(ABS(x(i)) >= hitest) GO TO 100
  sum = sum + x(i)**2
  i = i + incx
END DO
fn_val = SQRT( sum )
RETURN

! ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

!                                prepare for phase 4.
!                                ABS(x(i)) is very large
100 ix = j
next = 4
sum = (sum / x(i)) / x(i)
!                                Set xmax; large if next = 4, small if next = 3
105 xmax = ABS(x(i))

115 sum = sum + (x(i)/xmax)**2

200 ix = ix + 1
i = i + incx
IF( ix <= n ) GO TO 20

!              end of main loop.

!              compute square root and adjust for scaling.

fn_val = xmax * SQRT(sum)

RETURN
END FUNCTION dnrm2



SUBROUTINE dicfs(n, nnz, a, adiag, acol_ptr, arow_ind,  &
                 l, ldiag, lcol_ptr, lrow_ind,  &
                 p, alpha)
 
! Code converted using TO_F90 by Alan Miller
! Date: 1999-06-29  Time: 14:02:36

INTEGER, INTENT(IN)        :: n
INTEGER, INTENT(IN)        :: nnz
REAL (dp), INTENT(IN)      :: a(:)
REAL (dp), INTENT(IN)      :: adiag(:)
INTEGER, INTENT(IN)        :: acol_ptr(:)   ! acol_ptr(n+1)
INTEGER, INTENT(IN)        :: arow_ind(:)
REAL (dp), INTENT(OUT)     :: l(:)          ! l(nnz+n*p)
REAL (dp), INTENT(OUT)     :: ldiag(:)
INTEGER, INTENT(OUT)       :: lcol_ptr(:)   ! lcol_ptr(n+1)
INTEGER, INTENT(OUT)       :: lrow_ind(:)   ! lrow_ind(nnz+n*p)
INTEGER, INTENT(IN)        :: p
REAL (dp), INTENT(IN OUT)  :: alpha

!  *********

!  Subroutine dicfs

!  Given a symmetric matrix A in compressed column storage, this
!  subroutine computes an incomplete Cholesky factor of A + alpha*D,
!  where alpha is a shift and D is the diagonal matrix with entries
!  set to the l2 norms of the columns of A.

!  The subroutine statement is

!    subroutine dicfs(n, nnz, a, adiag, acol_ptr, arow_ind,
!                     l, ldiag, lcol_ptr, lrow_ind,
!                     p, alpha)

!  where

!    n is an integer variable.
!      On entry n is the order of A.
!      On exit n is unchanged.

!    nnz is an integer variable.
!      On entry nnz is the number of nonzeros in the strict lower
!         triangular part of A.
!      On exit nnz is unchanged.

!    a is a REAL (dp) array of dimension nnz.
!      On entry a must

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品嫩草影院av蜜臀| 成人免费视频app| 制服丝袜av成人在线看| 天堂成人免费av电影一区| 欧美日韩免费电影| 日韩精品亚洲一区二区三区免费| 91麻豆精品国产91久久久久久| 日本亚洲视频在线| 精品三级在线看| 国产成人在线网站| 日韩理论片在线| 欧美色国产精品| 精品一区二区成人精品| 国产精品福利影院| 欧美日韩精品一区二区| 麻豆精品精品国产自在97香蕉| 久久精品人人做人人综合 | 91精品免费在线观看| 久久精品国产99| 国产精品久久久久久久久快鸭 | 欧美mv和日韩mv的网站| 高清不卡一区二区在线| 一区二区三区在线免费视频| 日韩一级完整毛片| eeuss鲁片一区二区三区| 五月综合激情婷婷六月色窝| 2021国产精品久久精品| 一本一道综合狠狠老| 麻豆91在线看| 亚洲精品第一国产综合野| 欧美一区二区三区免费在线看| 成人午夜激情在线| 婷婷六月综合网| 中文字幕一区二区三中文字幕| 欧美精品日韩一本| 成人av免费在线播放| 热久久久久久久| 亚洲欧美日韩国产综合| 欧美不卡一二三| 欧洲日韩一区二区三区| 国产99久久久久| 男人的j进女人的j一区| 亚洲精品日产精品乱码不卡| 久久欧美一区二区| 91精品国产综合久久久久| 99久久国产综合精品女不卡| 国产美女在线观看一区| 午夜日韩在线电影| 亚洲精品日韩专区silk| 国产精品美女久久久久久久网站| 欧美大尺度电影在线| 欧美日韩黄色一区二区| 色综合天天做天天爱| 国模一区二区三区白浆| 日本中文字幕一区| 天天色综合成人网| 一区二区三区高清| 亚洲人精品一区| 国产精品天干天干在线综合| 亚洲精品一区二区三区香蕉| 欧美一区二区三区系列电影| 欧美亚洲另类激情小说| 91麻豆视频网站| www.色精品| 99精品视频在线免费观看| 成人精品免费看| 国产成人激情av| 国产精品一区2区| 国产在线观看免费一区| 激情久久五月天| 久久精品国产亚洲a| 久久精品国产澳门| 久久电影国产免费久久电影| 男女性色大片免费观看一区二区| 亚洲成人7777| 秋霞国产午夜精品免费视频| 日韩成人精品在线| 美女视频网站久久| 精品一区二区在线视频| 国产资源在线一区| 国内精品第一页| 国产91精品入口| 99在线视频精品| 日本乱码高清不卡字幕| 欧美亚洲国产一区二区三区| 欧美午夜精品久久久久久超碰| 欧美日韩中字一区| 日韩三级视频在线观看| 精品日韩一区二区三区| 亚洲精品一区二区三区四区高清 | 日韩欧美中文字幕一区| 精品99久久久久久| 国产精品免费网站在线观看| 亚洲天堂免费看| 午夜精品一区二区三区电影天堂| 图片区小说区区亚洲影院| 蜜桃视频在线一区| 懂色av一区二区三区免费看| 91婷婷韩国欧美一区二区| 在线免费观看不卡av| 日韩欧美色综合| 国产欧美日本一区视频| 一区二区三区四区蜜桃 | 亚洲综合视频网| 欧美aaa在线| 成人毛片老司机大片| 欧美在线观看你懂的| 日韩你懂的在线播放| 国产精品拍天天在线| 亚洲国产综合色| 精品一区二区三区在线观看| 91在线丨porny丨国产| 9191久久久久久久久久久| 亚洲国产成人自拍| 亚洲成av人片在线| 成人深夜视频在线观看| 欧美久久久久久久久| 欧美激情艳妇裸体舞| 视频一区在线视频| 粉嫩在线一区二区三区视频| 欧美日韩综合色| 国产精品网站导航| 青青草国产精品97视觉盛宴| 91首页免费视频| 久久综合色之久久综合| 亚洲影院久久精品| 国产成人精品综合在线观看| 91麻豆精品国产91| 亚洲欧美在线观看| 激情久久五月天| 欧美久久一二三四区| 亚洲美女电影在线| 高潮精品一区videoshd| 欧美久久久久久久久久| 亚洲精品ww久久久久久p站| 国产精品一区二区三区网站| 在线播放91灌醉迷j高跟美女| 亚洲视频电影在线| 国产精品一区专区| 欧美电影免费提供在线观看| 亚洲高清中文字幕| 色欧美片视频在线观看| 国产精品视频一区二区三区不卡| 另类小说图片综合网| 欧美肥妇bbw| 一区二区三区中文字幕在线观看| 粉嫩av一区二区三区粉嫩| 欧美哺乳videos| 蜜桃av噜噜一区| 这里只有精品免费| 亚洲成人免费视| 在线看国产日韩| 亚洲卡通动漫在线| 色综合视频在线观看| 亚洲欧美影音先锋| 成人av综合一区| 亚洲国产高清不卡| 成人禁用看黄a在线| 国产欧美日韩在线看| 麻豆成人综合网| 欧美v日韩v国产v| 麻豆久久一区二区| 日韩欧美综合在线| 美女视频免费一区| 日韩视频不卡中文| 国产主播一区二区| 久久久国产精华| 国产激情视频一区二区三区欧美 | 欧洲另类一二三四区| 亚洲精品一卡二卡| 欧美丝袜丝交足nylons图片| 一区二区三区四区亚洲| 欧美色涩在线第一页| 午夜久久电影网| 欧美一区二区三区爱爱| 免费观看30秒视频久久| 精品国产亚洲在线| 国产麻豆成人传媒免费观看| 欧美激情一区二区三区全黄| 成人动漫中文字幕| 亚洲女女做受ⅹxx高潮| 欧美偷拍一区二区| 免费日本视频一区| 久久久久久久综合狠狠综合| 国产福利精品导航| 亚洲欧美在线视频观看| 欧美日韩视频在线一区二区| 久久97超碰国产精品超碰| 国产丝袜在线精品| 色综合久久天天| 日本欧美肥老太交大片| 久久综合网色—综合色88| 成人一区二区三区| 亚洲国产精品高清| 欧美日韩一区二区三区免费看| 日韩av在线播放中文字幕| 日韩美女在线视频| 成人黄色av电影| 亚洲成人动漫一区| 久久精品水蜜桃av综合天堂|