mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Apply suggestions from @pshriwise code review
Co-authored-by: Patrick Shriwise <pshriwise@gmail.com>
This commit is contained in:
parent
6bb6e2ec0c
commit
ca58e14073
4 changed files with 9 additions and 9 deletions
|
|
@ -254,7 +254,7 @@ class Filter(IDManagerMixin, metaclass=FilterMeta):
|
|||
filter_type = elem.get('type')
|
||||
|
||||
# If the filter type matches this class's short_name, then
|
||||
# there is no overriden from_xml_element method.
|
||||
# there is no overriden from_xml_element method
|
||||
if filter_type == cls.short_name.lower():
|
||||
# Get bins from element -- the default here works for any filters
|
||||
# that just store a list of bins that can be represented as integers
|
||||
|
|
@ -263,7 +263,7 @@ class Filter(IDManagerMixin, metaclass=FilterMeta):
|
|||
return cls(bins, filter_id=filter_id)
|
||||
|
||||
# Search through all subclasses and find the one matching the HDF5
|
||||
# 'type'. Call that class's from_hdf5 method.
|
||||
# 'type'. Call that class's from_hdf5 method
|
||||
for subclass in cls._recursive_subclasses():
|
||||
if filter_type == subclass.short_name.lower():
|
||||
return subclass.from_xml_element(elem, **kwargs)
|
||||
|
|
|
|||
|
|
@ -290,11 +290,11 @@ class RectilinearMesh(Mesh):
|
|||
Parameters
|
||||
----------
|
||||
x_grid : iterable of float
|
||||
Mesh boundary points along the x-axis.
|
||||
Mesh boundary points along the x-axis
|
||||
y_grid : iterable of float
|
||||
Mesh boundary points along the y-axis.
|
||||
Mesh boundary points along the y-axis
|
||||
z_grid : iterable of float
|
||||
Mesh boundary points along the z-axis.
|
||||
Mesh boundary points along the z-axis
|
||||
|
||||
"""
|
||||
nx = len(x_grid)
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ class Trigger(EqualityMixin):
|
|||
element.set("type", self._trigger_type)
|
||||
element.set("threshold", str(self._threshold))
|
||||
if len(self._scores) != 0:
|
||||
element.set("scores", ' '.join(map(str, self._scores)))
|
||||
element.set("scores", ' '.join(self._scores))
|
||||
return element
|
||||
|
||||
@classmethod
|
||||
|
|
|
|||
|
|
@ -1001,7 +1001,7 @@ double CylindricalMesh::find_r_crossing(
|
|||
double CylindricalMesh::find_phi_crossing(
|
||||
const Position& r, const Direction& u, double l, int shell) const
|
||||
{
|
||||
// Phi grid is [0, 2pi], thus there is no real surface to cross
|
||||
// Phi grid is [0, 2π], thus there is no real surface to cross
|
||||
if (full_phi_ && (shape_[1] == 1))
|
||||
return INFTY;
|
||||
|
||||
|
|
@ -1221,7 +1221,7 @@ double SphericalMesh::find_r_crossing(
|
|||
double SphericalMesh::find_theta_crossing(
|
||||
const Position& r, const Direction& u, double l, int shell) const
|
||||
{
|
||||
// Theta grid is [0, pi], thus there is no real surface to cross
|
||||
// Theta grid is [0, π], thus there is no real surface to cross
|
||||
if (full_theta_ && (shape_[1] == 1))
|
||||
return INFTY;
|
||||
|
||||
|
|
@ -1283,7 +1283,7 @@ double SphericalMesh::find_theta_crossing(
|
|||
double SphericalMesh::find_phi_crossing(
|
||||
const Position& r, const Direction& u, double l, int shell) const
|
||||
{
|
||||
// Phi grid is [0, 2pi], thus there is no real surface to cross
|
||||
// Phi grid is [0, 2π], thus there is no real surface to cross
|
||||
if (full_phi_ && (shape_[2] == 1))
|
||||
return INFTY;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue