2 SUBROUTINE DEWSET
(N
, ITOL
, RTOL
, ATOL
, YCUR
, EWT
)
3 C***BEGIN PROLOGUE DEWSET
5 C***PURPOSE Set error weight vector.
6 C***TYPE DOUBLE PRECISION (SEWSET-S, DEWSET-D)
7 C***AUTHOR Hindmarsh, Alan C., (LLNL)
10 C This subroutine sets the error weight vector EWT according to
11 C EWT(i) = RTOL(i)*ABS(YCUR(i)) + ATOL(i), i = 1,...,N,
12 C with the subscript on RTOL and/or ATOL possibly replaced by 1 above,
13 C depending on the value of ITOL.
16 C***ROUTINES CALLED (NONE)
17 C***REVISION HISTORY (YYMMDD)
19 C 890501 Modified prologue to SLATEC/LDOC format. (FNF)
20 C 890503 Minor cosmetic changes. (FNF)
21 C 930809 Renamed to allow single/double precision versions. (ACH)
22 C***END PROLOGUE DEWSET
26 DOUBLE PRECISION RTOL
, ATOL
, YCUR
, EWT
27 DIMENSION RTOL
(*), ATOL
(*), YCUR
(N
), EWT
(N
)
29 C***FIRST EXECUTABLE STATEMENT DEWSET
30 GO TO (10, 20, 30, 40), ITOL
33 15 EWT
(I
) = RTOL
(1)*ABS
(YCUR
(I
)) + ATOL
(1)
37 25 EWT
(I
) = RTOL
(1)*ABS
(YCUR
(I
)) + ATOL
(I
)
41 35 EWT
(I
) = RTOL
(I
)*ABS
(YCUR
(I
)) + ATOL
(1)
45 45 EWT
(I
) = RTOL
(I
)*ABS
(YCUR
(I
)) + ATOL
(I
)
47 C----------------------- END OF SUBROUTINE DEWSET ----------------------