mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Added checks for no cells or surfaces.
This commit is contained in:
parent
b00a697078
commit
623844d47a
1 changed files with 18 additions and 2 deletions
|
|
@ -358,8 +358,16 @@ contains
|
|||
! Parse geometry.xml file
|
||||
call read_xml_file_geometry_t(filename)
|
||||
|
||||
! Allocate cells array
|
||||
! Get number of <cell> tags
|
||||
n_cells = size(cell_)
|
||||
|
||||
! Check for no cells
|
||||
if (n_cells == 0) then
|
||||
message = "No cells found in geometry.xml!"
|
||||
call fatal_error()
|
||||
end if
|
||||
|
||||
! Allocate cells array
|
||||
allocate(cells(n_cells))
|
||||
|
||||
n_universes = 0
|
||||
|
|
@ -440,8 +448,16 @@ contains
|
|||
! ==========================================================================
|
||||
! READ SURFACES FROM GEOMETRY.XML
|
||||
|
||||
! Allocate cells array
|
||||
! Get number of <surface> tags
|
||||
n_surfaces = size(surface_)
|
||||
|
||||
! Check for no surfaces
|
||||
if (n_surfaces == 0) then
|
||||
message = "No surfaces found in geometry.xml!"
|
||||
call fatal_error()
|
||||
end if
|
||||
|
||||
! Allocate cells array
|
||||
allocate(surfaces(n_surfaces))
|
||||
|
||||
do i = 1, n_surfaces
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue