preparing to clean FEsolving
should not have solver dependent functionality
This commit is contained in:
parent
bd67d2bb6a
commit
f0ad18102d
|
@ -47,8 +47,7 @@ subroutine FE_init
|
||||||
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
|
||||||
chunkPos = IO_stringPos(line)
|
if(index(trim(lc(line)),'solver') == 1) then
|
||||||
if(IO_lc(IO_stringValue(line,chunkPos,1)) == 'solver') then
|
|
||||||
read (fileUnit,'(A)',END=100) line ! next line
|
read (fileUnit,'(A)',END=100) line ! next line
|
||||||
chunkPos = IO_stringPos(line)
|
chunkPos = IO_stringPos(line)
|
||||||
symmetricSolver = (IO_intValue(line,chunkPos,2) /= 1)
|
symmetricSolver = (IO_intValue(line,chunkPos,2) /= 1)
|
||||||
|
@ -56,6 +55,29 @@ subroutine FE_init
|
||||||
enddo
|
enddo
|
||||||
100 close(fileUnit)
|
100 close(fileUnit)
|
||||||
end block
|
end block
|
||||||
|
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)
|
||||||
|
enddo
|
||||||
|
end function lc
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
end subroutine FE_init
|
end subroutine FE_init
|
||||||
|
|
|
@ -452,10 +452,10 @@ pure function IO_lc(string)
|
||||||
character(26), parameter :: LOWER = 'abcdefghijklmnopqrstuvwxyz'
|
character(26), parameter :: LOWER = 'abcdefghijklmnopqrstuvwxyz'
|
||||||
character(26), parameter :: UPPER = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
character(26), parameter :: UPPER = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
||||||
|
|
||||||
integer :: i,n
|
integer :: i,n
|
||||||
|
|
||||||
IO_lc = string
|
|
||||||
do i=1,len(string)
|
do i=1,len(string)
|
||||||
|
IO_lc(i:i) = string(i:i)
|
||||||
n = index(UPPER,IO_lc(i:i))
|
n = index(UPPER,IO_lc(i:i))
|
||||||
if (n/=0) IO_lc(i:i) = LOWER(n:n)
|
if (n/=0) IO_lc(i:i) = LOWER(n:n)
|
||||||
enddo
|
enddo
|
||||||
|
|
Loading…
Reference in New Issue