00001 C Work performed under the auspices of the U.S. Department of Energy 00002 C by Lawrence Livermore National Laboratory under contract number 00003 C W-7405-Eng-48. 00004 C 00005 SUBROUTINE DINVWT(NEQ,WT,IER) 00006 C 00007 C***BEGIN PROLOGUE DINVWT 00008 C***REFER TO DDASPK 00009 C***ROUTINES CALLED (NONE) 00010 C***DATE WRITTEN 950125 (YYMMDD) 00011 C***END PROLOGUE DINVWT 00012 C----------------------------------------------------------------------- 00013 C This subroutine checks the error weight vector WT, of length NEQ, 00014 C for components that are .le. 0, and if none are found, it 00015 C inverts the WT(I) in place. This replaces division operations 00016 C with multiplications in all norm evaluations. 00017 C IER is returned as 0 if all WT(I) were found positive, 00018 C and the first I with WT(I) .le. 0.0 otherwise. 00019 C----------------------------------------------------------------------- 00020 C 00021 IMPLICIT DOUBLE PRECISION(A-H,O-Z) 00022 DIMENSION WT(*) 00023 C 00024 DO 10 I = 1,NEQ 00025 IF (WT(I) .LE. 0.0D0) GO TO 30 00026 10 CONTINUE 00027 DO 20 I = 1,NEQ 00028 20 WT(I) = 1.0D0/WT(I) 00029 IER = 0 00030 RETURN 00031 C 00032 30 IER = I 00033 RETURN 00034 C 00035 C------END OF SUBROUTINE DINVWT----------------------------------------- 00036 END