nonlin 1.5.2
A library that provides routines to compute the solutions to systems of nonlinear equations.
|
Defines a Levenberg-Marquardt based solver for unconstrained least-squares problems. More...
Public Member Functions | |
procedure, public | get_step_scaling_factor (this) |
Gets a factor used to scale the bounds on the initial step. | |
procedure, public | set_step_scaling_factor (this, x) |
Sets a factor used to scale the bounds on the initial step. | |
procedure, public | solve (this, fcn, x, fvec, ib, err) |
Solves the system of equations. | |
Public Member Functions inherited from nonlin_core::equation_solver | |
procedure, public | get_max_fcn_evals es_get_max_eval |
Gets the maximum number of function evaluations allowed during a single solve. | |
procedure, public | set_max_fcn_evals es_set_max_eval |
Sets the maximum number of function evaluations allowed during a single solve. | |
procedure, public | get_fcn_tolerance es_get_fcn_tol |
Gets the convergence on function value tolerance. | |
procedure, public | set_fcn_tolerance es_set_fcn_tol |
Sets the convergence on function value tolerance. | |
procedure, public | get_var_tolerance es_get_var_tol |
Gets the convergence on change in variable tolerance. | |
procedure, public | set_var_tolerance es_set_var_tol |
Sets the convergence on change in variable tolerance. | |
procedure, public | get_gradient_tolerance es_get_grad_tol |
Gets the convergence on slope of the gradient vector tolerance. | |
procedure, public | set_gradient_tolerance es_set_grad_tol |
Sets the convergence on slope of the gradient vector tolerance. | |
procedure, public | get_print_status es_get_print_status |
Gets a logical value determining if iteration status should be printed. | |
procedure, public | set_print_status es_set_print_status |
Sets a logical value determining if iteration status should be printed. | |
procedure(nonlin_solver), deferred, pass, public | solve nonlin_solver |
Solves the system of equations. | |
Private Attributes | |
real(real64) | m_factor = 100.0d0 |
Initial step bounding factor. | |
Additional Inherited Members | |
Public Attributes inherited from nonlin_core::equation_solver | |
real(real64) | m_fcntol = 1.0d-8 |
The convergence criteria on function values. | |
real(real64) | m_xtol = 1.0d-12 |
The convergence criteria on change in variable values. | |
real(real64) | m_gtol = 1.0d-12 |
The convergence criteria for the slope of the gradient vector. | |
logical | m_printstatus = .false. |
Set to true to print iteration status; else, false. | |
Defines a Levenberg-Marquardt based solver for unconstrained least-squares problems.
Definition at line 21 of file nonlin_least_squares.f90.
procedure, public nonlin_least_squares::least_squares_solver::get_step_scaling_factor | ( | class(least_squares_solver), intent(in) | this | ) |
Gets a factor used to scale the bounds on the initial step.
[in] | this | The least_squares_solver object. |
Definition at line 27 of file nonlin_least_squares.f90.
procedure, public nonlin_least_squares::least_squares_solver::set_step_scaling_factor | ( | class(least_squares_solver), intent(inout) | this, |
real(real64), intent(in) | x ) |
Sets a factor used to scale the bounds on the initial step.
[in] | this | The least_squares_solver object. |
[in] | x | The factor. Notice, the factor is limited to the interval [0.1, 100]. |
Definition at line 29 of file nonlin_least_squares.f90.
procedure, public nonlin_least_squares::least_squares_solver::solve | ( | class(least_squares_solver), intent(inout) | this, |
class(vecfcn_helper), intent(in) | fcn, | ||
real(real64), dimension(:), intent(inout) | x, | ||
real(real64), dimension(:), intent(out) | fvec, | ||
type(iteration_behavior), optional | ib, | ||
class(errors), intent(inout), optional, target | err ) |
Solves the system of equations.
[in,out] | this | The least_squares_solver object. |
[in] | fcn | The vecfcn_helper object containing the equations to solve. |
[in,out] | x | On input, an M-element array containing an initial estimate to the solution. On output, the updated solution estimate. M is the number of variables. |
[out] | fvec | An N-element array that, on output, will contain the values of each equation as evaluated at the variable values given in x . N is the number of equations. |
[out] | ib | An optional output, that if provided, allows the caller to obtain iteration performance statistics. |
[out] | err | An optional errors-based object that if provided can be used to retrieve information relating to any errors encountered during execution. If not provided, a default implementation of the errors class is used internally to provide error handling. Possible errors and warning messages that may be encountered are as follows.
|
Definition at line 31 of file nonlin_least_squares.f90.
|
private |
Initial step bounding factor.
Definition at line 24 of file nonlin_least_squares.f90.