Skip to content
Snippets Groups Projects
Commit 62138ffd authored by Rudolf Zeller's avatar Rudolf Zeller
Browse files

Allow for adjusting length factor of intervals of logarithmic mesh

parent bdc6bba2
No related branches found
No related tags found
No related merge requests found
......@@ -521,7 +521,7 @@ module CalculationData_mod
call create(self%cheb_mesh_a(ila), irmd_cheb, npan_tot_cheb, self%cell_a(ila)%nfu, params) ! create data for new radial mesh for atom iatom
endif
if (dims%korbit == 1) then ! NOCO
call construct(params%r_log,params%npan_log,params%npan_eq,params%ncheb, &
call construct(params%r_fac,params%r_log,params%npan_log,params%npan_eq,params%ncheb, &
self%cheb_mesh_a(ila)%npan_lognew,self%cheb_mesh_a(ila)%npan_eqnew, &
self%cheb_mesh_a(ila)%npan_tot,self%cheb_mesh_a(ila)%rnew, &
self%cheb_mesh_a(ila)%rpan_intervall,self%cheb_mesh_a(ila)%ipan_intervall, &
......
......@@ -327,7 +327,7 @@ endsubroutine ! read
!----------------------------------------------------------------------------
!> Construct Chebyshev mesh
subroutine ConstructChebMesh(r_log,npan_log,npan_eq,ncheb, &
subroutine ConstructChebMesh(r_fac,r_log,npan_log,npan_eq,ncheb, &
npan_lognew,npan_eqnew, &
npan_tot,rnew,rpan_intervall,ipan_intervall, &
thetasnew,thetas,nfu,radial_mesh) ! new parameters
......@@ -335,6 +335,7 @@ subroutine ConstructChebMesh(r_log,npan_log,npan_eq,ncheb, &
!use read_formatted_shapefun_mod, only: shapefunfile
use RadialMeshData_mod, only: RadialMeshData
double precision, intent(in) :: r_fac
double precision, intent(in) :: r_log
integer, intent(in) :: npan_log
integer, intent(in) :: npan_eq
......@@ -350,7 +351,6 @@ double precision, intent(in) :: thetas(:,:)
integer, intent(in) :: nfu
type(RadialMeshData), intent(in) :: radial_mesh
double precision, parameter :: fac=2d0
integer :: ipotm,ir2,ip, &
ishift,ilogpanshift,ilinpanshift,npan_logtemp,npan_inst,imin,imax,iminnew,imaxnew,lm1
double precision :: rmin,rmax,rval
......@@ -380,7 +380,7 @@ ipotm=0
end if
do ip=0,npan_log-ilogpanshift
rval=(fac**ip-1d0)/(fac**(npan_log-ilogpanshift)-1d0)
rval=(r_fac**ip-1d0)/(r_fac**(npan_log-ilogpanshift)-1d0)
rpan_intervall(ip+ishift)= rmin+rval*(rmax-rmin)
ipan_intervall(ip+ishift)= (ip+ishift)*(ncheb+1)
if (ishift == 0.and. rpan_intervall(ip) > radial_mesh%r(radial_mesh%irmin)) then
......
......@@ -118,5 +118,7 @@ i npan_log 30
i npan_eq 30
### [NOCO] number of Chebychev points in panel
i ncheb 10
### [NOCO] factor between interval lengthss in logarithmic panel
d r_fac 2.0D0
### [NOCO] size of logarithmic panel
d r_log 0.1D0
......@@ -75,6 +75,7 @@ module InputParams_mod
integer :: npan_log
integer :: npan_eq
integer :: ncheb
double precision :: r_fac
double precision :: r_log
endtype ! InputParams
......@@ -609,6 +610,15 @@ integer function getValues(filename, self) result(ierror)
destroy_and_return
endif
ierror = getValue(cr, "r_fac", self%r_fac , def=2.0D0)
if (ierror == use_default) then
write(*,*) "WARNING: Bad/no value given for r_fac. Set r_fac to 2.0D0"
ierror = 0 ! ok, no error
elseif (ierror /= 0) then
write(*,*) "Bad/no value given for r_fac."
destroy_and_return
endif
ierror = getValue(cr, "r_log", self%r_log , def=0.1D0)
if (ierror == use_default) then
write(*,*) "WARNING: Bad/no value given for r_log. Set r_log to 0.1D0"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment