tfel
Loading...
Searching...
No Matches
tfel::math::BissectionAlgorithmBase< NumericType > Struct Template Reference

a base class to algorithms that extends a scalar root finding algorithm, such as a fixed-point iteration, Newton-Raphson, Stephensen, etc.. with the bissection algorithm. More...

#include </home/runner/work/tfel/tfel/include/TFEL/Math/NonLinearSolvers/BissectionAlgorithmBase.hxx>

Inheritance diagram for tfel::math::BissectionAlgorithmBase< NumericType >:
tfel::math::BissectionAlgorithmData< NumericType >

Public Member Functions

TFEL_HOST_DEVICE void updateBounds (const NumericType &, const NumericType &)
TFEL_HOST_DEVICE void iterate (NumericType &)
 apply the bissection algorithm to the next extimate of the root.
TFEL_HOST_DEVICE bool getNextRootEstimate (NumericType &) const
 get an estimation of the root of the function
TFEL_HOST_DEVICE const BissectionAlgorithmData< NumericType > & getData () const
 return the current state of the bissection algorithm

Additional Inherited Members

Protected Attributes inherited from tfel::math::BissectionAlgorithmData< NumericType >
NumericType xmin = std::numeric_limits<NumericType>::quiet_NaN()
 lower bound of the root
NumericType fmin = std::numeric_limits<NumericType>::quiet_NaN()
 value of the function associated with the lower bound of the root.
NumericType xmax = std::numeric_limits<NumericType>::quiet_NaN()
 upper bound of the root
NumericType fmax = std::numeric_limits<NumericType>::quiet_NaN()
 value of the function associated with the upper bound of the root.

Detailed Description

template<typename NumericType>
struct tfel::math::BissectionAlgorithmBase< NumericType >

a base class to algorithms that extends a scalar root finding algorithm, such as a fixed-point iteration, Newton-Raphson, Stephensen, etc.. with the bissection algorithm.

The main method provided by the BissectionAlgorithmBase is the iterate class which must be called after each iteration of the root finding algorithm.

Template Parameters
NumericTypenumeric type used

Member Function Documentation

◆ getNextRootEstimate()

template<typename NumericType>
bool tfel::math::BissectionAlgorithmBase< NumericType >::getNextRootEstimate ( NumericType & x) const

get an estimation of the root of the function

Parameters
[out]xestimate of the root of the function
Returns
a boolean stating if an estimate of the root has been given.

◆ iterate()

template<typename NumericType>
void tfel::math::BissectionAlgorithmBase< NumericType >::iterate ( NumericType & x)

apply the bissection algorithm to the next extimate of the root.

Parameters
[in]xcurrent estimate of the root

◆ updateBounds()

template<typename NumericType>
void tfel::math::BissectionAlgorithmBase< NumericType >::updateBounds ( const NumericType & x,
const NumericType & f )
Parameters
[in]xcurrent estimate of the root
[in]fvalue of the function associated current estimate of the root

The documentation for this struct was generated from the following files: