13#ifndef OPTIMIST_SCALAR_ROOT_FINDER_BRACKTING_HH
14#define OPTIMIST_SCALAR_ROOT_FINDER_BRACKTING_HH
20 namespace ScalarRootFinder
39 template <
typename Real,
typename DerivedSolver>
77 return static_cast<const DerivedSolver *
>(
this)->
name_impl();
107 if (this->
m_fa*this->
m_fb > 0.0) {
return false;}
108 else {x_sol = this->
find_root(function);}
125 return static_cast<DerivedSolver *
>(
this)->find_root_impl(function);
#define OPTIMIST_BASIC_CONSTANTS(Real)
Definition Optimist.hh:70
Bracketing()
Definition Bracketing.hh:69
Real m_fb
Definition Bracketing.hh:60
void tolerance_bracketing(Real t_tolerance)
Definition Bracketing.hh:85
Real m_fd
Definition Bracketing.hh:62
static constexpr bool requires_second_derivative
Definition Bracketing.hh:45
Real m_fc
Definition Bracketing.hh:61
Real m_c
Definition Bracketing.hh:61
typename ScalarRootFinder< Real, DerivedSolver >::SecondDerivativeWrapper SecondDerivativeWrapper
Definition Bracketing.hh:52
Real m_a
Definition Bracketing.hh:59
Real find_root(FunctionWrapper function)
Definition Bracketing.hh:123
Real m_interval_shink
Definition Bracketing.hh:57
static constexpr bool requires_function
Definition Bracketing.hh:43
Real m_tolerance_bracketing
Definition Bracketing.hh:55
bool solve_impl(FunctionWrapper function, Real, Real &x_sol)
Definition Bracketing.hh:94
Real m_b
Definition Bracketing.hh:60
static constexpr bool requires_first_derivative
Definition Bracketing.hh:44
std::string name_impl() const
Definition Bracketing.hh:75
typename ScalarRootFinder< Real, DerivedSolver >::FunctionWrapper FunctionWrapper
Definition Bracketing.hh:50
Real m_mu
Definition Bracketing.hh:56
Real m_fa
Definition Bracketing.hh:59
typename ScalarRootFinder< Real, DerivedSolver >::FirstDerivativeWrapper FirstDerivativeWrapper
Definition Bracketing.hh:51
Real m_e
Definition Bracketing.hh:63
Real m_d
Definition Bracketing.hh:62
Real m_fe
Definition Bracketing.hh:63
ScalarRootFinder()
Definition ScalarRootFinder.hh:66
bool m_verbose
Definition Solver.hh:93
bool m_converged
Definition Solver.hh:99
InputType m_upper_bound
Definition Solver.hh:72
void header()
Definition Solver.hh:799
void reset()
Definition Solver.hh:693
InputType m_lower_bound
Definition Solver.hh:71
void bottom()
Definition Solver.hh:829
void evaluate_function(FunctionWrapper function, const InputType &x, OutputType &out)
Definition Solver.hh:710
Namespace for the Optimist library.
Definition Optimist.hh:87