diff --git a/docs/source/pythonapi/base.rst b/docs/source/pythonapi/base.rst index dde1c9119..e6cf1e1cc 100644 --- a/docs/source/pythonapi/base.rst +++ b/docs/source/pythonapi/base.rst @@ -117,6 +117,7 @@ Constructing Tallies openmc.UniverseFilter openmc.MaterialFilter openmc.CellFilter + openmc.CellFromFilter openmc.CellbornFilter openmc.SurfaceFilter openmc.MeshFilter diff --git a/docs/source/usersguide/tallies.rst b/docs/source/usersguide/tallies.rst index 3ee2e99d7..46ad97721 100644 --- a/docs/source/usersguide/tallies.rst +++ b/docs/source/usersguide/tallies.rst @@ -266,7 +266,15 @@ The following tables show all valid scores: | |particle. Note that this score can only be used if | | |a mesh filter has been specified. Furthermore, it | | |may not be used in conjunction with any other | - | |score. | + | |score. Only energy and mesh filters may be used. | + +----------------------+---------------------------------------------------+ + |partial_current |Partial currents on any surface previously defined | + | |in the geometry. Units are particles per source | + | |particle. Note that this score cannot be used with | + | |a current score or a surface or mesh filter. | + | |It may be used in conjunction with any other score.| + | |Surfaces can be defined with cell_from and cell | + | |(to) filters. | +----------------------+---------------------------------------------------+ |events |Number of scoring events. Units are events per | | |source particle. | diff --git a/openmc/filter.py b/openmc/filter.py index 9382c333b..e822b9553 100644 --- a/openmc/filter.py +++ b/openmc/filter.py @@ -603,13 +603,14 @@ class CellFilter(WithIDFilter): def bins(self, bins): self._smart_set_bins(bins, openmc.Cell) + class CellFromFilter(WithIDFilter): - """Bins tally on which couple of cells the neutrons came from. + """Bins tally on which Cell the neutron came from. Parameters ---------- bins : openmc.Cell, Integral, or iterable thereof - The Cells to tally. Either openmc.Cell objects or their + The Cell(s) to tally. Either openmc.Cell objects or their Integral ID numbers can be used. filter_id : int Unique identifier for the filter @@ -634,38 +635,7 @@ class CellFromFilter(WithIDFilter): @bins.setter def bins(self, bins): self._smart_set_bins(bins, openmc.Cell) - -class CellToFilter(WithIDFilter): - """Bins tally on which couple of cells the neutrons went to. - Parameters - ---------- - bins : openmc.Cell, Integral, or iterable thereof - The Cells to tally. Either openmc.Cell objects or their - Integral ID numbers can be used. - filter_id : int - Unique identifier for the filter - - Attributes - ---------- - bins : Integral or Iterable of Integral - openmc.Cell IDs. - id : int - Unique identifier for the filter - num_bins : Integral - The number of filter bins - stride : Integral - The number of filter, nuclide and score bins within each of this - filter's bins. - - """ - @property - def bins(self): - return self._bins - - @bins.setter - def bins(self, bins): - self._smart_set_bins(bins, openmc.Cell) class CellbornFilter(WithIDFilter): """Bins tally events based on which Cell the neutron was born in.