File: fortran_patches

package info (click to toggle)
ifeffit 2%3A1.2.11d-12.7
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 12,336 kB
  • sloc: fortran: 35,441; ansic: 8,458; makefile: 4,775; python: 3,315; perl: 3,144; sh: 2,721; ada: 1,003; tcl: 95
file content (58 lines) | stat: -rw-r--r-- 1,855 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
From: Carlo Segre <segre@debian.org>
Date: Tue, 6 Aug 2024 12:53:43 +0200
Subject: Patches to the FORTRAN source

  * Enable FEFF to calculate chi
  * Modify array dimensioning for increased capacity
---
 src/feff6/feff.f   | 10 +++++-----
 src/lib/iff_show.f |  8 ++++----
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/feff6/feff.f b/src/feff6/feff.f
index 3f7497b..0ec0092 100644
--- a/src/feff6/feff.f
+++ b/src/feff6/feff.f
@@ -117,11 +117,11 @@ c        Dump out fbetac for central atom and first pot
          call genfmt (ipr3, critcw, sig2g, iorder)
       endif
 
-c      if (mchi .eq. 1)  then
-c         call echo('Calculating chi...')
-c         call ff2chi (ipr4, critcw, s02, tk, thetad, icsig,
-c     1        vrcorr, vicorr)
-c      endif
+      if (mchi .eq. 1)  then
+         call echo('Calculating chi...')
+         call ff2chi (ipr4, critcw, s02, tk, thetad, icsig,
+     1        vrcorr, vicorr)
+      endif
 
        call echo('Feff done.  Have a nice day.')
        end
diff --git a/src/lib/iff_show.f b/src/lib/iff_show.f
index b628372..f54f7af 100644
--- a/src/lib/iff_show.f
+++ b/src/lib/iff_show.f
@@ -431,8 +431,8 @@ c
        character*(*) s, t , messg*256
        integer k, j, istrln
        external istrln
-       k = max(13, istrln(s))
-       j = max(2, istrln(t))
+       k = min(max(13, istrln(s)),256)
+       j = min(max(2, istrln(t)), 252-k)
        write(messg,11)  s(1:k), ' = ', t(1:j)
        call echo(messg)
  11    format('$',3a)
@@ -443,8 +443,8 @@ c
        character*(*) s, t , messg*256
        integer    k, j, istrln
        external istrln
-       k = max(14, istrln(s))
-       j = max(2, istrln(t))
+       k = min(max(14, istrln(s)), 256)
+       j = min(max(2, istrln(t)), 253-k)
        write(messg,11)  s(1:k), ': ', t(1:j)
        call echo(messg)
  11    format (3a)