From 8e6f9bec63af485ea033e5fcd3f54727cf566165 Mon Sep 17 00:00:00 2001 From: kamischi <karl-michael.schindler@web.de> Date: Sat, 18 May 2024 00:13:59 +0200 Subject: [PATCH] fix compilation of eels and eels-boson. also refactor implicit function zero in surlos. --- source/f90/doeels.f90 | 4 ++-- source/f90/eels-boson.f90 | 1 + source/f90/eels.f90 | 2 ++ source/f90/surlos.f90 | 10 ++++++++-- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/source/f90/doeels.f90 b/source/f90/doeels.f90 index d953363..7cd6ee4 100644 --- a/source/f90/doeels.f90 +++ b/source/f90/doeels.f90 @@ -1,4 +1,4 @@ -module mod_doeels +module doeels_mod contains subroutine doeels (e0, theta, phia, phib, wmin, wmax, dw, comment, comment_size, & layers, neps, nper, name, name_size, thick, epsinf, nos, osc, osc_size,& @@ -235,4 +235,4 @@ subroutine doeels (e0, theta, phia, phib, wmin, wmax, dw, comment, comment_size, 120 format(40x, f10.2, d12.4, f10.2) 130 format(2x, f5.1, 3x, f11.3, d14.5) end subroutine doeels -end module mod_doeels +end module doeels_mod diff --git a/source/f90/eels-boson.f90 b/source/f90/eels-boson.f90 index 3c5363a..1bff054 100644 --- a/source/f90/eels-boson.f90 +++ b/source/f90/eels-boson.f90 @@ -9,6 +9,7 @@ program eels_boson ! ****************************************************************** use get_commandline_options_mod + use doeels_mod implicit none diff --git a/source/f90/eels.f90 b/source/f90/eels.f90 index 85c9105..3eb1277 100644 --- a/source/f90/eels.f90 +++ b/source/f90/eels.f90 @@ -8,6 +8,8 @@ program eels ! * * ! ****************************************************************** + use doeels_mod + implicit none double precision :: e0, theta, phia, phib, wmin, wmax, dw diff --git a/source/f90/surlos.f90 b/source/f90/surlos.f90 index ec92d72..b721f65 100644 --- a/source/f90/surlos.f90 +++ b/source/f90/surlos.f90 @@ -1,5 +1,11 @@ module surlos_mod contains + +logical function zero(z) + double complex, intent(in) :: z + zero = (dble(z) == 0.0d0) .and. (dimag(z) == 0.0d0) +end function zero + double precision function surlos(dk, eps, thick, layers, nper) ! ****************************************************************** @@ -22,7 +28,7 @@ double precision function surlos(dk, eps, thick, layers, nper) integer, intent(in) :: layers, nper integer :: lmax - logical :: static, zero, skip + logical :: static, skip integer :: lstart, n double precision, allocatable :: arg(:) double precision :: argmin, argmax, cn, cnm1, epsmac, sn, snm1, tn @@ -33,7 +39,7 @@ double precision function surlos(dk, eps, thick, layers, nper) epsmac = epsmac / 2 argmax = 0.5d0 * dlog(2 / epsmac) - zero(z) = (dble(z) == 0.0d0) .and. (dimag(z) == 0.0d0) +! zero(z) = (dble(z) == 0.0d0) .and. (dimag(z) == 0.0d0) ! write (*,*) 'surlos:' ! write (*,*) 'thick: ', size(thick) -- GitLab