Routine: PDLAECV()  File: SRC\pdstebz.f

 
 
# lines: 149
  # code: 149
  # comment: 0
  # blank:0
# Variables:19
# Callers:1
# Callings:0
# Words:42
# Keywords:27
 

 

..
     .. Array Arguments ..
     ..
  Purpose
  =======
  PDLAECV checks if the input intervals [ INTVL(2*i-1), INTVL(2*i) ],
  i = KF, ... , KL-1, have "converged".
  PDLAECV modifies KF to be the index of the last converged interval,
  i.e., on output, all intervals [ INTVL(2*i-1), INTVL(2*i) ], i < KF,
  have converged. Note that the input intervals may be reordered by
  PDLAECV.
  This is a SCALAPACK internal procedure and arguments are not checked
  for unreasonable values.
  Arguments
  =========
  IJOB    (input) INTEGER
          Specifies the criterion for "convergence" of an interval.
          = 0 : When an interval is narrower than ABSTOL, or than
                RELTOL times the larger (in magnitude) endpoint, then
                it is considered to have "converged".
          = 1 : When an interval is narrower than ABSTOL, or than
                RELTOL times the larger (in magnitude) endpoint, or if
                the counts at the endpoints are identical to the counts
                specified by NVAL ( see NVAL ) then the interval is
                considered to have "converged".
  KF      (input/output) INTEGER
          On input, the index of the first input interval is 2*KF-1.
          On output, the index of the last converged interval
          is 2*KF-3.
  KL      (input) INTEGER
          The index of the last input interval is 2*KL-3.
  INTVL   (input/output) DOUBLE PRECISION array, dimension (2*(KL-KF))
          The endpoints of the intervals. INTVL(2*j-1) is the left
          oendpoint f the j-th interval, and INTVL(2*j) is the right
          endpoint of the j-th interval. The input intervals will,
          in general, be reordered on output.
          On input, INTVL contains the KL-KF input intervals.
          On output, INTVL contains the converged intervals, 1 thru'
          KF-1, and the unconverged intervals, KF thru' KL-1.
  INTVLCT (input/output) INTEGER array, dimension (2*(KL-KF))
          The counts at the endpoints of the intervals. INTVLCT(2*j-1)
          is the count at the left endpoint of the j-th interval, i.e.,
          the function value N(INTVL(2*j-1)), and INTVLCT(2*j) is the
          count at the right endpoint of the j-th interval. This array
          will, in general, be reordered on output.
          See the comments in PDLAEBZ for more on the function N(w).
  NVAL    (input/output) INTEGER array, dimension (2*(KL-KF))
          The desired counts, N(w), at the endpoints of the
          corresponding intervals.  This array will, in general,
          be reordered on output.
  ABSTOL  (input) DOUBLE PRECISION
          The minimum (absolute) width of an interval. When an interval
          is narrower than ABSTOL, or than RELTOL times the larger (in
          magnitude) endpoint, then it is considered to be sufficiently
          small, i.e., converged.
          Note : This must be at least zero.
  RELTOL  (input) DOUBLE PRECISION
          The minimum relative width of an interval. When an interval
          is narrower than ABSTOL, or than RELTOL times the larger (in
          magnitude) endpoint, then it is considered to be sufficiently
          small, i.e., converged.
          Note : This should be at least radix*machine epsilon.
  =====================================================================
     .. Intrinsic Functions ..

 
Display dynamic version Find AutoScroll Reload FontSize: - + Hide Comments Hide Blanks Frame FullScreen MailPrint

 
01        SUBROUTINE PDLAECV( IJOB , KF , KL , INTVL , INTVLCT , NVAL , ABSTOL ,
02       $RELTOL )
03  
04  *     -- ScaLAPACK routine(version 1.7) --
05  *     University of Tennessee , Knoxville , Oak Ridge National Laboratory ,
06  *     and University of California , Berkeley.
07  *     November 15 , 1997
08  
09  *     .. Scalar Arguments ..
10        INTEGER IJOB , KF , KL
11        DOUBLE PRECISION ABSTOL , RELTOL
12        INTRINSIC ABS , MAX
13  *     ..
14  *     .. Local Scalars ..
15        LOGICAL CONDN
16        INTEGER I , ITMP1 , ITMP2 , J , K , KFNEW
17        DOUBLE PRECISION TMP1 , TMP2 , TMP3 , TMP4
18  *     ..
19  *     .. Executable Statements ..
20  
21        KFNEW = KF
22        DO 10 I = KF , KL - 1
23            K = 2*I
24            TMP3 = INTVL( K - 1 )
25            TMP4 = INTVL( K )
26            TMP1 = ABS( TMP4 - TMP3 )
27            TMP2 = MAX( ABS( TMP3 ) , ABS( TMP4 ) )
28            CONDN = TMP1.LT.MAX( ABSTOL , RELTOL*TMP2 )
29            IF( IJOB.EQ.0 )
30       $        CONDN = CONDN .OR.(( INTVLCT( K - 1 ).EQ.NVAL( K - 1 ) ) .AND.
31       $        INTVLCT( K ).EQ.NVAL( K ) )
32                IF( CONDN ) THEN
33                    IF( I.GT.KFNEW ) THEN
34  
35  *                     Reorder Intervals
36  
37                        J = 2*KFNEW
38                        TMP1 = INTVL( K - 1 )
39                        TMP2 = INTVL( K )
40                        ITMP1 = INTVLCT( K - 1 )
41                        ITMP2 = INTVLCT( K )
42                        INTVL( K - 1 ) = INTVL( J - 1 )
43                        INTVL( K ) = INTVL( J )
44                        INTVLCT( K - 1 ) = INTVLCT( J - 1 )
45                        INTVLCT( K ) = INTVLCT( J )
46                        INTVL( J - 1 ) = TMP1
47                        INTVL( J ) = TMP2
48                        INTVLCT( J - 1 ) = ITMP1
49                        INTVLCT( J ) = ITMP2
50                        IF( IJOB.EQ.0 ) THEN
51                            ITMP1 = NVAL( K - 1 )
52                            NVAL( K - 1 ) = NVAL( J - 1 )
53                            NVAL( J - 1 ) = ITMP1
54                            ITMP1 = NVAL( K )
55                            NVAL( K ) = NVAL( J )
56                            NVAL( J ) = ITMP1
57                        END IF
58                    END IF
59                    KFNEW = KFNEW + 1
60                END IF
61     10 CONTINUE
62        KF = KFNEW
63        RETURN
64  
65  *     End of PDLAECV
66  
67        END
68