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.buildplans(
tree;
builder=H2Trees.PlanBuilder(;
isnear=H2Trees.isnear(; additionalbufferboxes=1),
aggregationmode=H2Trees.AggregateTranslateMode(),
),
)
disaggregateplan = plans.testdisaggregationplan
disaggregateplanDisaggregatePlan{TwoNTree{3, BoxData{3, Float64}, Float64, Base.RefValue{TreeIndex}}}([[10, 11, 12, 13, 14, 15, 16, 17, 18, 19 … 56, 57, 58, 59, 60, 61, 62, 63, 64, 65], [66, 67, 68, 69, 70, 71, 72, 73, 74, 75 … 320, 321, 322, 323, 324, 325, 326, 327, 328, 329]], 3:4, Bool[0, 0, 0, 0, 0, 0, 0, 0, 0, 1 … 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 0, TwoNTree{3,Float64}(nodes=329, leaves=272, levels=1:4, root=1))