YANE-Framework 1.1.0

# yane::EqSys::Newton Class Reference

Class for solving nonlinear equation problems using Newton's method.

Inheritance diagram for yane::EqSys::Newton:
[legend]
Collaboration diagram for yane::EqSys::Newton:
[legend]

List of all members.

## Public Member Functions

void initialize (int dimension, yane::EqSys::T_FUNC function, yane::EqSys::T_FUNC jacobian, double *rpar, int *ipar, yane::EqSys::LinearEquations *solver, bool analytic_jacobian=false)
Function to initialize the nonlinear equation problem.
void initializeLargescale (int dimension, yane::EqSys::T_FUNC function, yane::EqSys::T_FUNCMATRIX jacobianlargescale, double *rpar, int *ipar, yane::EqSys::LinearEquations *solver, bool analytic_jacobian=false)
Function to initialize the nonlinear equation problem for largescale problems.
int iterationCounter (void)
Function to get the number of iterations.
Newton (void)
Constructor.
void setDiffeps (double diffeps)
Function to set the disturbance for evaluating the Jacobian of the function to be analyzed numerically.
void setEps (double eps)
Function to set the accuracy of the nonlinear equation solver.
void setIpar (int *ipar)
Function to set the vector of integer parameters.
void setItermax (int itermax)
Function to set the maximal number of iterations.
void setRpar (double *rpar)
Function to set the vector of real valued parameters.
void solve (double *&x)
Function to solve the nonlinear equation problem.
~Newton (void)
Destructor.

## Protected Attributes

int _dimension
Dimension of the solution vector.
double * _functionValue
Array to store the function value.
bool _initialized
Decision variable on initialization status of the linear equation problem.
int * _ipar
Array of integer paramters.
int _iterationcounter
Iteration counter.
int _itermax
Maximum allowable number of iterations.
double * _rpar
Array of double parameters.

## Static Protected Attributes

static const double _bigbound = 1e20
Bound to stop diverging iterations.

## Member Function Documentation

 LIB_EXPORT void yane::EqSys::Newton::initialize ( int dimension, yane::EqSys::T_FUNC function, yane::EqSys::T_FUNC jacobian, double * rpar, int * ipar, yane::EqSys::LinearEquations * solver, bool analytic_jacobian = `false` )

Function to initialize the nonlinear equation problem

Parameters:
 dimension Dimension of the nonlinear equation problem function Pointer of the function to be analyzed jacobian Pointer of the Jacobian of the function to be analyzed analytic_jacobian decision variable if Jacobian is supplied. rpar Vector of real valued parameters ipar Vector of integer valued parameters solver Pointer of linear equation problem solver
 LIB_EXPORT void yane::EqSys::Newton::initializeLargescale ( int dimension, yane::EqSys::T_FUNC function, yane::EqSys::T_FUNCMATRIX jacobianlargescale, double * rpar, int * ipar, yane::EqSys::LinearEquations * solver, bool analytic_jacobian = `false` )

Function to initialize the nonlinear equation problem for largescale problems

Parameters:
 dimension Dimension of the nonlinear equation problem function Pointer of the function to be analyzed jacobianlargescale Pointer of the Jacobian of the function to be analyzed analytic_jacobian decision variable if Jacobian is supplied. rpar Vector of real valued parameters ipar Vector of integer valued parameters solver Pointer of linear equation problem solver
 LIB_EXPORT void yane::EqSys::Newton::setDiffeps ( double diffeps )

Function to set the disturbance for evaluating the Jacobian of the function to be analyzed numerically

Parameters:
 diffeps Disturbance for numerical differentiation
 LIB_EXPORT void yane::EqSys::Newton::setEps ( double eps )

Function to set the accuracy of the nonlinear equation solver

Parameters:
 eps Accuracy
 LIB_EXPORT void yane::EqSys::NonlinearEquations::setIpar ( int * ipar ) ` [inherited]`

Function to set the vector of integer parameters

Parameters:
 ipar Vector of integer parameters
 LIB_EXPORT void yane::EqSys::NonlinearEquations::setItermax ( int itermax ) ` [inherited]`

Function to set the maximal number of iterations

Parameters:
 itermax Maximal number of iterations
 LIB_EXPORT void yane::EqSys::NonlinearEquations::setRpar ( double * rpar ) ` [inherited]`

Function to set the vector of real valued parameters

Parameters:
 rpar Vector of real valued parameters
 LIB_EXPORT void yane::EqSys::Newton::solve ( double *& x ) ` [virtual]`

Function to solve the nonlinear equation problem

Parameters:
 x Evaluation vector

Implements yane::EqSys::NonlinearEquations.