From f267e881b10c8459771a756467ec4581c13a26d0 Mon Sep 17 00:00:00 2001 From: lmoresi Date: Tue, 12 May 2026 10:05:57 +1000 Subject: [PATCH] =?UTF-8?q?fix(ddt):=20Lagrangian.=5F=5Finit=5F=5F=20?= =?UTF-8?q?=E2=80=94=20uw.swarm.UWSwarm=20=E2=86=92=20uw.swarm.Swarm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Lagrangian DDt flavor has been unconstructible since commit 0778b7d (2025-07-07, "Fix uw.function.evaluate / eliminate evalf"), which typo'd uw.swarm.Swarm(mesh) as uw.swarm.UWSwarm(mesh) while editing nearby code. UWSwarm does not exist — never has — so direct construction of Lagrangian has died with AttributeError for ten months. Higher-level solver pathways that wrap Lagrangian were presumably also broken; consumers may have silently fallen back to Lagrangian_Swarm or another flavor. One-character fix. No other UWSwarm references exist in the tree. The bug surfaced during the in-memory snapshot toolkit work (feature/in-memory-checkpoint, PR 4: state-as-dataclass retrofit on all five DDt flavors). This commit is the bug fix only — cherry-picked from the feature branch onto development so consumers of Lagrangian don't have to wait for the snapshot feature to land. Underworld development team with AI support from Claude Code (https://claude.com/claude-code) --- src/underworld3/systems/ddt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/underworld3/systems/ddt.py b/src/underworld3/systems/ddt.py index 39bf56920..bda85a8a3 100644 --- a/src/underworld3/systems/ddt.py +++ b/src/underworld3/systems/ddt.py @@ -2262,7 +2262,7 @@ def __init__( super().__init__() # create a new swarm to manage here - dudt_swarm = uw.swarm.UWSwarm(mesh) + dudt_swarm = uw.swarm.Swarm(mesh) self.mesh = mesh self.swarm = dudt_swarm