mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Revised minor bugs found relating to polar/azi filters AND added support to openmc.mgxs for applying polar and azimuthal filters!
This commit is contained in:
parent
5afd4c369f
commit
39d9c25ae7
4 changed files with 812 additions and 212 deletions
|
|
@ -1192,7 +1192,7 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.5.2"
|
||||
"version": "3.6.0"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
|
|
|||
|
|
@ -1453,7 +1453,7 @@ class PolarFilter(RealFilter):
|
|||
msg = 'Unable to add bin edge "{0}" to a "{1}" ' \
|
||||
'since it is less than 0'.format(edge, type(self))
|
||||
raise ValueError(msg)
|
||||
elif edge > np.pi:
|
||||
elif not np.isclose(edge, np.pi) and edge > np.pi:
|
||||
msg = 'Unable to add bin edge "{0}" to a "{1}" ' \
|
||||
'since it is greater than pi'.format(edge, type(self))
|
||||
raise ValueError(msg)
|
||||
|
|
@ -1552,11 +1552,11 @@ class AzimuthalFilter(RealFilter):
|
|||
'since it is a non-integer or floating point ' \
|
||||
'value'.format(edge, type(self))
|
||||
raise ValueError(msg)
|
||||
elif edge < -np.pi:
|
||||
elif not np.isclose(edge, -np.pi) and edge < -np.pi:
|
||||
msg = 'Unable to add bin edge "{0}" to a "{1}" ' \
|
||||
'since it is less than -pi'.format(edge, type(self))
|
||||
raise ValueError(msg)
|
||||
elif edge > np.pi:
|
||||
elif not np.isclose(edge, np.pi) and edge > np.pi:
|
||||
msg = 'Unable to add bin edge "{0}" to a "{1}" ' \
|
||||
'since it is greater than pi'.format(edge, type(self))
|
||||
raise ValueError(msg)
|
||||
|
|
|
|||
1012
openmc/mgxs/mgxs.py
1012
openmc/mgxs/mgxs.py
File diff suppressed because it is too large
Load diff
|
|
@ -3228,7 +3228,7 @@ contains
|
|||
end do
|
||||
filt % bins(Nangle + 1) = PI
|
||||
else
|
||||
call fatal_error("Number of bins for mu filter must be&
|
||||
call fatal_error("Number of bins for polar filter must be&
|
||||
& greater than 1 on tally " &
|
||||
// trim(to_str(t % id)) // ".")
|
||||
end if
|
||||
|
|
@ -3262,7 +3262,7 @@ contains
|
|||
end do
|
||||
filt % bins(Nangle + 1) = PI
|
||||
else
|
||||
call fatal_error("Number of bins for mu filter must be&
|
||||
call fatal_error("Number of bins for azimuthal filter must be&
|
||||
& greater than 1 on tally " &
|
||||
// trim(to_str(t % id)) // ".")
|
||||
end if
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue