dfnrmd.f

Go to the documentation of this file.
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 DFNRMD (NEQ, Y, T, YPRIME, R, CJ, WT, RES, IRES,
00006      *                   FNORM, WM, IWM, RPAR, IPAR)
00007 C
00008 C***BEGIN PROLOGUE  DFNRMD
00009 C***REFER TO  DLINSD
00010 C***DATE WRITTEN   941025   (YYMMDD)
00011 C
00012 C
00013 C-----------------------------------------------------------------------
00014 C***DESCRIPTION
00015 C
00016 C     DFNRMD calculates the scaled preconditioned norm of the nonlinear
00017 C     function used in the nonlinear iteration for obtaining consistent
00018 C     initial conditions.  Specifically, DFNRMD calculates the weighted
00019 C     root-mean-square norm of the vector (J-inverse)*G(T,Y,YPRIME),
00020 C     where J is the Jacobian matrix.
00021 C
00022 C     In addition to the parameters described in the calling program
00023 C     DLINSD, the parameters represent
00024 C
00025 C     R      -- Array of length NEQ that contains
00026 C               (J-inverse)*G(T,Y,YPRIME) on return.
00027 C     FNORM  -- Scalar containing the weighted norm of R on return.
00028 C-----------------------------------------------------------------------
00029 C
00030 C***ROUTINES CALLED
00031 C   RES, DSLVD, DDWNRM
00032 C
00033 C***END PROLOGUE  DFNRMD
00034 C
00035 C
00036       IMPLICIT DOUBLE PRECISION (A-H,O-Z)
00037       EXTERNAL RES
00038       DIMENSION Y(*), YPRIME(*), WT(*), R(*)
00039       DIMENSION WM(*),IWM(*), RPAR(*),IPAR(*)
00040 C-----------------------------------------------------------------------
00041 C     Call RES routine.
00042 C-----------------------------------------------------------------------
00043       IRES = 0
00044       CALL RES(T,Y,YPRIME,CJ,R,IRES,RPAR,IPAR)
00045       IF (IRES .LT. 0) RETURN
00046 C-----------------------------------------------------------------------
00047 C     Apply inverse of Jacobian to vector R.
00048 C-----------------------------------------------------------------------
00049       CALL DSLVD(NEQ,R,WM,IWM)
00050 C-----------------------------------------------------------------------
00051 C     Calculate norm of R.
00052 C-----------------------------------------------------------------------
00053       FNORM = DDWNRM(NEQ,R,WT,RPAR,IPAR)
00054 C
00055       RETURN
00056 C----------------------- END OF SUBROUTINE DFNRMD ----------------------
00057       END
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines