Class implementing the Broyden method to solve a system of non-linear equations.
More...
#include <Broyden.h>
|
static const double | TOL = 1.0E-10 |
| Default desired solution accuracy. More...
|
|
static const int | MAX_ITERS = 200 |
| Maximum number of Broyden iterations before terminating. More...
|
|
Class implementing the Broyden method to solve a system of non-linear equations.
Definition at line 131 of file Broyden.h.
Construct a new Broyden object.
- Parameters
-
eqs | A pointer to BroydenEquations object which specifies the equations to be solved. |
jaco | A pointer to BroydenJacobian object which calulates the Jacobian matrix. If nullptr is passed then the Jacobian will be computed using finite differences. |
Definition at line 197 of file Broyden.h.
virtual thermalfist::Broyden::~Broyden |
( |
void |
| ) |
|
|
inlinevirtual |
int thermalfist::Broyden::Iterations |
( |
| ) |
const |
|
inline |
Returns number of Broyden/Newton iterations used to obtain the solution. Only meaningful to call this after the Solve() method was called. If Iterations() equals MaxIterations(), then the convergence was not achieved.
- Returns
- Number of Broyden/Newton iterations.
Definition at line 229 of file Broyden.h.
double thermalfist::Broyden::MaxDifference |
( |
| ) |
const |
|
inline |
- Returns
- Maximum deviation from zero of any of the equations.
Definition at line 239 of file Broyden.h.
int thermalfist::Broyden::MaxIterations |
( |
| ) |
const |
|
inline |
- Returns
- Maximum number of Broyden/Newton iterations.
Definition at line 234 of file Broyden.h.
void thermalfist::Broyden::UseNewton |
( |
bool |
flag | ) |
|
|
inline |
Specify whether to use Newton's method instead of the Broyden's method. In the Newton's method the Jacobian will be re-evaluated from scrath at each iteration.
- Parameters
-
flag | Use Newton's method if true, use Broyden's method otherwise. |
Definition at line 249 of file Broyden.h.
bool thermalfist::Broyden::UseNewton |
( |
| ) |
const |
|
inline |
- Returns
- true Newton's method is to be used
-
false Broyden's method is to be used
Definition at line 255 of file Broyden.h.
int thermalfist::Broyden::m_Iterations |
|
protected |
double thermalfist::Broyden::m_MaxDifference |
|
protected |
int thermalfist::Broyden::m_MaxIterations |
|
protected |
bool thermalfist::Broyden::m_UseNewton |
|
protected |
const int thermalfist::Broyden::MAX_ITERS = 200 |
|
static |
Maximum number of Broyden iterations before terminating.
Definition at line 185 of file Broyden.h.
const double thermalfist::Broyden::TOL = 1.0E-10 |
|
static |
Default desired solution accuracy.
Definition at line 183 of file Broyden.h.
The documentation for this class was generated from the following files: