Class BisectionRootFinder
Defined in File BisectionRootFinder.H
Inheritance Relationships
Base Type
public RootFinder
(Class RootFinder)
Class Documentation
-
class BisectionRootFinder : public RootFinder
Root finder based on the bisection method.
Controlled by three paramters: the max number of iterations, the relative error tolerance and the bracket. The latter is used to define the initial size of the search interval in conjuction with an initial guess of the root value. If x0 is the guess then the search interval is from x0/bracket to bracket*x0.
The bisection method is meant to be used with equations where the Jacobian is not well defined. Currently, however, it appears to be problematic to get a good initial interval size in the beginning of the simulation.
Usage
RootFinder { type Bisection; maxIter value; (default 10) eps value; (default 0.01) bracket value; (default 3) }
Contributors/Copyright: 2016-2018 Timofey Mukha 2017 Saleh Rezaeiravesh
- Source files
Public Functions
-
BisectionRootFinder(const word &rootFinderName, std::function<scalar(scalar)>, std::function<scalar(scalar)>, const scalar eps, const label maxIter)
-
BisectionRootFinder(std::function<scalar(scalar)>, std::function<scalar(scalar)>, const dictionary &dict)
-
BisectionRootFinder(const dictionary &dict)
-
BisectionRootFinder(const BisectionRootFinder&) = default
-
inline virtual autoPtr<RootFinder> clone() const
-
inline virtual ~BisectionRootFinder()
-
inline scalar bracket() const
-
virtual scalar root(scalar guess) const
-
inline virtual void write(Ostream &os) const