mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Removed DEPRECATION prefix from warnings in #313
This commit is contained in:
parent
4a463bb8e3
commit
63a30f062a
2 changed files with 12 additions and 26 deletions
|
|
@ -18,36 +18,24 @@ contains
|
|||
! stream.
|
||||
!===============================================================================
|
||||
|
||||
subroutine warning(message_in, deprecation)
|
||||
subroutine warning(message)
|
||||
|
||||
character(*) :: message_in ! printed with the warning
|
||||
logical, optional, intent(in) :: deprecation ! is a depreciation warning
|
||||
character(*) :: message
|
||||
|
||||
integer :: i_start ! starting position
|
||||
integer :: i_end ! ending position
|
||||
integer :: line_wrap ! length of line
|
||||
integer :: length ! length of message
|
||||
integer :: indent ! length of indentation
|
||||
character(:), allocatable :: message ! input message with a prefix
|
||||
integer :: i_start ! starting position
|
||||
integer :: i_end ! ending position
|
||||
integer :: line_wrap ! length of line
|
||||
integer :: length ! length of message
|
||||
integer :: indent ! length of indentation
|
||||
|
||||
! Write warning at beginning
|
||||
write(ERROR_UNIT, fmt='(1X,A)', advance='no') 'WARNING: '
|
||||
|
||||
! Set line wrapping and indentation
|
||||
line_wrap = 80
|
||||
indent = 10
|
||||
|
||||
! Determine length of message
|
||||
length = len_trim(message_in)
|
||||
|
||||
! Prefix the message
|
||||
if (.not. present(deprecation)) then
|
||||
allocate(character(length+9) :: message)
|
||||
message = 'WARNING: ' // message_in
|
||||
else if (deprecation) then
|
||||
allocate(character(length+23) :: message)
|
||||
message = 'DEPRECATION WARNING: ' // message_in
|
||||
else
|
||||
allocate(character(length+9) :: message)
|
||||
message = 'WARNING: ' // message_in
|
||||
end if
|
||||
length = len_trim(message)
|
||||
|
||||
i_start = 0
|
||||
|
|
@ -80,8 +68,6 @@ contains
|
|||
end if
|
||||
end do
|
||||
|
||||
deallocate(message)
|
||||
|
||||
end subroutine warning
|
||||
|
||||
!===============================================================================
|
||||
|
|
|
|||
|
|
@ -1300,7 +1300,7 @@ contains
|
|||
call warning("The use of 'width' is deprecated and will be disallowed &
|
||||
&in a future release. Use 'pitch' instead. The utility openmc/&
|
||||
&src/utils/update_inputs.py can be used to automatically update &
|
||||
&geometry.xml files.", deprecation=.true.)
|
||||
&geometry.xml files.")
|
||||
if (get_arraysize_double(node_lat, "width") /= n) then
|
||||
call fatal_error("Number of entries on <pitch> must be the same as &
|
||||
&the number of entries on <dimension>.")
|
||||
|
|
@ -1323,7 +1323,7 @@ contains
|
|||
if (check_for_node(node_lat, "type")) then
|
||||
call warning("The use of 'type' is no longer needed. The utility &
|
||||
&openmc/src/utils/update_inputs.py can be used to automatically &
|
||||
&update geometry.xml files.", deprecation=.true.)
|
||||
&update geometry.xml files.")
|
||||
end if
|
||||
|
||||
! Copy number of dimensions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue