Multidimensional root-finding using Broyden's method (GSL) More...
#include <mroot_broyden.h>
Public Types | |
typedef boost::numeric::ublas::vector< double > | ubvector |
typedef boost::numeric::ublas::matrix< double > | ubmatrix |
typedef boost::numeric::ublas::matrix_column< ubmatrix > | ubmatrix_column |
Public Member Functions | |
void | allocate (size_t n) |
Allocate memory. | |
double | enorm (size_t nvar, const vec_t &ff) |
Euclidean norm. | |
void | set (func_t &func, size_t nvar, vec_t &x, vec_t &f, vec_t &dx) |
Set the function, initial guess, and provide vectors to store function values and stepsize. More... | |
int | iterate () |
Perform an iteration. | |
virtual int | msolve (size_t n, vec_t &x, func_t &func) |
Desc. | |
![]() | |
virtual const char * | type () |
Return the type, "mroot" . | |
virtual int | msolve_de (size_t n, vec_t &x, func_t &func, jfunc_t &dfunc) |
Solve func with derivatives dfunc using x as an initial guess, returning x . More... | |
template<class vec2_t , class vec3_t > | |
int | print_iter (size_t n, const vec2_t &x, const vec3_t &y, int iter, double value=0.0, double limit=0.0, std::string comment="") |
Print out iteration information. More... | |
Public Attributes | |
jacobian_gsl< func_t, vec_t, mat_t > | def_jac |
Default Jacobian object. | |
![]() | |
double | tol_rel |
The maximum value of the functions for success (default 1.0e-8) | |
double | tol_abs |
The minimum allowable stepsize (default 1.0e-12) | |
int | verbose |
Output control (default 0) | |
int | ntrial |
Maximum number of iterations (default 100) | |
int | last_ntrial |
The number of iterations for in the most recent minimization. | |
bool | err_nonconv |
If true, call the error handler if msolve() or msolve_de() does not converge (default true) | |
Protected Member Functions | |
void | clear () |
Clear allocated vectors and matrices. More... | |
Protected Attributes | |
ubmatrix | H |
Desc. | |
ubmatrix | lu |
LU decomposition. | |
permutation | perm |
Permutation object for the LU decomposition. | |
ubvector | v |
Desc. | |
ubvector | w |
Desc. | |
ubvector | y |
Desc. | |
ubvector | p |
Desc. | |
ubvector | fnew |
Desc. | |
ubvector | x_trial |
Desc. | |
double | phi |
Desc. | |
vec_t | dx_int |
Stepsize vector. | |
vec_t | f_int |
Function value vector. | |
func_t * | user_func |
A pointer to the user-specified function. | |
vec_t * | user_f |
Function values. | |
vec_t * | user_x |
Initial guess and current solution. | |
vec_t * | user_dx |
Initial and current step. | |
size_t | user_nvar |
Number of variables. | |
size_t | mem_size |
Size of memory allocated. | |
jacobian< func_t, vec_t, mat_t > * | ajac |
Jacobian. | |
Private Member Functions | |
mroot_broyden (const mroot_broyden< func_t, vec_t, mat_t, jfunc_t > &) | |
mroot_broyden< func_t, vec_t, mat_t, jfunc_t > & | operator= (const mroot_broyden< func_t, vec_t, mat_t, jfunc_t > &) |
Experimental.
See Broyden65.
Definition at line 54 of file mroot_broyden.h.
|
inlineprotected |
This function is called by set() before each solve.
Definition at line 125 of file mroot_broyden.h.
|
inline |
The initial values of f
and dx
are ignored.
Definition at line 204 of file mroot_broyden.h.
Documentation generated with Doxygen. Provided under the
GNU Free Documentation License (see License Information).