Conversation
…ile partly stiff, with lower Nz defaults and faster/more accurate evolution.
…tion (improves numerical stability)
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.
Summary
This is a large numerical/tooling update that modernizes CAMB’s ODE integration path, adds accuracy-stability diagnostics, and improves development/build reproducibility. It should be 10-25% faster than the previous version at the same or better accuracy.
Main changes:
RungeKuttaDP45module that preserves CAMB’s re-entry/control-flow semantics while using Dormand-Prince 4/5 coefficients.RECFAST_use_rosenbrock,RECFAST_rosenbrock_handoff_xH, andRECFAST_rosenbrock_tolsettings exposed through Fortran, Python, and.iniround-tripping.RECFAST_nzbaseline and scaling withBackgroundTimeStepBoostandIntTolBoost.ckH^2by relaxing toward the quasi-static fixed point rather than hard-settingGamma = 0.TimeSwitchBoostas a separate accuracy control for physical transition/switch timings.camb check_accuracy, with Python API support, CLI docs, optional plots, chi-squared estimates, boost searches, and component refinement..iniwriting/round-tripping for RECFAST Rosenbrock settings and cleaner float serialization.MANIFEST.inwhitelist.Using
check_accuracyThis PR adds a new stability-checking command:
It compares the requested calculation against a boosted-accuracy reference run and reports derived-parameter, CMB spectra, lensing-potential, and matter-power differences. Useful options include:
Notes
The PR includes numerical behavior changes. The two added changelog notes document the RECFAST Rosenbrock tuning and the PPF Gamma stabilization experiments, including the main accuracy comparisons used to select the shipped defaults.