From 7b652b242318232d89647f53d78a108d5fc52e83 Mon Sep 17 00:00:00 2001 From: Frank14f <1515444314@qq.com> Date: Wed, 28 Oct 2026 10:21:14 +0800 Subject: [PATCH] test: construct shear remap fixture through per-level API --- .../multigrid/test_shear_refinement_example_gpu.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/validation/multigrid/test_shear_refinement_example_gpu.py b/tests/validation/multigrid/test_shear_refinement_example_gpu.py index 7a6e958..09921fb 100644 --- a/tests/validation/multigrid/test_shear_refinement_example_gpu.py +++ b/tests/validation/multigrid/test_shear_refinement_example_gpu.py @@ -8,14 +8,17 @@ from contextlib import ExitStack import unittest import numpy as np from CelerisLab.cuda.context import CudaContext -from research.shear_refinement.example import (CHILDREN, make, initialize, observe, - topology, objects) +from CelerisLab.lbm.refinement_stepper import FixedPatchStepper +from research.shear_refinement.example import (CFG, PARENTS, CHILDREN, initialize, + observe, topology, objects) class ShearRefinementGPU(unittest.TestCase): def test_measured_growth_matches_explicit_manual_continuation(self): with CudaContext(0) as ctx, ExitStack() as owned: - old = owned.enter_context(make(ctx)) + old = owned.enter_context(FixedPatchStepper( + CFG, context=ctx, refinements=[PARENTS, CHILDREN], + level_blocks=[(4, 4)] * 3, level_objects=[(), (), objects()])) initialize(old) old.step(2) before = old.download()