ewset.f

Go to the documentation of this file.
00001       SUBROUTINE EWSET (N, ITOL, RTOL, ATOL, YCUR, EWT)
00002 CLLL. OPTIMIZE
00003 C-----------------------------------------------------------------------
00004 C THIS SUBROUTINE SETS THE ERROR WEIGHT VECTOR EWT ACCORDING TO
00005 C     EWT(I) = RTOL(I)*ABS(YCUR(I)) + ATOL(I),  I = 1,...,N,
00006 C WITH THE SUBSCRIPT ON RTOL AND/OR ATOL POSSIBLY REPLACED BY 1 ABOVE,
00007 C DEPENDING ON THE VALUE OF ITOL.
00008 C-----------------------------------------------------------------------
00009       INTEGER N, ITOL
00010       INTEGER I
00011       DOUBLE PRECISION RTOL, ATOL, YCUR, EWT
00012       DIMENSION RTOL(*), ATOL(*), YCUR(N), EWT(N) 
00013 C
00014       GO TO (10, 20, 30, 40), ITOL
00015  10   CONTINUE
00016       DO 15 I = 1,N 
00017  15     EWT(I) = RTOL(1)*DABS(YCUR(I)) + ATOL(1)
00018       RETURN
00019  20   CONTINUE
00020       DO 25 I = 1,N 
00021  25     EWT(I) = RTOL(1)*DABS(YCUR(I)) + ATOL(I)
00022       RETURN
00023  30   CONTINUE
00024       DO 35 I = 1,N 
00025  35     EWT(I) = RTOL(I)*DABS(YCUR(I)) + ATOL(1)
00026       RETURN
00027  40   CONTINUE
00028       DO 45 I = 1,N 
00029  45     EWT(I) = RTOL(I)*DABS(YCUR(I)) + ATOL(I)
00030       RETURN
00031 C----------------------- END OF SUBROUTINE EWSET -----------------------
00032       END 
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines