Action upload: keep 2D slot fallback for ObjectManager(cfg=None)
19bd308 computed slot = 3*self.cfg.dim unconditionally, so a default
manager without cfg raised even when empty. Use the existing fallback
(cfg.dim if cfg else 2). Regression for empty and one-body managers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e67799812e
commit
f1e03423f3
2 files changed
+11
-1
No files matched your search
@@ -300,3 +300,13 @@ def test_fine_boundary_keeps_edge_frame_hits_and_checks_jets():
|
||||
refinement.prepare_fine_boundary(cfg, patch, [legacy], jets=[jet])
|
||||
disjoint = Jet(Sector(C, math.pi, .5, R + .01), Radial(C, inward=False))
|
||||
refinement.prepare_fine_boundary(cfg, patch, [legacy], jets=[disjoint])
|
||||
|
||||
|
||||
def test_action_upload_keeps_cfg_none_fallback(device):
|
||||
# Default ObjectManager(cfg=None) keeps the 2D slot fallback, empty or not.
|
||||
from CelerisLab.body.manager import ObjectManager
|
||||
stream = SimpleNamespace(synchronize=lambda: None)
|
||||
bodies = ObjectManager(12, 10, 1, 9)
|
||||
bodies._upload_action_async(stream)
|
||||
bodies.add(circle(radius=2.))
|
||||
bodies._upload_action_async(stream)
|
||||
Reference in new issue
Block a user