From 9a95725ed5aef823ea0143d030ba751800cbd91b Mon Sep 17 00:00:00 2001 From: Rudolf Zeller <ru.zeller@fz-juelich.de> Date: Tue, 25 May 2021 17:56:43 +0200 Subject: [PATCH] Adds in input possible specification of the a_log parameter of the exponential mesh. Removes hard-coded a_log. --- source/KKRnano/source/CalculationData_mod.F90 | 2 +- .../KKRnano/source/datastructures/InputParamsNew.txt | 2 ++ .../KKRnano/source/datastructures/InputParams_mod.F90 | 10 ++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/source/KKRnano/source/CalculationData_mod.F90 b/source/KKRnano/source/CalculationData_mod.F90 index 8d5cd9ad0..56d1adbae 100644 --- a/source/KKRnano/source/CalculationData_mod.F90 +++ b/source/KKRnano/source/CalculationData_mod.F90 @@ -612,7 +612,7 @@ module CalculationData_mod call create(self%mesh_a(ila), irmd, ipand) - a_log_local = 0.025d0 + a_log_local = params%a_log b_log_local = inter_mesh%xrn(1)*params%alat / (exp(a_log_local * ((irmd-irid) - 1)) - 1.d0) call initRadialMesh(self=self%mesh_a(ila), alat=params%alat, xrn=inter_mesh%xrn, & diff --git a/source/KKRnano/source/datastructures/InputParamsNew.txt b/source/KKRnano/source/datastructures/InputParamsNew.txt index a958fde0d..bf982f4d3 100644 --- a/source/KKRnano/source/datastructures/InputParamsNew.txt +++ b/source/KKRnano/source/datastructures/InputParamsNew.txt @@ -120,3 +120,5 @@ i npan_eq 30 i ncheb 10 ### [NOCO] size of logarithmic panel d r_log 0.1D0 +### parameter a for exponential radial mesh +d a_log 0.025D0 diff --git a/source/KKRnano/source/datastructures/InputParams_mod.F90 b/source/KKRnano/source/datastructures/InputParams_mod.F90 index 55314ef0b..f6ada62cd 100644 --- a/source/KKRnano/source/datastructures/InputParams_mod.F90 +++ b/source/KKRnano/source/datastructures/InputParams_mod.F90 @@ -76,6 +76,7 @@ module InputParams_mod integer :: npan_eq integer :: ncheb double precision :: r_log + double precision :: a_log logical :: enable_quad_prec endtype ! InputParams @@ -619,6 +620,15 @@ integer function getValues(filename, self) result(ierror) destroy_and_return endif + ierror = getValue(cr, "a_log", self%a_log , def=0.025D0) + if (ierror == use_default) then + write(*,*) "WARNING: Bad/no value given for a_log. Set a_log to 0.025D0" + ierror = 0 ! ok, no error + elseif (ierror /= 0) then + write(*,*) "Bad/no value given for a_log." + destroy_and_return + endif + ierror = getValue(cr, "enable_quad_prec", self%enable_quad_prec , def=.false.) if (ierror == use_default) then write(*,*) "WARNING: Bad/no value given for enable_quad_prec. Set enable_quad_prec to .false." -- GitLab