source: trunk/fsource/powsubs/lorentz.for @ 209

Last change on this file since 209 was 209, checked in by vondreele, 11 years ago

fortran fixes - new self contained libraries
had to change all INCLUDE copyright lines.

File size: 1.0 KB
Line 
1      SUBROUTINE LORENTZ(DT,GAM,FUNC,DLDT,DLDG)
2
3!PURPOSE:Calculate Lorentzian function & derivatives
4
5      INCLUDE       'INCLDS/COPYRIGT.FOR' 
6
7!PSEUDOCODE:
8
9!CALLING ARGUMENTS:
10
11      REAL*4        DT                  !Delta
12      REAL*4        GAM                 !Coefficient
13      REAL*4        FUNC                !Function
14      REAL*4        DLDT                !df/dt
15      REAL*4        DLDG                !df/dg
16
17!INCLUDE STATEMENTS:
18
19!LOCAL VARIABLES:
20
21!SUBROUTINES CALLED:
22
23!FUNCTION DEFINITIONS:
24
25!DATA STATEMENTS:
26
27      DATA            PI/3.1415292654/
28!CODE:
29
30      FNORM = 2.0*GAM/PI
31      DENOM = GAM**2+4.0*DT**2
32      IF ( ABS(GAM).GT.5.0E-6 ) THEN
33        FUNC = FNORM/DENOM
34        DLDT = -8.0*DT*FUNC/DENOM
35        DLDG = (8.0*DT**2-2.0*GAM**2)/(PI*DENOM**2)
36      ELSE
37        FUNC = 0.0
38        DLDT = 0.0
39        IF ( ABS(DT).LT.1.0E-5 ) THEN
40          DLDG = 0.0
41        ELSE
42          DLDG = 2.0/(PI*DT**2)
43        END IF
44      END IF
45      RETURN
46      END
Note: See TracBrowser for help on using the repository browser.