Skip to content

Fix issues #208-#211, #213, #214, #216, #218-#220, #249, #251, #253-#255; remove the HIT capability (#243-#246) - #256

Merged
asalmgren merged 3 commits into
AMReX-Fluids:developmentfrom
asalmgren:fix-issues-208-255-remove-hit
Oct 7, 2026
Merged

asalmgren merged 3 commits into
AMReX-Fluids:developmentfrom
asalmgren:fix-issues-208-255-remove-hit

Conversation

@asalmgren

Copy link
Copy Markdown
Contributor

Addresses nineteen open issues: ten correctness/EB fixes, five build-configuration
and documentation fixes, and the removal of the HIT capability (which closes four
more). Nothing here has been built or run yet — that is the point of opening it now,
so it can be tested on a second machine in parallel.

Issues closed by this PR

Merging this into development (the default branch) will close all nineteen
automatically:

Closes #208
Closes #209
Closes #210
Closes #211
Closes #213
Closes #214
Closes #216
Closes #218
Closes #219
Closes #220
Closes #243
Closes #244
Closes #245
Closes #246
Closes #249
Closes #251
Closes #253
Closes #254
Closes #255

It does not close #252; see "Not closed, but affected" below.

Each is described in context in the sections that follow.

Correctness and EB

Closes #208 — post_timestep: the ns.dump_plane slab was built with this level's EB
factory on a one-box BoxArray of its own, so EBFArrayBoxFactory::create indexed the
level's cell-flag FabArray with a foreign box index. Now built with the default factory.

Closes #209 — ParticleDerive: the MultiFab overload only writes the valid region, but
errorEst reads the ghost cells for GRAD/RELGRAD tags. The result is now zeroed and
FillBoundary'd when ngrow > 0.

Closes #210 — ComputeAofs: the EBFluxRegister coarse re-redistribution buffer was
handed over at component 0 for both the velocity and the scalar call, so scalar mass
accumulated into the velocity slots. Now offset by state_indx, matching the adjacent
CrseAdd/FineAdd calls.

Closes #211 — reflux: with EB, the shares that EBFluxRegister re-redistributes into
fine-covered coarse cells were deleted by the zeroing loop that ran after it. The zeroing
now runs before the advective reflux, so SyncInterp carries them. Non-EB order is
unchanged (YAFluxRegister::Reflux never touches covered cells).

Closes #213 — press_fill: aborted unconditionally on every physical-boundary fill of
Press_Type, which any avg_pressure gradient tag would hit. Replaced with the no-op
nodal functor already sketched in the file; press_bc never contains ext_dir and
GpuBndryFuncFab extrapolates nodal ghosts itself.

Closes #214 — scaleVar/rescaleVar: the RZ velocity scaling looped over sig's grown
tile box, which has no ghost cells in initialVelocityProject, so the axial inflow ghost
row was never scaled. Now uses vel's own one-cell ghost box.

Closes #216 — Diffusion::computeExtensiveFluxes: covered fluxes were overwritten with
COVERED_VAL (1e40) and then passed to the EB-unaware viscous FluxRegister. Now zero,
which is what MLEBABecLap::FFlux already returns.

Closes #218 — ConvertCheckpointGrids: the TimeAverage file was rewritten as a single
(time_avg, time_avg_fluct) pair, dropping dt_avg and every level above 0. Now copied
verbatim, which also keeps old single-pair files readable.

Closes #219 — computeNewDt: ns.fixed_dt was silently undercut by the CFL estimate,
contrary to the docs. With fixed_dt > 0 the estimate is now ignored and only the
change_max ramp applies, so init_shrink still gives the documented reduced start. The
ns.cfl and dt_cutoff documentation is corrected to match the code rather than the
reverse.

Closes #220 — create_umac_grown: the mask test compared against the unqualified
interior, which resolves to RegType::interior, not level_mask_interior. Correct only
by coincidence (both are 0).

Build configuration and documentation

Closes #249 — deleted Exec/run3d/Make.package and
Exec/square_grid_turbulence/Make.package. Nothing includes a Make.package from a build
directory, and both listed Fortran and pre-AMReX_ sources that no longer exist.

Closes #251 — removed amr.probin_file, the two extra ns.gravity values and the
unregistered velocity_average derive from inputs.3d.square_grid; removed mg.v from
inputs_ml; changed ns.smago_Cs_cst to ns.sigma_Cs_cst in inputs.3d.LES_hotspot,
which selects the Sigma model.

Closes #253 — removed the breathe/Doxygen configuration from conf.py, the breathe pip
install, the Doxygen and LaTeX apt packages, and the uninvoked make_api.py. The docs job
only runs make html. The workflow concurrency group is now
${{ github.ref }}-${{ github.head_ref }}-docs, matching the other six workflows, so a
push to any branch no longer cancels an in-flight development deploy.

Closes #254 — corrected eleven documented keys, prefixes and defaults, and documented
every key the issue listed as undocumented: num_steps, strt_time, stop_interval, the
ns.LES_* set, ns.avg_interval/ns.compute_fluctuations, ns.redistribution_type,
ns.refine_cutcells, the outflow gridding keys, the restart-compatibility keys
(ns.gradp_in_checkpoint, ns.avg_in_checkpoint), the valid prob.probtype values with
their prob.* parameters, and the registered derive names.

Closes #255 — removed the MOL time-step section and its mentions, the non-existent Euler
tutorial entry, the Average? LES? placeholder, the IAMR-Codes remote URLs, and fixed
the ViscBench2d.cpp name, the magveel figure filename, the
Chap:InputsLoadBalancing reference and the ytemplates path.

Removal of the HIT capability

Tutorials/HIT and its turbulent-forcing engine (TurbulentForcing_*, depRand, the
local NS_getForce.cpp and prob_init.cpp overrides) are deleted, together with the
AMREX_USE_TURBULENT_FORCING hook in NavierStokesBase::post_restart and the
USE_TURBULENT_FORCING/USE_FAST_FORCE block in Exec/Make.IAMR. No CI job built it and
Test/IAMR-tests.ini had no entry for it, so nothing in the test matrix changes.

This closes four issues that were confined entirely to that directory:

Closes #243 — getForce verbose min/max loops dereferencing device memory on the host.
Closes #244 — USE_FAST_FORCE coarse lattice anchored at the box corner.
Closes #245 — depRand.cpp using omp_get_thread_num() without <omp.h>.
Closes #246 — turb.force_file read by nothing.

The out-of-date Util/run_scripts SLURM templates are removed as well; run.perlmutter
referenced inputs.3d.HIT and hit_ic_4_32.dat, neither of which existed.

The build-system fact that HIT used to illustrate — a build directory's local files
override IAMR/Source — is preserved as prose in ProblemSetup.rst, since the behaviour
survives the removal. The three HIT mentions in RELEASE_NOTES are left alone: those
releases did ship it.

Not closed, but affected

#252 lists USE_TURBULENT_FORCING among the configurations CI never builds. That bullet is
now moot, but the issue's other gaps (USE_PARTICLES, Util/ConvertCheckpoint,
TaylorGreen/benchmarks, USE_OMP breadth, RZ/BDS/restart decks, no GPU job running an
executable) are untouched.

Housekeeping

A second commit adds tmp_build_dir/ and tmp_install_dir/ to the top-level
.gitignore. The make system creates a tmp_build_dir in every build directory; its
o/ and s/ subdirectories were already ignored but the parent was not, so eight of
them appeared as untracked in a clean tree. tmp_install_dir is its sibling, which the
CI whitespace check already prunes. No tracked file is affected.

Testing notes

Not yet built or run. Worth exercising:

#211 is the one change here that should move an existing baseline, so
Exec/eb_run2d/regtest.2d.bubble and Exec/eb_run3d/regtest.3d.double_shear_layer are the
decks to watch. #214 changes answers only for 2D RZ with an axial inflow, which no shipped
deck has.

🤖 Generated with Claude Code

asalmgren and others added 2 commits October 7, 2026 14:05
…-Fluids#214, AMReX-Fluids#216, AMReX-Fluids#218-AMReX-Fluids#220, AMReX-Fluids#249, AMReX-Fluids#251, AMReX-Fluids#253-AMReX-Fluids#255; remove the HIT capability (AMReX-Fluids#243-AMReX-Fluids#246)

Correctness and EB fixes:

* AMReX-Fluids#208 post_timestep: build the ns.dump_plane slab with the default factory
  instead of this level's EB factory on a foreign BoxArray.
* AMReX-Fluids#209 ParticleDerive: zero the result and FillBoundary when ngrow > 0, so
  gradient tagging on particle_count does not read uninitialised ghosts.
* AMReX-Fluids#210 ComputeAofs: offset the EBFluxRegister coarse buffer by state_indx so
  the scalar call's flux redistribution lands in the scalar components.
* AMReX-Fluids#211 reflux: zero fine-covered coarse cells before the EB advective reflux,
  so re-redistributed shares survive for SyncInterp.
* AMReX-Fluids#213 press_fill: replace the unconditional Abort with the no-op nodal
  functor; press_bc never contains ext_dir.
* AMReX-Fluids#214 scaleVar/rescaleVar: scale vel on its own one-cell ghost box rather
  than sig's, which may have none.
* AMReX-Fluids#216 Diffusion::computeExtensiveFluxes: write 0 instead of COVERED_VAL on
  covered fluxes, which reach the EB-unaware viscous FluxRegister.
* AMReX-Fluids#218 ConvertCheckpointGrids: copy the TimeAverage file verbatim, preserving
  dt_avg and every level.
* AMReX-Fluids#219 computeNewDt: with fixed_dt > 0, do not let the CFL estimate undercut
  it; ramp only by change_max. Docs corrected for ns.cfl and dt_cutoff.
* AMReX-Fluids#220 create_umac_grown: compare the mask against level_mask_interior, not
  RegType::interior.

Build configuration and documentation:

* AMReX-Fluids#249 Delete the unreferenced Exec/run3d and Exec/square_grid_turbulence
  Make.package fragments.
* AMReX-Fluids#251 Drop input keys that nothing reads from three shipped decks, and set
  the constant the selected LES model actually uses.
* AMReX-Fluids#253 Remove the unused Doxygen/breathe toolchain and make_api.py; fix the
  docs workflow concurrency key so pushes stop cancelling development deploys.
* AMReX-Fluids#254 Correct eleven documented input keys, prefixes and defaults, and
  document the keys that had none: num_steps, strt_time, stop_interval, the
  ns.LES_* set, ns.avg_interval, ns.redistribution_type, ns.refine_cutcells,
  the outflow gridding keys, the restart-compatibility keys, prob.probtype
  values and the registered derive names.
* AMReX-Fluids#255 Remove stale content: the removed MOL scheme, the non-existent Euler
  tutorial, IAMR-Codes URLs, a broken cross-reference and figure name.

Remove the HIT (homogeneous isotropic turbulence) capability:

Tutorials/HIT and its turbulent-forcing engine are deleted, along with the
AMREX_USE_TURBULENT_FORCING hook in NavierStokesBase::post_restart and the
USE_TURBULENT_FORCING/USE_FAST_FORCE block in Exec/Make.IAMR. No CI job built
it and no regression test ran it. This closes AMReX-Fluids#243, AMReX-Fluids#244, AMReX-Fluids#245 and AMReX-Fluids#246, all
of which were confined to Tutorials/HIT. The out-of-date Util/run_scripts
SLURM templates are removed as well.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The make system creates a tmp_build_dir in every build directory. Its o/ and
s/ subdirectories were already ignored, but the parent was not, so eight of
them showed up as untracked in a clean tree. tmp_install_dir is its sibling;
the CI whitespace check already prunes both.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@asalmgren
asalmgren requested a review from WeiqunZhang October 7, 2026 22:08
- computeNewDt: with fixed_dt, ramp from at least init_shrink*fixed_dt,
  so a restart after a step shortened by stop_time returns to fixed_dt.
- ParticleDerive: extrapolate ghost cells at physical and coarse/fine
  boundaries so gradient tagging does not refine along walls.
@asalmgren
asalmgren merged commit f5636fb into AMReX-Fluids:development Oct 7, 2026
12 checks passed
@asalmgren
asalmgren deleted the fix-issues-208-255-remove-hit branch October 7, 2026 23:59
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.

press_fill: aborts on every physical-boundary fill of Press_Type, so tagging on avg_pressure with adjacent_difference_greater kills the run reflux: with EB, the part of the advective reflux that EBFluxRegister re-redistributes into fine-covered coarse cells is zeroed and never reaches the fine level ComputeAofs: EB flux-redistribution drho_as_crse for the scalar call is written into the register's velocity components ParticleDerive: particle_count derives with ngrow > 0 leave ghost cells uninitialised, so gradient tagging on them reads garbage post_timestep: ns.dump_plane slab MultiFab is built with this level's EB factory on a foreign BoxArray

2 participants