fix issues 117 118 119 120 121 122 - #124
Merged
Merged
Conversation
- AMReX-Fluids#117 ppm_trace_sources is not implemented for any ppm_type: the PPM source-tracing block is commented out and PLM never had one, so the sources are added in the transverse step either way. Warn and reset for every ppm_type instead of only for ppm_type = 0, whose warning text implied it worked for ppm_type = 1. Also documents the option in _cpp_parameters. - AMReX-Fluids#118 numGrow (EB Godunov + redistribution) was one ghost short for flatten_eb: the EB Godunov traces on grow(bx,4)/grow(bx,5) and flatten_eb needs q at +-3 around those cells, so on the outer ring it took the !q.contains() early exit and dropped the outward flattening component -- and those states feed the redistributed update, making the answer depend on the box layout. FluxRedist 6 -> 7, StateRedist 7 -> 8 for Godunov. NoRedist (which only needs traced states within distance 2) and all MOL cases are unchanged. - AMReX-Fluids#119 eb_compute_div: the eb_weights_type = 1 "total energy" weight was rho*(rho*e + |u|^2/2) because CAMR's QREINT is rho*e, not the specific internal energy of the CNS code this was ported from. Use the actual total energy density. - AMReX-Fluids#120 MOL_umeth_eb: allocate slopetmp on The_Async_Arena like the rest of the EB scratch, so it is not freed while the Riemann kernels reading it may still be in flight. Preventive; no wrong answer is reachable today. - AMReX-Fluids#121 parse_CAMR_params.py now emits the [[maybe_unused]] the checked-in CAMR_params.H carries, so re-running mk_params.sh no longer produces a header that fails the WARN_ERROR CI builds. mk_params.sh now reproduces all three headers byte-identically. Also drops the file-scope #include "CAMR_params.H" from the five Exec/*/prob.H, which none of them needs and which made a prob.H reference to e.g. small_dens bind to a zero-initialized copy rather than CAMR::small_dens. - AMReX-Fluids#122 make_eb_converging_nozzle aborts outside DIM = 3: in 2D amrex's LatheIF revolves about the origin and RotationIF ignores the axis argument, so it silently built an unrelated geometry. Notes in converging_nozzle.inp that it is a 3D problem. Also removes an unused local in MovingPlane_Shock/prob.H that made that directory fail a WARN_ALL/WARN_ERROR build (pre-existing; CI builds only Sod and SodPlusSphere). Built every Exec directory with WARN_ALL=TRUE WARN_ERROR=TRUE (Sod, SodPlusSphere 2D and 3D, DoubleRamp, ReReTest, MovingPlane_Shock) and ran Sod, SodPlusSphere (all four do_mol x FluxRedist/StateRedist combinations), DoubleRamp, ReReTest and MovingPlane_Shock. SodPlusSphere EB Godunov agrees to roundoff between hydro_tile_size 1024x16 and 8x8. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #117, fixes #118, fixes #119, fixes #120, fixes #121, fixes #122.
#117 —
ppm_trace_sourcesaccepted silently forppm_type = 1and never usedThe PPM source-tracing block in
PPM.cppis commented out and PLM never had one (trace_ppmtakessrcQas an unnamed unused parameter), so the sources are added in the transverse step for both reconstructions. The warning-and-reset now fires for everyppm_type, not justppm_type = 0— whose message implied tracing worked forppm_type = 1. The option is also documented in_cpp_parameters.#118 —
numGrowis one ghost short forflatten_ebin EB Godunov + redistributionThe EB Godunov traces on
grow(bx,4)(FluxRedist) /grow(bx,5)(StateRedist), andflatten_ebneedsqat ±3 around each traced cell. With the old counts it hit the!q.contains(...)early exit on the outer ring and returned 1, silently dropping the outward flattening component — and through redistribution those states reach the update of valid cells, so results depended on the box layout. Godunov FluxRedist 6 → 7, StateRedist 7 → 8. NoRedist (which only needs traced states within distance 2) and every MOL case are unchanged, so theFluxRedist || NoRedistbranch is split.#119 —
eb_weights_type = 1was not the total energyThe weight was
rho*(rho*e + |u|^2/2): the expression came from CNS, whereq(QEINT)is the specific internal energy, but CAMR'sQREINTisrho*e(Hydro_ctoprim.H:89). It is now the actual total energy densityrho*e + 0.5*rho*|u|^2. Default iseb_weights_type = 2, so no shipped input changes.#120 —
slopetmpfreed while the Riemann kernels may still read itMOL_umeth_eballocated its slope scratch on the default arena, whose free is immediate, and returns without synchronizing. It now usesThe_Async_Arena()like every other per-box scratch FAB in the EB hydro path. Preventive: no wrong answer is reachable at the current commit.#121 — regenerating
CAMR_params.Hbroke theWARN_ERRORbuildsThe checked-in header carries
[[maybe_unused]]on all 38 declarations, but the generator did not emit it, so following the header's own instructions (edit _cpp_parameters, runmk_params.sh) produced a tree that fails every CI build.parse_CAMR_params.pynow emits the attribute;mk_params.shreproduces all three headers byte-identically (verified — regenerating leaves no diff).Additionally the file-scope
#include "CAMR_params.H"is dropped from the fiveExec/*/prob.H. None of them, nor any translation unit that includes them, references a parameter; it was giving four translation units 38 unused file-scope statics and made aprob.Hreference to e.g.small_densbind to a zero-initialized copy instead ofCAMR::small_dens.#122 — converging nozzle silently built an unrelated geometry in 2D
LatheIFrevolves about the origin in 2D andRotationIFignores its axis argument there, soCAMR.geometry = converging-nozzleproduced nonsense with no diagnostic. It now aborts outsideDIM = 3, andconverging_nozzle.inprecords that it is a 3D problem while this directory'sGNUmakefiledefaults toDIM = 2.Also
Removes an unused local in
MovingPlane_Shock/prob.Hthat made that directory fail aWARN_ALL/WARN_ERRORbuild. Pre-existing and unrelated — CI builds onlySodandSodPlusSphere, so it had never been compiled with those flags.Testing
Built every
Execdirectory withWARN_ALL=TRUE WARN_ERROR=TRUE:Exec/SodExec/SodPlusSphereExec/SodPlusSphereExec/DoubleRampExec/ReReTestExec/MovingEBCases/MovingPlane_ShockRan Sod; SodPlusSphere across all four
do_molxFluxRedist/StateRedistcombinations (the paths whosenumGrow()changed), energy conserved in each; DoubleRamp; ReReTest; and MovingPlane_Shock.Layout check: SodPlusSphere EB Godunov + FluxRedist, 10 steps,
hydro_tile_size1024x16 vs 8x8 —fcomparegives relative errors <= 3e-15 on all fields. Notefcomparerefuses differing BoxArrays, so this varies tiling rather thanmax_grid_size, and this input may not place a shock near a cut cell in the way #118 describes; it is a consistency check, not a reproduction of the original discrepancy.🤖 Generated with Claude Code