File talys.patch of Package talys-1.97

diff -Naur /opt/talys/talys195/source/checkvalue.f ./source/checkvalue.f
--- /opt/talys/talys195/source/checkvalue.f	2019-12-28 15:44:53.000000000 +0200
+++ ./source/checkvalue.f	2021-04-14 10:00:26.000000000 +0300
@@ -775,12 +775,16 @@
         write(*,'(" TALYS-error: 0 <= jlmmode <= 3")')
         stop
       endif
-      if (lvadjust.lt.0.5.or.lvadjust.gt.1.5) then
-        write(*,'(" TALYS-error: 0.5 <= lvadjust <= 1.5")')
+      if ((lvadjust.lt.0.5.or.lvadjust.gt.1.5)
+     +   .and.(lvadjust.ne.-1.)) then
+        write(*,'(" TALYS-error: 0.5 <= lvadjust <= 1.5
+     +    or lvadjust=-1")')
         stop
       endif
-      if (lwadjust.lt.0.5.or.lwadjust.gt.1.5) then
-        write(*,'(" TALYS-error: 0.5 <= lwadjust <= 1.5")')
+      if ((lwadjust.lt.0.5.or.lwadjust.gt.1.5)
+     +   .and.(lwadjust.ne.-1.)) then
+        write(*,'(" TALYS-error: 0.5 <= lwadjust <= 1.5
+     +    or lwadjust=-1")')
         stop
       endif
       if (lv1adjust.lt.0.5.or.lv1adjust.gt.1.5) then
diff -Naur /opt/talys/talys195/source/mom.f ./source/mom.f
--- /opt/talys/talys195/source/mom.f	2019-12-28 15:44:53.000000000 +0200
+++ ./source/mom.f	2021-04-14 10:10:36.000000000 +0300
@@ -13,7 +13,7 @@
       integer      Zix,Nix,Z,N,A,i,j
       double precision       pZ,e,lv,lw,lv1,lw1,lvso,lwso
       real         factor,rhomomn(numjlm,6),rhomomp(numjlm,6),
-     +             vpot(numjlm,6),rcjlm,alam
+     +             vpot(numjlm,6),rcjlm,alam,demfactor
 c
 c *********************** Parameterization *****************************
 c
@@ -64,9 +64,21 @@
       if (ompadjustp(1)) then
         key='lvadjust'
         call adjust(real(e),key,0,0,0,0,factor)
+        if(lvadjust.lt.0.) then
+          call demadjust(real(e),key,Zix,Nix,pZ,demfactor)
+          write(0,'("lvadjust, factor, demfactor: ",3f10.5)') lvadjust,
+     &          factor,demfactor
+          factor=factor*demfactor
+        endif
         lv=factor*lvadjust*lv
         key='lwadjust'
         call adjust(real(e),key,0,0,0,0,factor)
+        if(lwadjust.lt.0.) then
+          call demadjust(real(e),key,Zix,Nix,pZ,demfactor)
+          write(0,'("lwadjust, factor, demfactor: ",3f10.5)') lwadjust,
+     &          factor,demfactor
+          factor=factor*demfactor
+        endif
         lw=factor*lwadjust*lw
         key='lv1adjust'
         call adjust(real(e),key,0,0,0,0,factor)
diff -Naur /opt/talys/talys195/source/NelliFactors.f ./source/NelliFactors.f
--- /opt/talys/talys195/source/NelliFactors.f	1970-01-01 02:00:00.000000000 +0200
+++ ./source/NelliFactors.f	2021-04-14 10:00:29.000000000 +0300
@@ -0,0 +1,63 @@
+      subroutine demadjust(E,key,Zix,Nix,pZ,factor)
+
+      include "talys.cmb"
+
+      character*80 key
+      integer      Zix,Nix,Z,N,A
+      double precision       pZ
+      real         E,factor
+      real       NelliFactor, ii
+
+      A=AA(Zix,Nix,0)
+      Z=ZZ(Zix,Nix,0)
+      N=A-Z
+
+      if(key.eq.'lvadjust') then
+        factor=1./lvadjust
+      else if(key.eq.'lwadjust') then
+        factor=1./lwadjust
+      else if(key.eq.'lv1adjust') then
+        factor=1./lv1adjust
+      else if(key.eq.'lw1adjust') then
+        factor=1./lw1adjust
+      else if(key.eq.'lvsoadjust') then
+        factor=1./lvsoadjust
+      else if(key.eq.'lwsoadjust') then
+        factor=1./lwsoadjust
+      endif
+      
+      NelliFactor=1.
+      if(key.eq.'lvadjust') then
+        if(lvadjust.eq.-1)then
+          if(pZ.eq.Z) then
+            if (A.lt.47) then
+              NelliFactor=1.
+            else if(A.ge.47.and.A.lt.100) then
+              NelliFactor=(1.6e-4*A*A)-(0.03*A)+2.16
+            else if(A.ge.100.and.A.le.162) then
+              NelliFactor=5.9*log(0.25*log(dble(A)))
+            else if(A.gt.162) then
+              NelliFactor=1.
+            endif
+          endif
+        endif
+      else if(key.eq.'lwadjust') then
+        if(lwadjust.eq.-1)then
+          if(pZ.eq.Z) then
+            if (A.lt.47) then
+              NelliFactor=1.
+            else if(A.ge.47.and.A.le.162) then
+              NelliFactor=1.5
+            else if(A.gt.162) then
+              NelliFactor=1.
+            endif
+          endif
+        endif
+      endif
+      
+      ii=ANINT(NelliFactor*10)
+      NelliFactor=ii/10
+      factor=factor*NelliFactor
+
+      return
+      end
openSUSE Build Service is sponsored by