Class mroot_broyden (o2scl)

O2scl : Class List

template<class func_t = mm_funct, class vec_t = boost::numeric::ublas::vector<double>, class mat_t = boost::numeric::ublas::matrix<double>, class jfunc_t = jac_funct>
class mroot_broyden : public o2scl::mroot<mm_funct, boost::numeric::ublas::vector<double>, jac_funct>

Multidimensional root-finding using Broyden’s method (GSL)

Experimental.

Based on [Broyden65].

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 Functions

inline mroot_broyden()
inline virtual ~mroot_broyden()
inline void allocate(size_t n)

Allocate memory.

inline double enorm(size_t nvar, const vec_t &ff)

Euclidean norm.

inline 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.

The initial values of f and dx are ignored.

inline int iterate()

Perform an iteration.

inline virtual int msolve(size_t n, vec_t &x, func_t &func)

Desc.

Public Members

jacobian_gsl<func_t, vec_t, mat_t> def_jac

Default Jacobian object.

Protected Functions

inline void clear()

Clear allocated vectors and matrices.

This function is called by set() before each solve.

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 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>&)