Repository navigation
Fix issues #221, #223, #225, #228, #231, #232, #234, #235, #237, #238… - #257
Merged
Merged
Conversation
…X-Fluids#228, AMReX-Fluids#231, AMReX-Fluids#232, AMReX-Fluids#234, AMReX-Fluids#235, AMReX-Fluids#237, AMReX-Fluids#238, AMReX-Fluids#242, AMReX-Fluids#247, AMReX-Fluids#248 AMReX-Fluids#248 ViscBench: fill plotfile components by name rather than by position, so a plotfile written with a different amr.plot_vars ordering still gives the right error norms. AMReX-Fluids#247 ConvertCheckpointGrids: extrapolate into the ghost cells that the periodic FillBoundary does not reach (coarse-fine and non-periodic physical boundaries), which otherwise still held the setVal(10.) sentinel when the interpolation slopes were computed. Also build the target MultiFabs on the source DistributionMapping, since the loops index source and target through a single MFIter. AMReX-Fluids#234 prob_initData: read prob.velocity_factor only for probtype 11, and reset IC.v_x first so prob.velocity_ic can neither be overwritten by it nor stand in for it. AMReX-Fluids#235 Projection::set_outflow_bcs: abort unconditionally on a level that only partially covers an outflow face, instead of only asserting in a debug build. AMReX-Fluids#232 Initialize_bcs: range-check the integer ns.lo_bc/ns.hi_bc path; the values index the six-entry tables in NS_BC.H. AMReX-Fluids#231 Drop the stale derive name diveru from the tutorial inputs files. AMReX-Fluids#228 NavierStokes::Initialize: read ns.set_plot_coveredCell_val, which was documented but never queried. AMReX-Fluids#223 post_timestep_particle: validate particles.timestamp_indices against NUM_STATE at first use. AMReX-Fluids#221 Remove the unused umacFill functor and its stale comment. AMReX-Fluids#237 mlmg_mac_solve: register the coarse/fine ratio on every level above 0, not only when a coarse phi is supplied; the sync solve passes null and MLMG was falling back to a ratio of 2. AMReX-Fluids#238 Remove MacProj::set_outflow_bcs, which only rewrote zeros that mac_project had just set but could still abort with "Cannot yet handle partially refined outflow", together with grids_on_side_of_domain, the then-unused have_divu argument and the mac_proj.do_outflow_bcs key. AMReX-Fluids#242 calc_mut_LES: zero the velocity-gradient FluxBoxes before compVelGrad, which skips covered FABs. AMReX-Fluids#225 set_state_in_checkpoint: correct the abort text -- the flags must mark exactly the missing state types. 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.
Closes #221
Closes #223
Closes #225
Closes #228
Closes #231
Closes #232
Closes #234
Closes #235
Closes #237
Closes #238
Closes #242
Closes #247
Closes #248
Correctness
ViscBench: plotfile components are matched to the exact solution by position, not by name #248ViscBench: fill plotfile components by name rather than by position, so a plotfile written with a non-defaultamr.plot_varsordering still gives the right error norms (and a missing name aborts instead of reading pastPlotVarNames()).ConvertCheckpointGrids::ConvertData: refine path takes interpolation slopes from ghost cells that still hold thesetVal(10.)sentinel at coarse-fine and physical boundaries #247ConvertCheckpointGrids::ConvertData: extrapolate into the ghost cells the periodicFillBoundarydoes not reach -- coarse-fine boundaries on levels > 0 and non-periodic physical boundaries -- which otherwise still held thesetVal(10.)sentinel when the interpolation slopes were computed. Also build the target MultiFabs on the sourceDistributionMapping, since the loops index source and target through a singleMFIter(latent underUSE_MPI=TRUE).prob_initData:prob.velocity_factorsilently overwritesprob.velocity_ic[0]for everyprobtype, and the Taylor-Green check acceptsvelocity_icin its place #234prob_initData: readprob.velocity_factoronly forprobtype == 11, and resetIC.v_xfirst, soprob.velocity_icis neither silently overwritten by it nor able to stand in for it.post_timestep_particle:particles.timestamp_indicesis never range-checked, so an entry>= NUM_STATEreads past the state FAB #223post_timestep_particle: validateparticles.timestamp_indicesagainstNUM_STATEat first use, whereNUM_STATEis final.BC / AMR sync
set_outflow_bcs: a fine level that only partially covers an outflow face is caught byAMREX_ASSERTalone, so release builds silently give its outflow nodes phi = 0 while the coarse level gets the hydrostatic value #235Projection::set_outflow_bcs: abort unconditionally on a level that only partially covers an outflow face, instead of only asserting in a debug build.set_x_vel_bcand friends: the six-entry BC tables inNS_BC.Hare indexed by an unvalidatedphys_bc, sons.lo_bc = 6(or any value outside 0..5) reads past the tables #232Initialize_bcs: range-check the integerns.lo_bc/ns.hi_bcpath; those values index the six-entry tables inNS_BC.H.mlmg_mac_solve: the MAC sync solve on a level above 0 never callssetCoarseFineBC, so MLMG assumes a coarse/fine ratio of 2 #237mlmg_mac_solve: register the coarse/fine ratio on every level above 0, not only when a coarse phi is supplied. The sync solve passes null, so MLMG was falling back to a ratio of 2. Bit-identical foramr.ref_ratio = 2; correctsamr.ref_ratio = 4.MacProj::set_outflow_bcs: a no-op (it rewrites zeros thatmac_projectjust set) that still aborts with "Cannot yet handle partially refined outflow" #238 RemoveMacProj::set_outflow_bcs, which only rewrote zeros thatmac_projecthad just set but could still abort with "Cannot yet handle partially refined outflow", along withgrids_on_side_of_domain, the then-unusedhave_divuargument and the now-deadmac_proj.do_outflow_bcskey.EB
NavierStokesBase::calc_mut_LES: with EB,mu_LESon covered FABs/tiles is computed from uninitialized velocity gradients #242calc_mut_LES: zero the velocity-gradientFluxBoxesbeforecompVelGrad, which skips covered FABs.Inputs / diagnostics
variableSetUp: five shipped decks request the derived variablediveru, which no longer exists and is silently dropped from the plotfiles #231 Drop the stale derive namediverufrom the tutorial inputs files.set_plot_coveredCell_val: documented as anns.input but never read from ParmParse #228NavierStokes::Initialize: readns.set_plot_coveredCell_val, which was documented but never queried.set_state_in_checkpoint: the abort text tells the user to "try setting both to 0", which corrupts the restart when only one state type is missing #225set_state_in_checkpoint: correct the abort text -- the flags must mark exactly the missing state types; the old "if unsure, try setting both to 0" advice corrupts the restart when only one type is absent.umacFill: unused fill functor in NavierStokesBase.cpp with a stale comment about u_mac BCs #221 Remove the unusedumacFillfunctor and its stale comment about u_mac BCs.Testing
Builds clean: 2D, 3D, 2D+EB, 3D+EB, 2D+particles,
Util/ConvertCheckpoint,Tutorials/TaylorGreen/benchmarks.max_level=1) and EB bubble all run normally; none hit the new aborts.prob.velocity_icalone for Taylor-Green, andns.lo_bc = 6.ns.set_plot_coveredCell_val=0now yields a different plotfile than=1, confirming the key is read.ConvertCheckpointGrids::ConvertData: refine path takes interpolation slopes from ghost cells that still hold thesetVal(10.)sentinel at coarse-fine and physical boundaries #247, a no-extrapolation build was used to diff the converted checkpoints: every cell-centred state type differs at every level while nodal pressure is byte-identical, and the spurious density overshoot next to the walls drops from 1.000144 to 1.000090.🤖 Generated with Claude Code