Agglomeration class for various useful polynomial routines.
More...
|
| RealVect | brentRootFinder (const RefCountedPtr< BaseIF > &a_impFunc, const RealVect &a_point1, const RealVect &a_point2) |
| | Compute the root of a function between two points. This is a 1D problem along the line.
|
| |
| Real | brentSolve (const Real a_point1, const Real a_point2, const std::function< Real(const Real x)> &a_func) noexcept |
| | Compute the root of a function between two points. This is a 1D problem.
|
| |
Agglomeration class for various useful polynomial routines.
◆ brentRootFinder()
| RealVect PolyUtils::brentRootFinder |
( |
const RefCountedPtr< BaseIF > & |
a_impFunc, |
|
|
const RealVect & |
a_point1, |
|
|
const RealVect & |
a_point2 |
|
) |
| |
Compute the root of a function between two points. This is a 1D problem along the line.
- Parameters
-
| [in] | a_impFunc | Implicit function |
| [in] | a_point1 | First end-point |
| [in] | a_point2 | Other end-point |
- Note
- The root MUST be bracketed, i.e. f(x1)*f(x2) < 0.0. Anything else is an error.
- Returns
- Return value
◆ brentSolve()
| Real PolyUtils::brentSolve |
( |
const Real |
a_point1, |
|
|
const Real |
a_point2, |
|
|
const std::function< Real(const Real x)> & |
a_func |
|
) |
| |
|
noexcept |
Compute the root of a function between two points. This is a 1D problem.
- Returns
- Returns the root (if it could be found). Returns std::numeric_limits<Real>::max() otherwise.
- Parameters
-
| [in] | a_point1 | Point1 |
| [in] | a_point2 | Point2 |
| [in] | a_func | Func |