From aaad3f39a679e7ad4b457e54b62ac0733531980b Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Tue, 28 Aug 2018 19:56:06 -0500 Subject: [PATCH 1/2] FMMTraversalInfo: Add all attributes mentioned in documentation. *ntarget_or_target_parent_boxes* was present but others weren't. --- boxtree/traversal.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/boxtree/traversal.py b/boxtree/traversal.py index c42189d..00f2e59 100644 --- a/boxtree/traversal.py +++ b/boxtree/traversal.py @@ -1667,6 +1667,18 @@ class FMMTraversalInfo(DeviceDataRecord): # }}} + @property + def nboxes(self): + return self.tree.nboxes + + @property + def nlevels(self): + return self.tree.nlevels + + @property + def ntarget_boxes(self): + return len(self.target_boxes) + @property def ntarget_or_target_parent_boxes(self): return len(self.target_or_target_parent_boxes) -- GitLab From 74e9cb5031e37ffcee93583bc0892eb5d0aac7e3 Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Tue, 28 Aug 2018 20:26:32 -0500 Subject: [PATCH 2/2] Document new attributes --- boxtree/traversal.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/boxtree/traversal.py b/boxtree/traversal.py index 00f2e59..f7e7045 100644 --- a/boxtree/traversal.py +++ b/boxtree/traversal.py @@ -1364,6 +1364,14 @@ class FMMTraversalInfo(DeviceDataRecord): An instance of :class:`boxtree.Tree`. + .. attribute:: nboxes + + Number of boxe in the tree. + + .. attribute:: nlevels + + Number of levels in the tree. + .. attribute:: well_sep_is_n_away The distance (measured in target box diameters in the :math:`l^\infty` @@ -1388,6 +1396,10 @@ class FMMTraversalInfo(DeviceDataRecord): If :attr:`boxtree.Tree.sources_are_targets`, then ``target_boxes is source_boxes``. + .. attribute:: ntarget_boxes + + Number of :attr:`target_boxes`. + .. attribute:: source_parent_boxes ``box_id_t [*]`` -- GitLab