Repository navigation
Make the tutorials plainer for C++ and AMReX beginners - #190
Merged
Merged
Conversation
Across Base, Particles, AMR, TimeIntegration, ML, EB, FFT and LinearSolvers: remove the helpers, templates and lambdas that existed only to verify results, inline one-use helpers and functors so each tutorial reads top to bottom, replace multi-value reductions and STL reference computations with plain calls and loops, write out clever index tricks, and cut each tutorial to one or two checks with a literal tolerance. Input-validation asserts go except the two that guard a real crash. Printed results are kept; READMEs updated.
WeiqunZhang
force-pushed
the
beginner-friendly
branch
from
November 5, 2026 23:07
c68fe1a to
377fbb5
Compare
- EB/Geometry: 5% tolerance so coarser grids still pass. - EB/Advection: do not write the final plotfile twice. - Particles/MultiLevel: keep the grid-size assert; average_down needs fine grids coarsenable by 2. - CustomLinOp: keep the singular-matrix assert. - ABecLaplacian: name the wavenumber kwave, not k, next to the cell index k.
In single precision RK4 reaches round-off on the first grid, so the measured rate is noise and the Clang single-precision CI job failed.
- EnergySpectrum: keep the n_cell > 16 assert; the exact spectrum indexes up to |k| = 8. - ElectrostaticPIC: assert at least two zero crossings; a NaN frequency error no longer passes. - RungeKutta: the error must be small for any method; the rate is checked only with two or more runs. - EB/Advection: mass is checked to round-off again. - NeighborList: keep the cutoff and skin asserts. - Docs: drop descriptions of removed checks; refresh expected output.
The particle reductions call the lambda from host-device code, so the CUDA build rejected the device-only lambdas in Basics and NeighborList.
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.
Across Base, Particles, AMR, TimeIntegration, ML, EB, FFT and LinearSolvers: remove the helpers, templates and lambdas that existed only to verify results, inline one-use helpers and functors so each tutorial reads top to bottom, replace multi-value reductions and STL reference computations with plain calls and loops, write out clever index tricks, and cut each tutorial to one or two checks with a literal tolerance. Input-validation asserts go except the two that guard a real crash. Printed results are kept; READMEs updated.