mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Merge branches 'master' and 'cmfd' into cmfd
This commit is contained in:
commit
eda0309e6e
5 changed files with 19 additions and 11 deletions
|
|
@ -27,7 +27,7 @@ contains
|
|||
|
||||
! show timing statistics
|
||||
call timer_stop(time_total)
|
||||
if (master) call print_runtime()
|
||||
if (master .and. (.not. plotting)) call print_runtime()
|
||||
|
||||
#ifdef HDF5
|
||||
if (master) then
|
||||
|
|
|
|||
|
|
@ -124,7 +124,9 @@ contains
|
|||
! select cells based on whether we are searching a universe or a provided
|
||||
! list of cells (this would be for lists of neighbor cells)
|
||||
if (use_search_cells) then
|
||||
index_cell = search_cells(i)
|
||||
index_cell = search_cells(i)
|
||||
! check to make sure search cell is in same universe
|
||||
if (cells(index_cell) % universe /= p % coord % universe) cycle
|
||||
else
|
||||
index_cell = univ % cells(i)
|
||||
end if
|
||||
|
|
|
|||
|
|
@ -313,27 +313,27 @@ contains
|
|||
! We also need to allocate the cell count lists for each universe. The logic
|
||||
! for this is a little more convoluted. In universe_dict, the (key,value)
|
||||
! pairs are the id of the universe and the index in the array. In
|
||||
! ucount_dict, it's the id of the universe and the number of cells.
|
||||
! cells_in_univ_dict, it's the id of the universe and the number of cells.
|
||||
|
||||
key_list => dict_keys(universe_dict)
|
||||
do while (associated(key_list))
|
||||
! find index of universe in universes array
|
||||
i_univ = key_list%data%value
|
||||
i_univ = key_list % data % value
|
||||
univ => universes(i_univ)
|
||||
univ % id = key_list%data%key
|
||||
univ % id = key_list % data % key
|
||||
|
||||
! check for lowest level universe
|
||||
if (univ % id == 0) BASE_UNIVERSE = i_univ
|
||||
|
||||
! find cell count for this universe
|
||||
n_cells_in_univ = dict_get_key(cells_in_univ_dict, key_list%data%key)
|
||||
n_cells_in_univ = dict_get_key(cells_in_univ_dict, univ % id)
|
||||
|
||||
! allocate cell list for universe
|
||||
allocate(univ % cells(n_cells_in_univ))
|
||||
univ % n_cells = n_cells_in_univ
|
||||
|
||||
! move to next universe
|
||||
key_list => key_list%next
|
||||
key_list => key_list % next
|
||||
end do
|
||||
|
||||
! Also allocate a list for keeping track of where cells have been assigned
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ module output
|
|||
use constants
|
||||
use datatypes, only: dict_get_key
|
||||
use endf, only: reaction_name
|
||||
use geometry_header, only: Cell, Universe, Surface
|
||||
use geometry_header, only: Cell, Universe, Surface, BASE_UNIVERSE
|
||||
use global
|
||||
use mesh_header, only: StructuredMesh
|
||||
use particle_header, only: Particle, LocalCoord
|
||||
|
|
@ -260,8 +260,8 @@ contains
|
|||
|
||||
! Print surface
|
||||
if (p % surface /= NONE) then
|
||||
s => surfaces(p % surface)
|
||||
write(ou,*) ' Surface = ' // to_str(s % id)
|
||||
s => surfaces(abs(p % surface))
|
||||
write(ou,*) ' Surface = ' // to_str(sign(s % id, p % surface))
|
||||
end if
|
||||
|
||||
write(ou,*) ' Weight = ' // to_str(p % wgt)
|
||||
|
|
@ -370,6 +370,7 @@ contains
|
|||
integer :: unit_
|
||||
character(MAX_LINE_LEN) :: string
|
||||
type(Cell), pointer :: c => null()
|
||||
type(Universe), pointer :: base_u
|
||||
|
||||
if (present(unit)) then
|
||||
unit_ = unit
|
||||
|
|
@ -377,7 +378,12 @@ contains
|
|||
unit_ = OUTPUT_UNIT
|
||||
end if
|
||||
|
||||
base_u => universes(BASE_UNIVERSE)
|
||||
|
||||
write(unit_,*) 'Universe ' // to_str(univ % id)
|
||||
if (associated(univ, base_u)) then
|
||||
write(unit_,*) ' Base Universe'
|
||||
end if
|
||||
write(unit_,*) ' Level = ' // to_str(univ % level)
|
||||
string = ""
|
||||
do i = 1, univ % n_cells
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ contains
|
|||
|
||||
! Since boundary conditions are disabled in plotting mode, we need
|
||||
! to manually add the last segment
|
||||
if (surfaces(abs(surface_crossed)) % bc == BC_VACUUM) then
|
||||
if (surfaces(abs(surface_crossed)) % bc /= BC_TRANSMIT) then
|
||||
p % coord0 % xyz(1) = last_x_coord
|
||||
write(UNIT=UNIT_PLOT) p % coord0 % xyz, 0
|
||||
exit
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue