chombo-discharge
Loading...
Searching...
No Matches
PolyUtils Namespace Reference

Agglomeration class for various useful polynomial routines. More...

Functions

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.

Detailed Description

Agglomeration class for various useful polynomial routines.

Function Documentation

◆ 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_impFuncImplicit function
[in]a_point1First end-point
[in]a_point2Other 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_point1Point1
[in]a_point2Point2
[in]a_funcFunc