Disaggregate Plan
DisaggregatePlan describes non-translating disaggregation traversal on a tree. It specifies which nodes are visited while propagating moments from higher levels toward lower levels.
This is a non-translating disaggregation plan. Its counterpart for a matrix-vector product is AggregateTranslatePlan.
Building a DisaggregatePlan
Conceptually, DisaggregatePlan is built from a tree and a function disaggregatenode(node).
- If
disaggregatenode(node)istrue, that node receives and stores a moment directly. - If not, the node is still included in traversal when one of its ancestors is a storing node.
- Disaggregation levels are organized from root toward leaves.
This ensures disaggregation paths remain complete for all moments that must be distributed to lower levels.
Fields
A DisaggregatePlan stores:
nodes: disaggregation nodes grouped by level.levels: contiguous disaggregation levels, ordered root-to-leaves.storenode: booleans indicating whether a node receives/stores directly.rootoffset: offset used to convert node ids to compact 1-based indices.tree: the tree associated with the plan.
Example
The example below constructs Galerkin plans in AggregateTranslateMode() and extracts the test-side DisaggregatePlan.
plans = H2Trees.galerkinplans(tree, aggregatenode, tfiterator, H2Trees.AggregateTranslateMode())
disaggregateplan = plans.testdisaggregationplan
disaggregateplanDisaggregatePlan{TwoNTree{3, BoxData{3, Float64}, Float64}}([[3, 4, 18, 37, 51, 66, 72, 76, 80, 101 … 662, 676, 695, 710, 724, 743, 762, 776, 795, 809], [5, 6, 7, 8, 9, 10, 19, 27, 28, 35 … 778, 779, 786, 787, 796, 797, 805, 806, 807, 808], [11, 12, 13, 14, 15, 16, 17, 20, 21, 22 … 792, 793, 794, 798, 799, 800, 801, 802, 803, 804]], 3:5, Bool[0, 0, 1, 1, 1, 1, 1, 1, 1, 1 … 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 0, TwoNTree{3, BoxData{3, Float64}, Float64}
level: 1 with 1 node(s) with on average 18750.0 points and 8.0 children and halfsize: 0.9995217120782627
- level: 2 with 8 node(s) with on average 2343.75 points and 7.0 children and halfsize: 0.49976085603913134
-- level: 3 with 56 node(s) with on average 334.82 points and 4.71 children and halfsize: 0.24988042801956567
--- level: 4 with 264 node(s) with on average 69.39 points and 1.82 children and halfsize: 0.12494021400978284
---- level: 5 with 480 node(s) with on average 16.59 points and 0.0 children and halfsize: 0.06247010700489142
)