From 2cf2e22bf8887c7b1b2602b13a5a8a92a4b10730 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Tue, 20 Dec 2011 14:28:51 -0500 Subject: [PATCH] Removed fileio module. --- src/DEPENDENCIES | 5 --- src/OBJECTS | 1 - src/ace.F90 | 1 - src/fileio.F90 | 90 ------------------------------------------------ 4 files changed, 97 deletions(-) delete mode 100644 src/fileio.F90 diff --git a/src/DEPENDENCIES b/src/DEPENDENCIES index 977875c1cb..bec099edaa 100644 --- a/src/DEPENDENCIES +++ b/src/DEPENDENCIES @@ -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 diff --git a/src/OBJECTS b/src/OBJECTS index bbf3b2a257..caf0737868 100644 --- a/src/OBJECTS +++ b/src/OBJECTS @@ -10,7 +10,6 @@ endf.o \ endf_header.o \ energy_grid.o \ error.o \ -fileio.o \ fission.o \ geometry.o \ geometry_header.o \ diff --git a/src/ace.F90 b/src/ace.F90 index f4d5cf374e..3ab71869f4 100644 --- a/src/ace.F90 +++ b/src/ace.F90 @@ -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 diff --git a/src/fileio.F90 b/src/fileio.F90 deleted file mode 100644 index 84aae2c83a..0000000000 --- a/src/fileio.F90 +++ /dev/null @@ -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