mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Accepting other interpolation types for converted Tabulated1D distributions
This commit is contained in:
parent
d300bac734
commit
5168b3392a
1 changed files with 11 additions and 3 deletions
|
|
@ -1987,10 +1987,18 @@ class EnergyFunctionFilter(Filter):
|
|||
if tab1d.n_regions > 1:
|
||||
raise ValueError('Only Tabulated1Ds with a single interpolation '
|
||||
'region are supported')
|
||||
if tab1d.interpolation[0] not in (2, 5):
|
||||
raise ValueError('Only linear-linear or log-log Tabulated1Ds are supported')
|
||||
if tab1d.interpolation[0] not in (2, 3, 4, 5):
|
||||
raise ValueError('Only linear-linear, linear-log, log-linear, and '
|
||||
'log-log Tabulated1Ds are supported')
|
||||
out = cls(tab1d.x, tab1d.y)
|
||||
if tab1d.interpolation[0] == 5:
|
||||
|
||||
if tab1d.interpolation[0] == 2:
|
||||
out.interpolation = 'linear-lienar'
|
||||
elif tab1d.interpolation[0] == 3:
|
||||
out.interpolation = 'linear-log'
|
||||
elif tab1d.interpolation[0] == 4:
|
||||
out.interpolation = 'log-linear'
|
||||
elif tab1d.interpolation[0] == 5:
|
||||
out.interpolation = 'log-log'
|
||||
|
||||
return out
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue