|
CLASSpp Manual
Cosmology reference and developer manual
|
Go to the source code of this file.
Enumerations | |
| enum class | EvolverFeature { Diagonal , MaxOrder , ErkController , AbsTol , Stats , Histograms } |
Functions | |
| void | EvolverOptionsCheck (const EvolverOptions &options, const char *evolver_name, double x_ini, std::initializer_list< EvolverFeature > honoured) |
| void | evolver_rkdp45 (EvolverDerivs derivs, double x_ini, double x_end, double *y, int y_size, const EvolverOptions &options) |
| Evolver | SelectEvolver (evolver_type type, EvolverOptions &options, const ErkControllerConfig &erk, const EvolverDiagonal *diagonal) |
Variables | |
| constexpr double | kEvolverDefaultAbsTol = 1.0e-15 |
The one place the shared evolver interface is defined.
Design: docs/superpowers/specs/2026-09-06-evolver-options-design.md
Every evolver takes (derivs, range, state, workspace, options). Everything else lives here, so adding a knob touches this file and the evolvers that honour it, rather than every call site.
The rule that makes this more than tidying: an option an evolver does not consume is an ERROR, not an ignore. Each evolver-specific field therefore has an "unset" state distinguishable from any value a caller would pass on purpose, and each evolver declares what it honours through EvolverOptionsCheck. Silently ignoring a knob is the failure #395 punished.
|
strong |
| void EvolverOptionsCheck | ( | const EvolverOptions & | options, |
| const char * | evolver_name, | ||
| double | x_ini, | ||
| std::initializer_list< EvolverFeature > | honoured | ||
| ) |
Reject options the named evolver does not honour, and check the ones every evolver requires. Throws (severe: these are run-configuration choices a sampler never varies).
| void evolver_rkdp45 | ( | EvolverDerivs | derivs, |
| double | x_ini, | ||
| double | x_end, | ||
| double * | y, | ||
| int | y_size, | ||
| const EvolverOptions & | options | ||
| ) |
Dormand-Prince 5(4) and Tsitouras 5(4), adaptive; see evolver_erk.h.
| Evolver SelectEvolver | ( | evolver_type | type, |
| EvolverOptions & | options, | ||
| const ErkControllerConfig & | erk, | ||
| const EvolverDiagonal * | diagonal | ||
| ) |
The evolver type names, with the options only that evolver consumes filled in: the controller erk for the explicit pairs, diagonal for etd (when not null).
|
inlineconstexpr |
Step statistics, filled when a caller asks for them.
ndf15 has collected exactly these six counters into a local array and thrown them away since it was written; this is how they get out. Not thread-shared: one EvolverStats belongs to one evolver call. The value every evolver used to hardwire. Also the sentinel for "unset": abstol is feature-gated like the rest, so it needs a distinguishable default.