Skip to content

Fix issues #240-#249 - #266

Merged
asalmgren merged 8 commits into
AMReX-Fluids:developmentfrom
asalmgren:fix_issues_240_249
Sep 21, 2026
Merged

asalmgren merged 8 commits into
AMReX-Fluids:developmentfrom
asalmgren:fix_issues_240_249

Conversation

@asalmgren

@asalmgren asalmgren commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #240, Fixes #241, Fixes #242, Fixes #243, Fixes #244, Fixes #245, Fixes #246, Fixes #247, Fixes #248, Fixes #249.

Medium severity

Low severity

Testing

Built clean with no warnings in four configurations: test_2d (2D EB), test_no_eb_2d (2D no-EB), test_3d (3D EB), test_no_eb_3d (3D no-EB).

Note that #242 (burggraf IC) and #249 (corrector density ghost cells) change numerical output, so the affected benchmarks will need regolding. benchmark.burggraf in particular: the deck runs to stop_time = 5 at Re = 100, so the Norm0 printed by test_convergence_burggraf was previously measuring the decay of the spurious transient rather than the discretisation error of the steady solution.

🤖 Generated with Claude Code

asalmgren and others added 8 commits May 18, 2026 09:38
- AMReX-Fluids#240 ApplyCCProjection leaked cc_phi/cc_gphi on every call (raw new with
  no delete).  Hold them in Vector<MultiFab> and pass GetVecOfPtrs to Hydro.

- AMReX-Fluids#241 The single EB scalar op was shared by the tracer and temperature
  passes, and MLEBABecLap cannot revert an EB Dirichlet BC to Neumann, so an
  EB value set by one field was silently applied to the other.  Give the
  temperature its own solve/apply ops, selected by an is_temperature flag.

- AMReX-Fluids#242 init_burggraf evaluated the exact solution at x-0.5, y-0.5 while the
  probtype-16 forcing, lid profile and DiffFromExact all use [0,1]^2
  (regression from PR AMReX-Fluids#160).  Drop the shift.

- AMReX-Fluids#243 The 2D cylinder cull in incflo_PCInit rejected direction = 2 (the only
  value its disk formula fit) and culled a disk for directions 0/1, where
  AdvectWithFlow and EB2::CylinderIF use slabs.  Use the same convention as
  AdvectWithFlow.

- AMReX-Fluids#244 A fresh start seeded tracer particles on level 0 and never
  redistributed, so initial particle tagging counted zero on level >= 1 and
  the first advection used level-0 MAC velocities.  Redistribute after each
  level is created from scratch.

- AMReX-Fluids#245 steady_state = 1 was accepted but SteadyStateReached() is an Abort
  stub, so the run took one step and then died.  Refuse it at read time, as
  PR AMReX-Fluids#212 did for amr.KE_int.

- AMReX-Fluids#246 InitData never recorded m_last_chk (and restart set m_last_plt = 0),
  so Evolve's final-output block rewrote the step's checkpoint/plotfile,
  renaming the restart checkpoint to *.old.*.

- AMReX-Fluids#247 ReadCheckpointFile took finest_level from the header without checking
  amr.max_level, writing grids[]/m_leveldata[] out of bounds when restarting
  with a smaller max_level.  Abort with a diagnostic instead.

- AMReX-Fluids#248 The update_temperature corrector passed the tracer laps
  (get_laps_new) to compute_laps_T instead of get_laps_tem_new.  Latent
  today because MOL + temperature is refused at read time.

- AMReX-Fluids#249 The update_density corrector refreshed no ghost cells of
  density/density_nph, but ApplyCCProjection averages density_nph to faces
  through them, mixing predictor and corrector values on inter-grid faces.
  Use one ghost cell in both passes.

Built clean (no warnings) for 2D/3D with and without EB.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@asalmgren

Copy link
Copy Markdown
Contributor Author

Fixes #240, fixes #241, fixes #242, fixes #243, fixes #244, fixes #245, fixes #246, fixes #247, fixes#248, fixes#249

@asalmgren
asalmgren enabled auto-merge (squash) September 21, 2026 20:52
@asalmgren
asalmgren merged commit fd1ff9d into AMReX-Fluids:development Sep 21, 2026
12 checks passed
@asalmgren
asalmgren deleted the fix_issues_240_249 branch September 21, 2026 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fresh start seeds tracer particles on level 0 and never redistributes: initial ErrorEst counts zero particles on level >= 1 (no level 2 from particle tagging at t=0) and the first advection uses level-0 MAC velocities for every particle incflo_PCInit 2D cylinder cull: ALWAYS_ASSERT rejects cylinder.direction=2 (the only value its disk formula fits) and culls a disk for directions 0/1 where AdvectWithFlow and EB2::CylinderIF use slabs (regression from PR #213) init_burggraf evaluates the exact solution at x-0.5, y-0.5 (regression from PR #160) while the probtype-16 forcing, lid profile and DiffFromExact use [0,1]: benchmark.burggraf starts half a cavity out of place DiffusionScalarOp: the single EB scalar op is shared by the tracer and temperature passes, so an EB Dirichlet BC set by one pass (tracer_eb or temperature_eb) is silently applied to the other, with the other field's values and coefficient ApplyCCProjection still allocates cc_phi/cc_gphi with new and never deletes them: the per-call leak reported as #191 was marked closed by PR #213 but the code was not changed

2 participants