Discuss relationship between DistribcellFilter and CellInstanceFilter in

docstrings
This commit is contained in:
Paul Romano 2020-01-10 07:04:33 -06:00
parent 37eaaabd6c
commit 904dbb31f8

View file

@ -521,6 +521,11 @@ class CellbornFilter(WithIDFilter):
class CellInstanceFilter(Filter):
"""Bins tally events based on which cell instance a particle is in.
This filter is similar to :class:`DistribcellFilter` but allows one to
select particular instances to be tallied (instead of obtaining *all*
instances by default) and allows instances from different cells to be
specified in a single filter.
Parameters
----------
bins : iterable of 2-tuples or numpy.ndarray
@ -539,6 +544,10 @@ class CellInstanceFilter(Filter):
num_bins : Integral
The number of filter bins
See Also
--------
DistribcellFilter
"""
def __init__(self, bins, filter_id=None):
self.bins = bins
@ -1260,6 +1269,11 @@ def _path_to_levels(path):
class DistribcellFilter(Filter):
"""Bins tally event locations on instances of repeated cells.
This filter provides a separate score for each unique instance of a repeated
cell in a geometry. Note that only one cell can be specified in this filter.
The related :class:`CellInstanceFilter` allows one to obtain scores for
particular cell instances as well as instances from different cells.
Parameters
----------
cell : openmc.Cell or Integral
@ -1280,6 +1294,10 @@ class DistribcellFilter(Filter):
The paths traversed through the CSG tree to reach each distribcell
instance (for 'distribcell' filters only)
See Also
--------
CellInstanceFilter
"""
def __init__(self, cell, filter_id=None):