"""Assemble the submission JSON from the per-solution meta files written by vk_modal_disk.py. Usage: python make_submission.py /> tag1 tag2 ... (in order of increasing accuracy) """ import json import sys from pathlib import Path HARDWARE = "Intel Core i7-1355U laptop (2 performance + 8 efficiency cores, 40 GB), single process, numpy/scipy with OpenBLAS" def main(): out_dir = Path(sys.argv[1]) tags = sys.argv[2:] challenge_id = out_dir.parent.name submission_id = out_dir.name sols = [] prev = None for tag in tags: m = json.load(open(out_dir / f"vk-{tag}.meta.json")) entry = { "solution_id": m["solution_id"], "output": m["output"], "method": m["method"], "parameters": m["parameters"], "timing_seconds": m["timing_seconds"], "more_accurate_than": [prev] if prev else [], "hardware": m.get("hardware", HARDWARE), } if "fields" in m: entry["fields"] = m["fields"] sols.append(entry) prev = m["solution_id"] sub = { "schema_version": 1, "submission_id": submission_id, "challenge_id": challenge_id, "submitter": {"name": "Jeremy Magland", "email": "jmagland@flatironinstitute.org"}, "date": "2026-09-17", "description": ( "Von Karman thin-plate reduction (Airy stress function, in-plane inertia neglected, damping on bending only) of the challenge model " "on a Cartesian grid: the disk is approximated by the square cells whose centers lie inside it (a staircase boundary) at 8 mm and 4 mm spacing. " "Linear free-plate modes and clamped Airy modes come from Bogner-Fox-Schmit finite elements on the cells and a sparse shift-invert eigensolver; " "the bases are restricted to functions even in y, which is exact because the strike is centered on the x axis. The cubic coupling tensor is integrated " "on the cells, the time stepping is a two-step scheme exact in the linear part, and the retarded Rayleigh integral uses cubic fractional delays. " "The chain is ordered by grid spacing, number of modes, and time step; the mode truncation caps the frequency the cascade can reach." ), "code_url": "https://vault1.magland.org/challenges/cymbal-solutions/blob/main/solvers/vonkarman-modal-disk/vk_modal_disk.py", "viz_url": "https://vault1.magland.org/challenges/cymbal-solutions/site/", "solutions": sols, } with open(out_dir.parent / f"{submission_id}.json", "w") as f: json.dump(sub, f, indent=1) print(f"wrote {out_dir.parent / (submission_id + '.json')} with {len(sols)} solutions") if __name__ == "__main__": main()