YANE-Framework 1.1.0
Public Member Functions | Protected Attributes | Static Protected Attributes

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:
dimensionDimension of the nonlinear equation problem
functionPointer of the function to be analyzed
jacobianPointer of the Jacobian of the function to be analyzed
analytic_jacobiandecision variable if Jacobian is supplied.
rparVector of real valued parameters
iparVector of integer valued parameters
solverPointer 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:
dimensionDimension of the nonlinear equation problem
functionPointer of the function to be analyzed
jacobianlargescalePointer of the Jacobian of the function to be analyzed
analytic_jacobiandecision variable if Jacobian is supplied.
rparVector of real valued parameters
iparVector of integer valued parameters
solverPointer 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:
diffepsDisturbance for numerical differentiation
LIB_EXPORT void yane::EqSys::Newton::setEps ( double  eps)

Function to set the accuracy of the nonlinear equation solver

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

Function to set the vector of integer parameters

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

Function to set the maximal number of iterations

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

Function to set the vector of real valued parameters

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

Function to solve the nonlinear equation problem

Parameters:
xEvaluation vector

Implements yane::EqSys::NonlinearEquations.