libode
Easy to compile, fast ODE integrators as C++ classes
|
Newton's method for nonlinear systems of equations. More...
#include <ode_newton.h>
Public Member Functions | |
OdeNewton (unsigned long n) | |
constructs | |
virtual | ~OdeNewton () |
destructs | |
unsigned long | get_n () |
gets the size of the system | |
double | get_tol_Newton () |
gets the L infinity tolerance | |
unsigned long | get_iter_Newton () |
gets iteration counter | |
int | get_iJLU () |
gets the LU decomposition interval | |
unsigned long | get_nJLU () |
gets the LU decomposition counter | |
unsigned long | get_n_solve_LU () |
gets the LU solve counter | |
bool | get_modified () |
gets whether modified Newtion's is being used | |
bool | get_ignore_JLU () |
gets whether no LU decompositions should be done | |
void | set_tol_Newton (double tol_Newton) |
sets the L infinity tolerance | |
void | set_iter_Newton (unsigned long iter_Newton) |
sets the iteration counter | |
void | set_iJLU (int iJLU) |
sets the LU decomposition interval | |
void | set_modified (bool modified) |
sets whether modified Newtion's is being used | |
void | set_ignore_JLU (bool ignore_JLU) |
sets whether no LU decompositions should be done | |
int | solve_Newton (double *x) |
Solve the system of equations. | |
Protected Member Functions | |
virtual void | f_Newton (double *x, double *f)=0 |
evaluates the function being zeroed | |
virtual void | J_Newton (double *x, double **J)=0 |
evaluates the Jacobian matrix of the function being zeroed | |
Newton's method for nonlinear systems of equations.
This class implements Newton's method for nonlinear systems of equations. The virtual functions F_Newton and Jac_Newton allow a derived class to implement the system of equations and its Jacobian matrix.
Definition at line 18 of file ode_newton.h.
ode::OdeNewton::OdeNewton | ( | unsigned long | n | ) |
|
virtual |
destructs
Definition at line 38 of file ode_newton.cc.
|
protectedpure virtual |
evaluates the function being zeroed
[in] | x | current values of system |
[out] | f | evaluated system of equation |
|
inline |
gets whether no LU decompositions should be done
Definition at line 47 of file ode_newton.h.
|
inline |
gets the LU decomposition interval
Definition at line 39 of file ode_newton.h.
|
inline |
gets iteration counter
Definition at line 37 of file ode_newton.h.
|
inline |
gets whether modified Newtion's is being used
Definition at line 45 of file ode_newton.h.
|
inline |
gets the size of the system
Definition at line 33 of file ode_newton.h.
|
inline |
gets the LU solve counter
Definition at line 43 of file ode_newton.h.
|
inline |
gets the LU decomposition counter
Definition at line 41 of file ode_newton.h.
|
inline |
gets the L infinity tolerance
Definition at line 35 of file ode_newton.h.
|
protectedpure virtual |
evaluates the Jacobian matrix of the function being zeroed
[in] | x | current values of system |
[out] | J | evaluated Jacobian of the system |
|
inline |
sets whether no LU decompositions should be done
Definition at line 58 of file ode_newton.h.
|
inline |
sets the LU decomposition interval
Definition at line 54 of file ode_newton.h.
|
inline |
sets the iteration counter
Definition at line 52 of file ode_newton.h.
|
inline |
sets whether modified Newtion's is being used
Definition at line 56 of file ode_newton.h.
|
inline |
sets the L infinity tolerance
Definition at line 50 of file ode_newton.h.
int ode::OdeNewton::solve_Newton | ( | double * | x | ) |
Solve the system of equations.
Solve for a root of the function f_Newton using the jacobian J_Newton, both of which must be implemented in derived classes
x | initial guess for the root and final value at root |
Definition at line 84 of file ode_newton.cc.