mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Removed fileio module.
This commit is contained in:
parent
154da86236
commit
2cf2e22bf8
4 changed files with 0 additions and 97 deletions
|
|
@ -4,7 +4,6 @@ ace.o: datatypes.o
|
|||
ace.o: datatypes_header.o
|
||||
ace.o: endf.o
|
||||
ace.o: error.o
|
||||
ace.o: fileio.o
|
||||
ace.o: fission.o
|
||||
ace.o: global.o
|
||||
ace.o: material_header.o
|
||||
|
|
@ -39,10 +38,6 @@ energy_grid.o: datatypes_header.o
|
|||
energy_grid.o: global.o
|
||||
energy_grid.o: output.o
|
||||
|
||||
fileio.o: constants.o
|
||||
fileio.o: global.o
|
||||
fileio.o: string.o
|
||||
|
||||
fission.o: ace_header.o
|
||||
fission.o: constants.o
|
||||
fission.o: error.o
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ endf.o \
|
|||
endf_header.o \
|
||||
energy_grid.o \
|
||||
error.o \
|
||||
fileio.o \
|
||||
fission.o \
|
||||
geometry.o \
|
||||
geometry_header.o \
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ module ace
|
|||
use datatypes_header, only: DictionaryCI, ListKeyValueCI
|
||||
use endf, only: reaction_name
|
||||
use error, only: fatal_error
|
||||
use fileio, only: read_line, skip_lines
|
||||
use fission, only: nu_total
|
||||
use global
|
||||
use material_header, only: Material
|
||||
|
|
|
|||
|
|
@ -1,90 +0,0 @@
|
|||
module fileio
|
||||
|
||||
use constants
|
||||
use global, only: MAX_LINE_LEN, MAX_WORD_LEN, MAX_WORDS
|
||||
use string, only: split_string_wl, lower_case
|
||||
|
||||
implicit none
|
||||
|
||||
contains
|
||||
|
||||
!===============================================================================
|
||||
! READ_LINE reads a line from a file open on a unit
|
||||
!===============================================================================
|
||||
|
||||
subroutine read_line(unit, line, ioError)
|
||||
|
||||
integer, intent(in) :: unit ! unit to read from
|
||||
character(*), intent(out) :: line ! line to return
|
||||
integer, intent(out) :: ioError ! error status
|
||||
|
||||
read(UNIT=unit, FMT='(A)', IOSTAT=ioError) line
|
||||
|
||||
end subroutine read_line
|
||||
|
||||
!===============================================================================
|
||||
! GET_NEXT_LINE reads the next line to the file connected on the specified unit
|
||||
! including any continuation lines. If a line ends in an ampersand, the next
|
||||
! line is read and its words are appended to the final array
|
||||
!===============================================================================
|
||||
|
||||
subroutine get_next_line(unit, words, n, ioError)
|
||||
|
||||
integer, intent(in) :: unit ! unit to read from
|
||||
character(*), intent(out) :: words(MAX_WORDS) ! words read
|
||||
integer, intent(out) :: n ! number of words
|
||||
integer, intent(out) :: ioError ! error status
|
||||
|
||||
character(MAX_LINE_LEN) :: line ! single line
|
||||
character(MAX_WORD_LEN) :: local_words(MAX_WORDS) ! words on one line
|
||||
integer :: index_word ! index of words
|
||||
|
||||
index_word = 0
|
||||
do
|
||||
! read line from file
|
||||
read(UNIT=unit, FMT='(A100)', IOSTAT=ioError) line
|
||||
|
||||
! if we're at the end of the file, return
|
||||
if (ioError /= 0) return
|
||||
|
||||
! split a single line into words
|
||||
call split_string_wl(line, local_words, n)
|
||||
|
||||
! if there are no words, we're done
|
||||
if (n == 0) exit
|
||||
|
||||
! Check whether there is a continuation line
|
||||
if (local_words(n) == '&') then
|
||||
words(index_word+1:index_word+n-1) = local_words(1:n-1)
|
||||
index_word = index_word + n - 1
|
||||
else
|
||||
words(index_word+1:index_word+n) = local_words(1:n)
|
||||
index_word = index_word + n
|
||||
exit
|
||||
end if
|
||||
end do
|
||||
|
||||
! set total number of words
|
||||
n = index_word
|
||||
|
||||
end subroutine get_next_line
|
||||
|
||||
!===============================================================================
|
||||
! SKIP_LINES skips 'n_lines' lines from a file open on a unit
|
||||
!===============================================================================
|
||||
|
||||
subroutine skip_lines(unit, n_lines, ioError)
|
||||
|
||||
integer, intent(in) :: unit ! unit to read from
|
||||
integer, intent(in) :: n_lines ! number of lines to skip
|
||||
integer, intent(out) :: ioError ! error status
|
||||
|
||||
integer :: i ! index for number of lines
|
||||
|
||||
do i = 1, n_lines
|
||||
read(UNIT=unit, FMT=*, IOSTAT=ioError)
|
||||
end do
|
||||
|
||||
end subroutine skip_lines
|
||||
|
||||
end module fileio
|
||||
Loading…
Add table
Add a link
Reference in a new issue