34#ifndef OPENSWMM_FIND_ROOT_HPP
35#define OPENSWMM_FIND_ROOT_HPP
58using NewtonFunc = std::function<void(
double x,
double* f,
double* df)>;
60int newton(
double x1,
double x2,
double* rts,
double xacc,
const NewtonFunc& func);
Definition FindRoot.cpp:31
std::function< double(double x)> RidderFunc
Ridder's method (derivative-free).
Definition FindRoot.hpp:71
std::function< void(double x, double *f, double *df)> NewtonFunc
Newton-Raphson with bisection fallback.
Definition FindRoot.hpp:58
int newton(double x1, double x2, double *rts, double xacc, const NewtonFunc &func)
Definition FindRoot.cpp:33
constexpr int MAXIT
Maximum iterations.
Definition FindRoot.hpp:42
double ridder(double x1, double x2, double xacc, const RidderFunc &func)
Definition FindRoot.cpp:76
Definition NodeCoupling.cpp:16