mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Simplified EnergyGroups.get_condensed_groups(...) routine
This commit is contained in:
parent
67971b5c60
commit
7bc104b21b
1 changed files with 6 additions and 8 deletions
|
|
@ -227,11 +227,11 @@ class EnergyGroups(object):
|
|||
----------
|
||||
coarse_groups : Iterable of 2-tuple
|
||||
The energy groups of interest - a list of 2-tuples, each directly
|
||||
corresponding to one of the new coarse groups. The values in the
|
||||
2-tuples are upper/lower energy groups used to construct a new
|
||||
coarse group. For example, if [(1,2), (2,4)] was used as the coarse
|
||||
groups, fine groups 1 and 2 would be merged into coarse group 1
|
||||
while fine groups 3 and 4 would be merged into coarse group 2.
|
||||
corresponding to one of the new coarse groups. The values in the
|
||||
2-tuples are upper/lower energy groups used to construct a new
|
||||
coarse group. For example, if [(1,2), (2,4)] was used as the coarse
|
||||
groups, fine groups 1 and 2 would be merged into coarse group 1
|
||||
while fine groups 3 and 4 would be merged into coarse group 2.
|
||||
|
||||
Returns
|
||||
-------
|
||||
|
|
@ -255,9 +255,7 @@ class EnergyGroups(object):
|
|||
cv.check_less_than('lower group', group[0], group[1], False)
|
||||
|
||||
# Compute the group indices into the coarse group
|
||||
group_bounds = list()
|
||||
for group in coarse_groups:
|
||||
group_bounds.append(group[0])
|
||||
group_bounds = [group[0] for group in coarse_groups]
|
||||
group_bounds.append(coarse_groups[-1][1])
|
||||
|
||||
# Determine the indices mapping the fine-to-coarse energy groups
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue