BubbleProfiler  0.3.0
by Peter Athron, Csaba Balazs, Michael Bardsley, Andrew Fowlie, Dylan Harries & Graham White
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
BubbleProfiler::GSL_root_finder< N > Class Template Reference

#include <gsl_root_finder.hpp>

Inheritance diagram for BubbleProfiler::GSL_root_finder< N >:
Inheritance graph
[legend]
Collaboration diagram for BubbleProfiler::GSL_root_finder< N >:
Collaboration graph
[legend]

Public Types

enum  Algorithm { Algorithm::GSL_hybrids, Algorithm::GSL_hybrid, Algorithm::GSL_dnewton }
 
using Function_argument = Eigen::Matrix< double, N, 1 >
 
using Function_value = Eigen::Matrix< double, N, 1 >
 

Public Member Functions

virtual ~GSL_root_finder ()=default
 
virtual const Function_argumentget_solution () const override
 
void set_algorithm (Algorithm a)
 
void set_relative_error (double e)
 
void set_absolute_error (double e)
 
void set_use_stepsize_convergence_check (bool flag)
 
void set_max_iterations (std::size_t i)
 
- Public Member Functions inherited from BubbleProfiler::Root_finder< Eigen::Matrix< double, N, 1 > >
virtual ~Root_finder ()=default
 
Root_finder_status find_root (F &&function, const Eigen::Matrix< double, N, 1 > &guess)
 

Protected Types

using Function = std::function< Function_value(const Function_argument &)>
 

Protected Member Functions

virtual Root_finder_status solve (const Function &, const Function_argument &) override
 
- Protected Member Functions inherited from BubbleProfiler::Root_finder< Eigen::Matrix< double, N, 1 > >
virtual Root_finder_status solve (const std::function< Eigen::Matrix< double, N, 1 >(const Eigen::Matrix< double, N, 1 > &)> &, const Eigen::Matrix< double, N, 1 > &)=0
 

Private Member Functions

const gsl_multiroot_fsolver_type * get_gsl_solver_type () const
 

Static Private Member Functions

static int gsl_function (const gsl_vector *, void *, gsl_vector *)
 

Private Attributes

std::size_t n_dims
 
Algorithm solver_algorithm {Algorithm::GSL_hybrids}
 
double rel_err {1.e-6}
 
double abs_err {1.e-6}
 
bool use_stepsize_convergence {false}
 
std::size_t max_iterations {100}
 
Function function {nullptr}
 
Function_argument solution {}
 

Detailed Description

template<int N>
class BubbleProfiler::GSL_root_finder< N >

Definition at line 33 of file gsl_root_finder.hpp.

Member Typedef Documentation

template<int N>
using BubbleProfiler::GSL_root_finder< N >::Function = std::function<Function_value(const Function_argument&)>
protected

Definition at line 57 of file gsl_root_finder.hpp.

template<int N>
using BubbleProfiler::GSL_root_finder< N >::Function_argument = Eigen::Matrix<double,N,1>

Definition at line 35 of file gsl_root_finder.hpp.

template<int N>
using BubbleProfiler::GSL_root_finder< N >::Function_value = Eigen::Matrix<double,N,1>

Definition at line 36 of file gsl_root_finder.hpp.

Member Enumeration Documentation

template<int N>
enum BubbleProfiler::GSL_root_finder::Algorithm
strong
Enumerator
GSL_hybrids 
GSL_hybrid 
GSL_dnewton 

Definition at line 38 of file gsl_root_finder.hpp.

Constructor & Destructor Documentation

template<int N>
virtual BubbleProfiler::GSL_root_finder< N >::~GSL_root_finder ( )
virtualdefault

Member Function Documentation

template<int N>
const gsl_multiroot_fsolver_type * BubbleProfiler::GSL_root_finder< N >::get_gsl_solver_type ( ) const
private
template<int N>
virtual const Function_argument& BubbleProfiler::GSL_root_finder< N >::get_solution ( ) const
inlineoverridevirtual
template<int N>
int BubbleProfiler::GSL_root_finder< N >::gsl_function ( const gsl_vector *  x,
void *  parameters,
gsl_vector *  f 
)
staticprivate

Definition at line 76 of file gsl_root_finder.hpp.

Referenced by BubbleProfiler::GSL_root_finder< N >::solve().

template<int N>
void BubbleProfiler::GSL_root_finder< N >::set_absolute_error ( double  e)
inline

Definition at line 50 of file gsl_root_finder.hpp.

References BubbleProfiler::GSL_root_finder< N >::abs_err.

template<int N>
void BubbleProfiler::GSL_root_finder< N >::set_algorithm ( Algorithm  a)
inline
template<int N>
void BubbleProfiler::GSL_root_finder< N >::set_max_iterations ( std::size_t  i)
inline
template<int N>
void BubbleProfiler::GSL_root_finder< N >::set_relative_error ( double  e)
inline

Definition at line 49 of file gsl_root_finder.hpp.

References BubbleProfiler::GSL_root_finder< N >::rel_err.

template<int N>
void BubbleProfiler::GSL_root_finder< N >::set_use_stepsize_convergence_check ( bool  flag)
inline
template<int N>
Root_finder_status BubbleProfiler::GSL_root_finder< N >::solve ( const Function f,
const Function_argument initial_guess 
)
overrideprotectedvirtual

Member Data Documentation

template<int N>
double BubbleProfiler::GSL_root_finder< N >::abs_err {1.e-6}
private
template<int N>
Function BubbleProfiler::GSL_root_finder< N >::function {nullptr}
private

Definition at line 68 of file gsl_root_finder.hpp.

template<int N>
std::size_t BubbleProfiler::GSL_root_finder< N >::max_iterations {100}
private
template<int N>
std::size_t BubbleProfiler::GSL_root_finder< N >::n_dims
private

Definition at line 62 of file gsl_root_finder.hpp.

Referenced by BubbleProfiler::GSL_root_finder< N >::solve().

template<int N>
double BubbleProfiler::GSL_root_finder< N >::rel_err {1.e-6}
private
template<int N>
Function_argument BubbleProfiler::GSL_root_finder< N >::solution {}
private
template<int N>
Algorithm BubbleProfiler::GSL_root_finder< N >::solver_algorithm {Algorithm::GSL_hybrids}
private
template<int N>
bool BubbleProfiler::GSL_root_finder< N >::use_stepsize_convergence {false}
private

The documentation for this class was generated from the following file: