Merge branch 'Marc-use-IO' into 'development'

avoid duplicate lc function

See merge request damask/DAMASK!780
This commit is contained in:
Franz Roters 2023-07-19 07:13:15 +00:00
commit bfc2a76a0e
1 changed files with 11 additions and 31 deletions

View File

@ -16,15 +16,24 @@
#endif #endif
#include "../prec.f90" #include "../prec.f90"
#include "../parallelization.f90"
#include "../constants.f90"
#include "../misc.f90"
#include "../IO.f90"
#include "../YAML_types.f90"
#include "../YAML_parse.f90"
#include "../HDF5_utilities.f90"
module DAMASK_interface module DAMASK_interface
use prec
use, intrinsic :: ISO_fortran_env, only: & use, intrinsic :: ISO_fortran_env, only: &
compiler_version, & compiler_version, &
compiler_options compiler_options
use ifport, only: & use ifport, only: &
CHDIR CHDIR
use prec
use IO
implicit none(type,external) implicit none(type,external)
private private
@ -105,7 +114,7 @@ logical function solverIsSymmetric()
status='old', position='rewind', action='read',iostat=myStat) status='old', position='rewind', action='read',iostat=myStat)
do do
read (fileUnit,'(A)',END=100) line read (fileUnit,'(A)',END=100) line
if (index(trim(lc(line)),'solver') == 1) then if (index(trim(IO_lc(line)),'solver') == 1) then
read (fileUnit,'(A)',END=100) line ! next line read (fileUnit,'(A)',END=100) line ! next line
s = verify(line, ' ') ! start of first chunk s = verify(line, ' ') ! start of first chunk
s = s + verify(line(s+1:),' ') ! start of second chunk s = s + verify(line(s+1:),' ') ! start of second chunk
@ -114,40 +123,11 @@ logical function solverIsSymmetric()
end if end if
end do end do
100 close(fileUnit) 100 close(fileUnit)
contains
!--------------------------------------------------------------------------------------------------
!> @brief changes characters in string to lower case
!> @details copied from IO_lc
!--------------------------------------------------------------------------------------------------
function lc(string)
character(len=*), intent(in) :: string !< string to convert
character(len=len(string)) :: lc
character(26), parameter :: LOWER = 'abcdefghijklmnopqrstuvwxyz'
character(26), parameter :: UPPER = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
integer :: i,n
do i=1,len(string)
lc(i:i) = string(i:i)
n = index(UPPER,lc(i:i))
if (n/=0) lc(i:i) = LOWER(n:n)
end do
end function lc
end function solverIsSymmetric end function solverIsSymmetric
end module DAMASK_interface end module DAMASK_interface
#include "../parallelization.f90"
#include "../constants.f90"
#include "../misc.f90"
#include "../IO.f90"
#include "../YAML_types.f90"
#include "../YAML_parse.f90"
#include "../HDF5_utilities.f90"
#include "../result.f90" #include "../result.f90"
#include "../config.f90" #include "../config.f90"
#include "../LAPACK_interface.f90" #include "../LAPACK_interface.f90"