KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
|
#include <brent_iteration.h>
Static Public Member Functions | |
template<typename func_t > | |
static double | FindRoot (func_t Function, double Guess1, double Guess2, double Tolerance, int MaximumIterations) |
Find a root of a one-variable function using Brent's algorithm. This is a C++ implementation of the algorithm in Press, Teukolsky, Vetterling, Flannery. Numerical Recipes in Fortran (2nd Edition).
|
inlinestatic |
Find a root of Funtion in the range defined by Guess1 and Guess2. Function is something that takes a double and returns a double. Note that Guess1 and Guess2 must be on opposite sides of the root, that is Function(Guess1)*Function(Guess2) < 0.0.