Skip to content

decomposition updates

HandlesDecompositionMixin

Role mixin for components that react to decomposition or core updates.

Use this mixin when a component depends on partition/core ownership data and must update itself after the assembled mesh has been repartitioned or after core-conflict resolution has changed that ownership information.

This is a narrower and more advanced role than ordinary assembly hooks. It matters when a component caches partition-sensitive state or needs to keep parallel/decomposition metadata aligned with the latest assembled mesh.

Example
class PartitionAwareInterface(HandlesDecompositionMixin):
    def on_partition_update(self, assembled_mesh, **kwargs):
        self.cached_core_ids = assembled_mesh.cell_data["Core"]
Tip

Use this mixin only when the component genuinely depends on partition-aware state. Many advanced interfaces need POST_ASSEMBLE hooks but do not need decomposition updates.

Methods:

on_partition_update

on_partition_update(assembled_mesh, **kwargs) -> None

Refresh component state after partition/core ownership changes.

Subclasses implement this hook when the component stores data that must stay aligned with the current decomposition of the assembled mesh.

Parameters:

Name Type Description Default
assembled_mesh

The global assembled mesh containing the updated core and partition information.

required
**kwargs

Arbitrary keyword arguments passed from the update context.

{}