From 904dbb31f84cd7bdd044597b6ab471a3fb4fed2d Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Fri, 10 Jan 2020 07:04:33 -0600 Subject: [PATCH] Discuss relationship between DistribcellFilter and CellInstanceFilter in docstrings --- openmc/filter.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/openmc/filter.py b/openmc/filter.py index 1f7334ded..1988aee81 100644 --- a/openmc/filter.py +++ b/openmc/filter.py @@ -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):