Migrate current callers to level-indexed refinement API
This commit is contained in:
1 parent
b4eacf7526
commit
55067652e4
38 files changed
+210
-199
No files matched your search
@@ -81,7 +81,7 @@ def run_blocked_patch(speed):
|
||||
level_objects=[(), (source,)],
|
||||
observe_raw_exchange=True) as backend:
|
||||
c, f = backend._levels
|
||||
flags = backend.fine_boundary.flags.reshape(40, 40)
|
||||
flags = backend.boundaries[1].flags.reshape(40, 40)
|
||||
active = np.zeros((40, 40), bool)
|
||||
active[4:-4, 4:-4] = True
|
||||
active &= ((flags & FLUID) != 0) & ((flags & SOLID) == 0)
|
||||
@@ -101,7 +101,7 @@ def run_blocked_patch(speed):
|
||||
with patch.object(f, "kernel", fine):
|
||||
backend.step(2)
|
||||
assert len(traces) == 4 and backend.step_count == 2
|
||||
mass = backend.read_raw_exchange(0)["total"]["mass_into_fluid"]
|
||||
mass = backend.read_raw_exchange(0, level=1)["total"]["mass_into_fluid"]
|
||||
return traces, roi, backend.download(), float(mass)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user