18#ifndef OPENSWMM_FIND_ROOT_HPP
19#define OPENSWMM_FIND_ROOT_HPP
42using NewtonFunc = std::function<void(
double x,
double* f,
double* df)>;
44int newton(
double x1,
double x2,
double* rts,
double xacc,
const NewtonFunc& func);
std::function< double(double x)> RidderFunc
Ridder's method (derivative-free).
Definition FindRoot.hpp:55
std::function< void(double x, double *f, double *df)> NewtonFunc
Newton-Raphson with bisection fallback.
Definition FindRoot.hpp:42
int newton(double x1, double x2, double *rts, double xacc, const NewtonFunc &func)
Definition FindRoot.cpp:17
constexpr int MAXIT
Maximum iterations.
Definition FindRoot.hpp:26
double ridder(double x1, double x2, double xacc, const RidderFunc &func)
Definition FindRoot.cpp:60
Definition Controls.cpp:24