Skip to content
Snippets Groups Projects
Commit 64070425 authored by Jonathan Chico's avatar Jonathan Chico
Browse files

Changes to merge verify77 into a single version

parent be427168
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,7 @@
add_executable(
Pkkr.x
source/common/mod_verify77.f90
source/PKKprime/main.f90
source/PKKprime/type_inc.F90
source/PKKprime/mod_mympi.F90
......@@ -45,6 +46,7 @@ endif()
add_executable(
band.x
source/common/mod_verify77.f90
source/PKKprime/type_inc.F90
source/PKKprime/mod_mympi.F90
source/PKKprime/mod_ioformat.f90
......@@ -65,6 +67,7 @@ endif()
add_executable(
mergerefined.x
source/common/mod_verify77.f90
source/PKKprime/type_inc.F90
source/PKKprime/mod_mympi.F90
source/PKKprime/mod_ioformat.f90
......@@ -93,6 +96,7 @@ endif()
add_executable(
refineBZparts.x
source/common/mod_verify77.f90
source/PKKprime/mod_mathtools.f90
source/PKKprime/mod_vtkxml.f90
source/PKKprime/mod_ioinput.f90
......@@ -105,6 +109,7 @@ endif()
add_executable(
Amatprecalc.x
source/common/mod_verify77.f90
source/PKKprime/type_inc.F90
source/PKKprime/mod_mympi.F90
source/PKKprime/mod_ioformat.f90
......@@ -135,6 +140,7 @@ endif()
add_executable(
calculate_spinmixing.x
source/common/mod_verify77.f90
source/PKKprime/calculate_spinmixing.F90
source/PKKprime/type_inc.F90
source/PKKprime/mod_mympi.F90
......@@ -166,6 +172,7 @@ endif()
add_executable(
visdata.x
source/common/mod_verify77.f90
source/PKKprime/visdata.F90
source/PKKprime/type_inc.F90
source/PKKprime/mod_mympi.F90
......@@ -197,6 +204,7 @@ endif()
add_executable(
vis2int.x
source/common/mod_verify77.f90
source/PKKprime/vis2int.F90
source/PKKprime/type_inc.F90
source/PKKprime/mod_mympi.F90
......@@ -228,6 +236,7 @@ endif()
add_executable(
test.x
source/common/mod_verify77.f90
source/PKKprime/type_inc.F90
source/PKKprime/mod_mympi.F90
source/PKKprime/mod_ioformat.f90
......
# the executable is built from this list of files
add_executable(
voronoi.exe
source/common/mod_verify77.f90
source/common/version.F90
source/common/version_info.F90
source/voronoi/crospr.f
......
......@@ -51,15 +51,20 @@ contains
!-------------------------------------------------------------------------------
SUBROUTINE IOinput(CHARKEY,CHAR,ILINE,IFILE,IERROR)
use mod_verify77, only : VERIFY77
implicit none
CHARACTER CHARKEY*10
CHARACTER(len=10) :: CHARKEY
CHARACTER CHAR*80
INTEGER ILINE,IERROR,IFILE
integer i,ios,ier,npt,ilen,ipos,ipos1,iklen
CHARACTER STRING(500)*80
CHARACTER STRING1*80
CHARACTER ATEST
!
character(len=*), parameter :: abc = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_<>'
integer, parameter :: NABC = len(abc)
integer, parameter :: NCHAR = len(CHARKEY)
IERROR = 0
CHAR(1:50)=' '
OPEN(UNIT=ifile,status='OLD',FILE='inputFS',iostat=ios,err=2000)
......@@ -82,7 +87,7 @@ contains
! ILEN = VERIFY(CHARKEY,ABC)
! IKLEN= VERIFY(CHARKEY,' ')
! for linux
CALL VERIFY77(CHARKEY,ILEN, IKLEN)
CALL VERIFY77(NABC,ABC,NCHAR,CHARKEY,ILEN,IKLEN)
! for linux
! write(6,*) CHARKEY(1:ILEN-1),ILEN,IKLEN
IF(ILEN.LT.1) THEN
......@@ -147,40 +152,4 @@ contains
1005 FORMAT(4I4)
END SUBROUTINE IOinput
!-------------------------------------------------------------------------------
!> Summary: Find position of first space and letter
!> Author:
!> Category: PKKprime, input-output
!> Deprecated: False ! This needs to be set to True for deprecated subroutines
!>
!> This subroutine returns the position of the first space character
!> in ipos2, and the position of the first letter in the string STR1
!-------------------------------------------------------------------------------
SUBROUTINE VERIFY77(STR1,ipos1,ipos2)
implicit none
CHARACTER STR1*10
CHARACTER ABC*37
CHARACTER CHAR*1
integer ipos,ipos1,ipos2,i,j
DATA ABC/'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-'/
ipos2 =0
!
ipos1 = INDEX(STR1,' ')
do j=1,10
char = str1(j:j)
! write(6,*) 'char : ',j, char
ipos = 0
do i=1,37
ipos = INDEX(CHAR,ABC(I:I))
if (IPOS.GT.0) THEN
ipos2 = j
RETURN
end if
end do
end do
RETURN
END SUBROUTINE VERIFY77
end module mod_ioinput
......@@ -135,7 +135,6 @@ contains
end subroutine ioinput
!-------------------------------------------------------------------------------
!> Summary: Read inputcard and store to array
!> Author: Bernd Zimmermann
......@@ -294,45 +293,6 @@ contains
end subroutine capitalize_escaped_keywords
!-------------------------------------------------------------------------------
!> Summary: Return position of first whitespace and letter
!> Author:
!> Category: KKRhost, input-output
!> Deprecated: True ! This needs to be set to True for deprecated subroutines
!>
!> This sub returns the position of the first space character
!> in ipos2, and the position of the first letter in the string
!> STR1
!-------------------------------------------------------------------------------
subroutine verify77(nabc, abc, nchar, str1, ipos1, ipos2)
implicit none
integer :: nchar, nabc
character (len=nchar) :: str1
character (len=nabc) :: abc
character (len=1) :: char
integer :: ipos, ipos1, ipos2, i, j
ipos2 = 0
ipos1 = index(str1, ' ')
do j = 1, 10
char = str1(j:j+1)
ipos = 0
do i = 1, 40
ipos = index(char, abc(i:i))
if (ipos>0) then
ipos2 = j
return
end if
end do
end do
return
end subroutine verify77
!-------------------------------------------------------------------------------
!> Summary: Convert a sting to upper case
!> Author: Bernd Zimmermann
......
module mod_verify77
contains
!-------------------------------------------------------------------------------
!> Summary: Return position of first whitespace and letter
!> Author:
!> Category: KKRhost, input-output
!> Deprecated: True ! This needs to be set to True for deprecated subroutines
!>
!> This sub returns the position of the first space character
!> in ipos2, and the position of the first letter in the string
!> STR1
!-------------------------------------------------------------------------------
subroutine verify77(nabc, abc, nchar, str1, ipos1, ipos2)
implicit none
integer, intent(in) :: nchar !! length of the string
integer, intent(in) :: nabc !! length of the second string
character (len=nchar) :: str1
character (len=nabc) :: abc
character (len=1) :: char
integer :: ipos, ipos1, ipos2, i, j
ipos2 = 0
ipos1 = index(str1, ' ')
do j = 1,nchar-1
char = str1(j:j+1)
ipos = 0
do i = 1, nchar
ipos = index(char, abc(i:i))
if (ipos>0) then
ipos2 = j
return
end if
end do
end do
return
end subroutine verify77
end module mod_verify77
\ No newline at end of file
SUBROUTINE IOinput(CHARKEY,CHAR,ILINE,IFILE,IERROR)
use mod_verify77, only : VERIFY77
c *********************************************************
c * This subroutine is responsible for the I/O
c * with the input file.
......@@ -135,35 +137,4 @@ Cccc end if
STOP
END
SUBROUTINE VERIFY77(NABC,ABC,NCHAR,STR1,ipos1,ipos2)
implicit none
c#@# KKRtags: VORONOI
c This sub returns the position of the first space character
c in ipos2, and the position of the first letter in the string
c STR1
c
INTEGER NCHAR,NABC
CHARACTER STR1*NCHAR
CHARACTER ABC*NABC
CHARACTER CHAR*1
integer ipos,ipos1,ipos2,i,j
! DATA ABC/'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_<>'/
ipos2 =0
c
ipos1 = INDEX(STR1,' ')
do j=1,10
char = str1(j:j+1)
c write(6,*) 'char : ',j, char
ipos = 0
do i=1,40
ipos = INDEX(CHAR,ABC(I:I))
if (IPOS.GT.0) THEN
ipos2 = j
RETURN
end if
end do
end do
RETURN
END
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