test: construct shear remap fixture through per-level API
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user