Merge native 92b8afe scaled N256 Taylor-Green diagnostic into claude/shear-wave
Bundle celeris-scaled-tg-92b8afe-base-eec4677.bundle (SHA256 9e593384...) verified with git bundle verify; merged without rewriting history. Conflicts resolved by retaining both additions: run_case keeps the shear-wave flow helpers/receipt block and the scaled_n256 diagnostic block, with scaled_n256 restricted to --flow taylor_green (mutually exclusive with shear_wave); test_projected_pairs keeps the explicit 'taylor_green' verify_source argument and 92b8afe's per-scheme selector expectation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
46100e1d53
3 files changed
+251
-25
No files matched your search
@@ -19,6 +19,7 @@ BUILD_CAPTURE_SHA256 = "3dbaa6547cb0a4cb1541054f3b64ad8b6e18cc70527ac6166e56b944
|
||||
REFERENCE_HARNESS = "11901a7f77557a901e017a171eeae1758d584fa5"
|
||||
INITIALIZATION = "physical FP64 equilibrium G at actual cell centers; rho=1+3p"
|
||||
SHEAR_WAVE_SHA256 = "81d5c8ee60864372887cddf9239580c82fb6750d956038f1e3ee9de61aa4e877"
|
||||
SCALED_DIAGNOSTIC = "scaled_n256"
|
||||
|
||||
|
||||
def flow_functions(flow="taylor_green"):
|
||||
@@ -176,10 +177,12 @@ def main():
|
||||
p.add_argument("--run-gpu", action="store_true")
|
||||
p.add_argument("--dry-run", action="store_true")
|
||||
p.add_argument("--re", type=int, choices=[100, 1000], required=True)
|
||||
p.add_argument("--n", type=int, choices=[32, 64, 128, 256], required=True)
|
||||
p.add_argument("--n", type=int, choices=[32, 64, 128, 256, 512], required=True)
|
||||
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("--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")
|
||||
@@ -191,6 +194,15 @@ def main():
|
||||
p.error("Output already exists; choose a new path to retain prior evidence")
|
||||
if args.explosion != "constant" and args.depth != 2:
|
||||
p.error("projected_linear requires depth 2")
|
||||
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:
|
||||
p.error("scaled_n256 requires one of its four Re100 cases and --early-pressure")
|
||||
elif args.n == 512:
|
||||
p.error("N512 requires --diagnostic scaled_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")
|
||||
@@ -199,7 +211,8 @@ def main():
|
||||
source = verify_source(repo, args.expected_revision, args.flow)
|
||||
runtime = runtime_source(repo)
|
||||
if args.dry_run:
|
||||
print(json.dumps(dict(source=source, runtime_source=runtime, dry_run=True)))
|
||||
print(json.dumps(dict(source=source, runtime_source=runtime, dry_run=True,
|
||||
**({"diagnostic": args.diagnostic} if args.diagnostic else {}))))
|
||||
return 0
|
||||
from CelerisLab.cuda.context import CudaContext
|
||||
from CelerisLab.lbm.blocks import BlockLayout2D
|
||||
@@ -252,6 +265,8 @@ def main():
|
||||
report.update(flow=args.flow, mode=list(shear_wave.MODE),
|
||||
polarization=shear_wave.E.tolist(), angle_deg=shear_wave.ANGLE_DEG,
|
||||
phase=shear_wave.PHI, eps=shear_wave.eps(args.n))
|
||||
if args.diagnostic:
|
||||
report["diagnostic"] = args.diagnostic
|
||||
args.output.parent.mkdir(parents=True, exist_ok=True)
|
||||
def save():
|
||||
temporary = args.output.with_suffix(args.output.suffix + ".tmp")
|
||||
|
||||
Reference in new issue
Block a user