62 virtual std::vector<double>
Equations(
const std::vector<double> &x) = 0;
81 static const double EPS;
106 virtual std::vector<double> Jacobian(
const std::vector<double> &x);
114 void SetDx(
double dx) { m_dx = dx; }
172 virtual bool IsSolved(
const std::vector<double>& x,
const std::vector<double>& f,
const std::vector<double>& xdelta = std::vector<double>())
const;
217 virtual std::vector<double> Solve(
const std::vector<double> &x0,
BroydenSolutionCriterium *solcrit = NULL,
int max_iterations = MAX_ITERS);
static const double TOL
Default desired solution accuracy.
Class implementing the Broyden method to solve a system of non-linear equations.
virtual ~Broyden(void)
Destroy the Broyden object.
virtual ~BroydenEquations(void)
Destructor.
int m_N
The number of equations.
virtual std::vector< double > Equations(const std::vector< double > &x)=0
void SetDimension(int dim)
BroydenEquations(void)
Default constructor. Does nothing.
Abstract class which defines the system of non-linear equations to be solved by the Broyden's method...
void UseNewton(bool flag)
int MaxIterations() const
Broyden(BroydenEquations *eqs=NULL, BroydenJacobian *jaco=NULL)
Construct a new Broyden object.
Sub-class where it is determined whether the required accuracy is achieved in the Broyden's method...
BroydenSolutionCriterium(double maximum_error=TOL)
double MaxDifference() const
void SetDx(double dx)
Set the finite variable difference value used for calculating the Jacobian numerically.
Class which implements calculation of the Jacobian needed for the Broyden's method.
BroydenEquations * m_Equations
virtual ~BroydenSolutionCriterium()
Destroy the BroydenSolutionCriterium object.
BroydenJacobian * m_Jacobian
virtual int Dimension() const
Number of equations.
The main namespace where all classes and functions of the Thermal-FIST library reside.
virtual ~BroydenJacobian(void)
Destructor.
BroydenJacobian(BroydenEquations *eqs=NULL)
Construct a new BroydenJacobian object.
static const int MAX_ITERS
Maximum number of Broyden iterations before terminating.