mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
added fatal error for no cmfd.xml file if cmfd is on in settings, otherwise tally system gets screwed up
This commit is contained in:
parent
e651b0bdef
commit
249a64c0f1
2 changed files with 26 additions and 10 deletions
|
|
@ -11,7 +11,8 @@ contains
|
|||
!===============================================================================
|
||||
|
||||
subroutine read_cmfd_xml()
|
||||
|
||||
|
||||
use error
|
||||
use global
|
||||
use output
|
||||
use string
|
||||
|
|
@ -28,13 +29,14 @@ contains
|
|||
filename = trim(path_input) // "cmfd.xml"
|
||||
inquire(FILE=filename, EXIST=file_exists)
|
||||
if (.not. file_exists) then
|
||||
! Since a tallies.xml file is optional, no error is issued here
|
||||
! CMFD is optional unless it is in on from settings
|
||||
if (cmfd_on) then
|
||||
message = "No CMFD XML file, '" // trim(filename) // "' does not exist!"
|
||||
call fatal_error()
|
||||
end if
|
||||
return
|
||||
else
|
||||
|
||||
! turn cmfd flag on
|
||||
! cmfd_on = .TRUE.
|
||||
|
||||
! tell user
|
||||
message = "Reading CMFD XML file..."
|
||||
call write_message(5)
|
||||
|
|
|
|||
|
|
@ -815,7 +815,11 @@ contains
|
|||
n_meshes = 0
|
||||
else
|
||||
n_user_meshes = size(mesh_)
|
||||
n_meshes = n_user_meshes + n_cmfd_meshes
|
||||
if (cmfd_on) then
|
||||
n_meshes = n_user_meshes + n_cmfd_meshes
|
||||
else
|
||||
n_meshes = n_user_meshes
|
||||
end if
|
||||
allocate(meshes(n_meshes))
|
||||
end if
|
||||
|
||||
|
|
@ -826,7 +830,11 @@ contains
|
|||
call warning()
|
||||
else
|
||||
n_user_tallies = size(tally_)
|
||||
if (cmfd_on) n_tallies = n_user_tallies + n_cmfd_tallies
|
||||
if (cmfd_on) then
|
||||
n_tallies = n_user_tallies + n_cmfd_tallies
|
||||
else
|
||||
n_tallies = n_user_tallies
|
||||
end if
|
||||
allocate(tallies(n_tallies))
|
||||
end if
|
||||
|
||||
|
|
@ -1198,9 +1206,15 @@ contains
|
|||
end do
|
||||
|
||||
! Determine number of types of tallies
|
||||
n_analog_tallies = n_user_analog_tallies + n_cmfd_analog_tallies
|
||||
n_tracklength_tallies = n_user_tracklength_tallies + n_cmfd_tracklength_tallies
|
||||
n_current_tallies = n_user_current_tallies + n_cmfd_current_tallies
|
||||
if (cmfd_on) then
|
||||
n_analog_tallies = n_user_analog_tallies + n_cmfd_analog_tallies
|
||||
n_tracklength_tallies = n_user_tracklength_tallies + n_cmfd_tracklength_tallies
|
||||
n_current_tallies = n_user_current_tallies + n_cmfd_current_tallies
|
||||
else
|
||||
n_analog_tallies = n_user_analog_tallies
|
||||
n_tracklength_tallies = n_user_tracklength_tallies
|
||||
n_current_tallies = n_user_current_tallies
|
||||
end if
|
||||
|
||||
! Allocate list of pointers for tallies by type
|
||||
allocate(analog_tallies(n_analog_tallies))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue