mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Merge pull request #863 from smharper/source_bugfix
Fix `fission` source sampling bug
This commit is contained in:
commit
cd8e63dc13
1 changed files with 12 additions and 10 deletions
|
|
@ -130,7 +130,7 @@ contains
|
|||
|
||||
! Repeat sampling source location until a good site has been found
|
||||
found = .false.
|
||||
do while (.not.found)
|
||||
do while (.not. found)
|
||||
! Set particle defaults
|
||||
call p % initialize()
|
||||
|
||||
|
|
@ -145,16 +145,18 @@ contains
|
|||
call find_cell(p, found)
|
||||
|
||||
! Check if spatial site is in fissionable material
|
||||
select type (space => external_source(i) % space)
|
||||
type is (SpatialBox)
|
||||
if (space % only_fissionable) then
|
||||
if (p % material == MATERIAL_VOID) then
|
||||
found = .false.
|
||||
elseif (.not. materials(p % material) % fissionable) then
|
||||
found = .false.
|
||||
if (found) then
|
||||
select type (space => external_source(i) % space)
|
||||
type is (SpatialBox)
|
||||
if (space % only_fissionable) then
|
||||
if (p % material == MATERIAL_VOID) then
|
||||
found = .false.
|
||||
elseif (.not. materials(p % material) % fissionable) then
|
||||
found = .false.
|
||||
end if
|
||||
end if
|
||||
end if
|
||||
end select
|
||||
end select
|
||||
end if
|
||||
|
||||
! Check for rejection
|
||||
if (.not. found) then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue