"""Run the Cartesian FD solver of fd_check.py at h=0.1 and 0.05 and save the y=0 slice of the grid solution, for near-rim comparison with the series (rim_overshoot.py). This can take several minutes. A precomputed slice, fd_rim_slice.npy, is included in this folder so rim_overshoot.py can run the comparison without rebuilding it. """ import sys from pathlib import Path import numpy as np HERE = Path(__file__).resolve().parent sys.path.insert(0, str(HERE)) from fd_check import solve # fd_check.py runs its own test only under __main__ out = {} for h in (0.1, 0.05): U, h = solve(h) out[h] = U[:, 0, :].copy() # y = 0 plane, indices (i -> x=i*h, k -> z=k*h) np.save(Path.cwd() / "fd_rim_slice.npy", out, allow_pickle=True) print("saved y=0 slices to", Path.cwd() / "fd_rim_slice.npy")