diff --git a/examples/fixed_patch_circle.py b/examples/fixed_patch_circle.py index 940106f..de82436 100644 --- a/examples/fixed_patch_circle.py +++ b/examples/fixed_patch_circle.py @@ -1,8 +1,9 @@ """Public API demo: fixed 2:1 patch with a stationary, optionally actuated circle. From this checkout, after checking the selected physical GPU is idle: - PYTHONPATH="$PWD/src" CUDA_VISIBLE_DEVICES=0 python examples/fixed_patch_circle.py + PYTHONPATH="$PWD/src" CUDA_VISIBLE_DEVICES=0 python examples/fixed_patch_circle.py --fine-block 16 20 ... --speed -0.002 --fine-block 16 20 --mode slot_reservoir +Omit --fine-block for the (equivalent) dense fine storage. A short smoke run (default 128 coarse steps): it shows setup, stepping and fluid-only diagnostics, not a developed flow, accuracy or long-time stability. @@ -74,6 +75,8 @@ def main(): help="blocked fine storage; must divide the whole fine allocation (32 x 40 here)") parser.add_argument("--steps", type=int, default=128) args = parser.parse_args() + if args.steps < 0: + parser.error("--steps must be nonnegative") root = Path(__file__).resolve().parents[1] if Path(CelerisLab.__file__).resolve() != root / "src/CelerisLab/__init__.py": raise RuntimeError(f"Set PYTHONPATH to {root / 'src'}")