diff --git a/README.md b/README.md index 5445ae5..739dc72 100644 --- a/README.md +++ b/README.md @@ -145,13 +145,15 @@ Scope and limits: ```python cfg = LBMConfig(nx=32, ny=16, viscosity=.1) + rest = np.asarray(compute_feq_d2q9(1.0, 0.0, 0.0), np.float32)[:, None, None] with CudaContext(0) as ctx, FixedPatchStepper( cfg, ((4, 4, 12, 12), (16, 4, 24, 12)), context=ctx, fine_block=(4, 4), base_block=(4, 4)) as run: run.initialize(np.broadcast_to(rest, (9, *run.patch.coarse_shape)), np.broadcast_to(rest, (9, *run.patch.fine_shape))) # (9, 32, 64) run.step(32) - coarse_g, fine_g = run.download() # NaN outside every patch's active cells + coarse_g, fine_g = run.download() # coarse: NaN on every covered cell; + # fine: NaN on every non-ACTIVE cell ``` - Not available: per-link surface exchange/force readout in blocked mode, checkpoints, moving bodies, bodies/Jets with several patches, dynamic refinement, `Simulation` diff --git a/src/CelerisLab/lbm/refinement_stepper.py b/src/CelerisLab/lbm/refinement_stepper.py index bfa397c..ead846d 100644 --- a/src/CelerisLab/lbm/refinement_stepper.py +++ b/src/CelerisLab/lbm/refinement_stepper.py @@ -496,7 +496,7 @@ class FixedPatchStepper: raise ValueError("n must be a nonnegative integer") with self._lock, self.ctx.activate(): self._require("ready") - c, f = self._levels + c, f = self._levels[:2] # a nested child (third level) runs inside the fine hops p = self.patch kw = dict(block=self._block, stream=self._stream) try: