GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
dinvwt.f
Go to the documentation of this file.
1C Work performed under the auspices of the U.S. Department of Energy
2C by Lawrence Livermore National Laboratory under contract number
3C W-7405-Eng-48.
4C
5 SUBROUTINE dinvwt(NEQ,WT,IER)
6C
7C***BEGIN PROLOGUE DINVWT
8C***REFER TO DDASPK
9C***ROUTINES CALLED (NONE)
10C***DATE WRITTEN 950125 (YYMMDD)
11C***END PROLOGUE DINVWT
12C-----------------------------------------------------------------------
13C This subroutine checks the error weight vector WT, of length NEQ,
14C for components that are .le. 0, and if none are found, it
15C inverts the WT(I) in place. This replaces division operations
16C with multiplications in all norm evaluations.
17C IER is returned as 0 if all WT(I) were found positive,
18C and the first I with WT(I) .le. 0.0 otherwise.
19C-----------------------------------------------------------------------
20C
21 IMPLICIT DOUBLE PRECISION(a-h,o-z)
22 dimension wt(*)
23C
24 DO 10 i = 1,neq
25 IF (wt(i) .LE. 0.0d0) GO TO 30
26 10 CONTINUE
27 DO 20 i = 1,neq
28 20 wt(i) = 1.0d0/wt(i)
29 ier = 0
30 RETURN
31C
32 30 ier = i
33 RETURN
34C
35C------END OF SUBROUTINE DINVWT-----------------------------------------
36 END
subroutine dinvwt(neq, wt, ier)
Definition dinvwt.f:6