mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Check for neighboring energy points that are the same on nuclide energy grid.
This commit is contained in:
parent
f31c7e5f0a
commit
ffdcead9e4
1 changed files with 6 additions and 1 deletions
|
|
@ -235,8 +235,13 @@ contains
|
|||
! TODO: If not using unionized energy grid, we need to find the index on the
|
||||
! nuclide energy grid using lethargy mapping or whatever other technique
|
||||
|
||||
! search nuclide energy grid
|
||||
! get index on nuclide energy grid
|
||||
IE = nuc % grid_index(p % IE)
|
||||
|
||||
! check for rare case where two energy points are the same
|
||||
if (nuc % energy(IE) == nuc % energy(IE+1)) IE = IE + 1
|
||||
|
||||
! calculate interpolation factor
|
||||
f = (p%E - nuc%energy(IE))/(nuc%energy(IE+1) - nuc%energy(IE))
|
||||
|
||||
micro_xs(index_nuclide) % index_grid = IE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue