GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
sewset.f
Go to the documentation of this file.
1 SUBROUTINE sewset (N, ITOL, RTOL, ATOL, YCUR, EWT)
2C***BEGIN PROLOGUE SEWSET
3C***SUBSIDIARY
4C***PURPOSE Set error weight vector.
5C***TYPE SINGLE PRECISION (SEWSET-S, DEWSET-D)
6C***AUTHOR Hindmarsh, Alan C., (LLNL)
7C***DESCRIPTION
8C
9C This subroutine sets the error weight vector EWT according to
10C EWT(i) = RTOL(i)*ABS(YCUR(i)) + ATOL(i), i = 1,...,N,
11C with the subscript on RTOL and/or ATOL possibly replaced by 1 above,
12C depending on the value of ITOL.
13C
14C***SEE ALSO SLSODE
15C***ROUTINES CALLED (NONE)
16C***REVISION HISTORY (YYMMDD)
17C 791129 DATE WRITTEN
18C 890501 Modified prologue to SLATEC/LDOC format. (FNF)
19C 890503 Minor cosmetic changes. (FNF)
20C 930809 Renamed to allow single/double precision versions. (ACH)
21C***END PROLOGUE SEWSET
22C**End
23 INTEGER N, ITOL
24 INTEGER I
25 REAL RTOL, ATOL, YCUR, EWT
26 dimension rtol(*), atol(*), ycur(n), ewt(n)
27C
28C***FIRST EXECUTABLE STATEMENT SEWSET
29 GO TO (10, 20, 30, 40), itol
30 10 CONTINUE
31 DO 15 i = 1,n
32 15 ewt(i) = rtol(1)*abs(ycur(i)) + atol(1)
33 RETURN
34 20 CONTINUE
35 DO 25 i = 1,n
36 25 ewt(i) = rtol(1)*abs(ycur(i)) + atol(i)
37 RETURN
38 30 CONTINUE
39 DO 35 i = 1,n
40 35 ewt(i) = rtol(i)*abs(ycur(i)) + atol(1)
41 RETURN
42 40 CONTINUE
43 DO 45 i = 1,n
44 45 ewt(i) = rtol(i)*abs(ycur(i)) + atol(i)
45 RETURN
46C----------------------- END OF SUBROUTINE SEWSET ----------------------
47 END
subroutine sewset(n, itol, rtol, atol, ycur, ewt)
Definition sewset.f:2