test: opt-in scaled_shear_n256 four-case shear diagnostic
- run_case: --diagnostic scaled_shear_n256 (requires --flow shear_wave; U256/U512/constant R256/projected R256, Re100, no early trace); N512 only via one of the two scaled diagnostics; scaled_n256 stays TG-only. - assess_shear_wave: scaled=True contract reusing92b8afescaled case/build/workload checks, shear diagnostic identity; signed rate bias, refined excess over each control; hash-pinnedde5b0ccN128 reference and descriptive N128->N256 signed trend; CLI --diagnostic/--reference-files. - tests: scaled contract, set mixing, trend/reference pin, runner options. - shear_wave.py and oracle.py unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
46100e1d53
commit
5fb95f5f4d
4 files changed
+263
-18
No files matched your search
@@ -20,6 +20,7 @@ REFERENCE_HARNESS = "11901a7f77557a901e017a171eeae1758d584fa5"
|
||||
INITIALIZATION = "physical FP64 equilibrium G at actual cell centers; rho=1+3p"
|
||||
SHEAR_WAVE_SHA256 = "81d5c8ee60864372887cddf9239580c82fb6750d956038f1e3ee9de61aa4e877"
|
||||
SCALED_DIAGNOSTIC = "scaled_n256"
|
||||
SCALED_SHEAR = "scaled_shear_n256" # mutually exclusive with scaled_n256 (one flow each)
|
||||
|
||||
|
||||
def flow_functions(flow="taylor_green"):
|
||||
@@ -181,8 +182,9 @@ def main():
|
||||
p.add_argument("--depth", type=int, choices=[1, 2, 3], required=True)
|
||||
p.add_argument("--output", type=Path, required=True)
|
||||
p.add_argument("--explosion", choices=["constant", "projected_linear"], default="constant")
|
||||
p.add_argument("--diagnostic", choices=[SCALED_DIAGNOSTIC],
|
||||
help="explicit four-case N256/fine512 same-placement diagnostic")
|
||||
p.add_argument("--diagnostic", choices=[SCALED_DIAGNOSTIC, SCALED_SHEAR],
|
||||
help="explicit four-case N256/fine512 same-placement diagnostic "
|
||||
"(scaled_n256: Taylor-Green; scaled_shear_n256: shear wave)")
|
||||
p.add_argument("--early-pressure", action="store_true",
|
||||
help="also save 65 scalar pressure samples at t*=k*.001875, k=0..64")
|
||||
p.add_argument("--flow", choices=["taylor_green", "shear_wave"], default="taylor_green")
|
||||
@@ -197,12 +199,17 @@ def main():
|
||||
if args.diagnostic:
|
||||
cases = {(256, 1, "constant"), (512, 1, "constant"),
|
||||
(256, 2, "constant"), (256, 2, "projected_linear")}
|
||||
if args.flow != "taylor_green":
|
||||
p.error("--diagnostic scaled_n256 requires --flow taylor_green")
|
||||
if args.re != 100 or (args.n, args.depth, args.explosion) not in cases or not args.early_pressure:
|
||||
flow = "shear_wave" if args.diagnostic == SCALED_SHEAR else "taylor_green"
|
||||
if args.flow != flow:
|
||||
p.error(f"--diagnostic {args.diagnostic} requires --flow {flow}")
|
||||
if args.diagnostic == SCALED_DIAGNOSTIC and (
|
||||
args.re != 100 or (args.n, args.depth, args.explosion) not in cases
|
||||
or not args.early_pressure):
|
||||
p.error("scaled_n256 requires one of its four Re100 cases and --early-pressure")
|
||||
if args.diagnostic == SCALED_SHEAR and (args.n, args.depth, args.explosion) not in cases:
|
||||
p.error("scaled_shear_n256 requires one of its four Re100 cases")
|
||||
elif args.n == 512:
|
||||
p.error("N512 requires --diagnostic scaled_n256")
|
||||
p.error("N512 requires --diagnostic scaled_n256 or scaled_shear_n256")
|
||||
selected = os.environ.get("CUDA_VISIBLE_DEVICES", "")
|
||||
if not args.dry_run and (not args.run_gpu or not selected or "," in selected or selected == "-1"):
|
||||
p.error("--run-gpu and exactly one explicit CUDA_VISIBLE_DEVICES are required")
|
||||
|
||||
Reference in new issue
Block a user