home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Gadgets 1
/
ADE-1.bin
/
ade-dist
/
octave-1.1.1p1-src.tgz
/
tar.out
/
fsf
/
octave
/
libcruft
/
dassl
/
ddawts.f
< prev
next >
Wrap
Text File
|
1996-09-28
|
1KB
|
43 lines
SUBROUTINE DDAWTS (NEQ, IWT, RTOL, ATOL, Y, WT, RPAR, IPAR)
C***BEGIN PROLOGUE DDAWTS
C***SUBSIDIARY
C***PURPOSE Set error weight vector for DDASSL.
C***LIBRARY SLATEC (DASSL)
C***TYPE DOUBLE PRECISION (SDAWTS-S, DDAWTS-D)
C***AUTHOR PETZOLD, LINDA R., (LLNL)
C***DESCRIPTION
C-----------------------------------------------------------------------
C THIS SUBROUTINE SETS THE ERROR WEIGHT VECTOR
C WT ACCORDING TO WT(I)=RTOL(I)*ABS(Y(I))+ATOL(I),
C I=1,-,N.
C RTOL AND ATOL ARE SCALARS IF IWT = 0,
C AND VECTORS IF IWT = 1.
C-----------------------------------------------------------------------
C***ROUTINES CALLED (NONE)
C***REVISION HISTORY (YYMMDD)
C 830315 DATE WRITTEN
C 901009 Finished conversion to SLATEC 4.0 format (F.N.Fritsch)
C 901019 Merged changes made by C. Ulrich with SLATEC 4.0 format.
C 901026 Added explicit declarations for all variables and minor
C cosmetic changes to prologue. (FNF)
C***END PROLOGUE DDAWTS
C
INTEGER NEQ, IWT, IPAR(*)
DOUBLE PRECISION RTOL(*), ATOL(*), Y(*), WT(*), RPAR(*)
C
INTEGER I
DOUBLE PRECISION ATOLI, RTOLI
C
C***FIRST EXECUTABLE STATEMENT DDAWTS
RTOLI=RTOL(1)
ATOLI=ATOL(1)
DO 20 I=1,NEQ
IF (IWT .EQ.0) GO TO 10
RTOLI=RTOL(I)
ATOLI=ATOL(I)
10 WT(I)=RTOLI*ABS(Y(I))+ATOLI
20 CONTINUE
RETURN
C-----------END OF SUBROUTINE DDAWTS------------------------------------
END