Class RootFinder

Inheritance Relationships

Base Type

  • public refCount

Derived Types

Class Documentation

class RootFinder : public refCount

Base abstract class for finding roots of non-linear algebraic equations.

In the context of wall modelling the latter are provided by laws of the wall. The root finders are therefore used in conjuction with the LOTW wall model

Contributors/Copyright: 2016-2018 Timofey Mukha 2017 Saleh Rezaeiravesh

Subclassed by BisectionRootFinder, NewtonRootFinder

Public Functions

inline RootFinder(const word &rootFinderName, std::function<scalar(scalar)> f, std::function<scalar(scalar)> d, const scalar eps, const label maxIter)
inline RootFinder(std::function<scalar(scalar)> f, std::function<scalar(scalar)> d, const dictionary &dict)
inline RootFinder(const dictionary &dict)
inline RootFinder(const RootFinder &orig)
virtual autoPtr<RootFinder> clone() const = 0
inline virtual ~RootFinder()
virtual scalar root(scalar) const = 0
inline void setFunction(std::function<scalar(scalar)> f)
inline virtual void setDerivative(std::function<scalar(scalar)> d)
inline scalar eps() const
inline label maxIter() const
inline std::function<scalar(scalar)> f() const
inline std::function<scalar(scalar)> d() const
inline scalar f(scalar v) const
inline scalar d(scalar v) const
virtual void write(Foam::Ostream &os) const

Public Static Functions

static autoPtr<RootFinder> New(const word &rootFinderName, std::function<scalar(scalar)> f, std::function<scalar(scalar)> d, const scalar eps, const label maxIter)
static autoPtr<RootFinder> New(std::function<scalar(scalar)> f, std::function<scalar(scalar)> d, const dictionary &dict)
static autoPtr<RootFinder> New(const dictionary &dict)

Protected Attributes

std::function<scalar(scalar)> f_ = [](scalar i) { return 0; }
std::function<scalar(scalar)> d_ = [](scalar i) { return 0; }
const scalar eps_
const label maxIter_