![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
Classes | |
| struct | OdeWorkspace |
Functions | |
| OdeWorkspace & | workspace (int n) |
| Grow this thread's reusable solver arrays for n equations. | |
| template<typename F> | |
| void | rkck (OdeWorkspace &ws_, double x, int n, double h, F &&derivs) |
| Evaluate one Cash-Karp trial step in the thread-local workspace. | |
| template<typename F> | |
| int | rkqs (OdeWorkspace &ws_, double *x, int n, double htry, double eps, double *hdid, double *hnext, F &&derivs) |
| Reject and shrink trial RK45 steps until local error is acceptable. | |
| template<typename F> | |
| int | integrate (double *ystart, int n, double x1, double x2, double eps, double h1, F &&derivs) |
| int openswmm::ode::detail::integrate | ( | double * | ystart, |
| int | n, | ||
| double | x1, | ||
| double | x2, | ||
| double | eps, | ||
| double | h1, | ||
| F && | derivs ) |
| void openswmm::ode::detail::rkck | ( | OdeWorkspace & | ws_, |
| double | x, | ||
| int | n, | ||
| double | h, | ||
| F && | derivs ) |
Evaluate one Cash-Karp trial step in the thread-local workspace.
| F | Callable with the DerivFunc argument convention. |
| [in] | x | Independent variable at the current state. |
| [in] | n | Positive equation count, no larger than allocated workspace. |
| [in] | h | Trial step in x units; may be negative. |
| [in] | derivs | Borrowed synchronous derivative evaluator, not retained. |
| int openswmm::ode::detail::rkqs | ( | OdeWorkspace & | ws_, |
| double * | x, | ||
| int | n, | ||
| double | htry, | ||
| double | eps, | ||
| double * | hdid, | ||
| double * | hnext, | ||
| F && | derivs ) |
Reject and shrink trial RK45 steps until local error is acceptable.
| F | Callable with the DerivFunc argument convention. |
| [in,out] | x | Non-null current coordinate; advanced only on acceptance. |
| [in] | n | Positive equation count covered by thread-local workspace. |
| [in] | htry | Initial attempted step, in x units. |
| [in] | eps | Positive dimensionless scaled-error tolerance. |
| [out] | hdid | Non-null slot for the accepted step; unchanged on underflow. |
| [out] | hnext | Non-null slot for the next proposed step; unchanged on underflow. |
| [in] | derivs | Borrowed synchronous derivative evaluator, not retained. |
| OdeWorkspace & openswmm::ode::detail::workspace | ( | int | n | ) |
Grow this thread's reusable solver arrays for n equations.
| [in] | n | Positive requested capacity; n * 5 must fit in int. |
A request within current capacity does nothing. Growing releases all old arrays and allocates zero-initialized replacements, including five stage arrays. Allocation failures are not checked by this legacy helper.