3911
|
1 C Work performed under the auspices of the U.S. Department of Energy |
|
2 C by Lawrence Livermore National Laboratory under contract number |
|
3 C W-7405-Eng-48. |
|
4 C |
|
5 SUBROUTINE DINVWT(NEQ,WT,IER) |
|
6 C |
|
7 C***BEGIN PROLOGUE DINVWT |
|
8 C***REFER TO DDASPK |
|
9 C***ROUTINES CALLED (NONE) |
|
10 C***DATE WRITTEN 950125 (YYMMDD) |
|
11 C***END PROLOGUE DINVWT |
|
12 C----------------------------------------------------------------------- |
|
13 C This subroutine checks the error weight vector WT, of length NEQ, |
|
14 C for components that are .le. 0, and if none are found, it |
|
15 C inverts the WT(I) in place. This replaces division operations |
|
16 C with multiplications in all norm evaluations. |
|
17 C IER is returned as 0 if all WT(I) were found positive, |
|
18 C and the first I with WT(I) .le. 0.0 otherwise. |
|
19 C----------------------------------------------------------------------- |
|
20 C |
|
21 IMPLICIT DOUBLE PRECISION(A-H,O-Z) |
|
22 DIMENSION WT(*) |
|
23 C |
|
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 |
|
31 C |
|
32 30 IER = I |
|
33 RETURN |
|
34 C |
|
35 C------END OF SUBROUTINE DINVWT----------------------------------------- |
|
36 END |