@brief Defines a Levenberg-Marquardt based solver for unconstrained least-squares problems. Defines a Levenberg-Marquardt based solver for unconstrained least-squares problems.
Gets the convergence on function value tolerance.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(in) | :: | this |
The equation_solver object. |
The tolerance value.
Gets the convergence on slope of the gradient vector tolerance.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(in) | :: | this |
The equation_solver object. |
The tolerance value.
Gets the maximum number of function evaluations allowed during a single solve.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(in) | :: | this |
The equation_solver object. |
The maximum number of function evaluations.
Gets a logical value determining if iteration status should be printed.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(in) | :: | this |
The equation_solver object. |
True if the iteration status should be printed; else, false.
Gets a factor used to scale the bounds on the initial step.
This factor is used to set the bounds on the initial step such that the initial step is bounded as the product of the factor with the Euclidean norm of the vector resulting from multiplication of the diagonal scaling matrix and the solution estimate. If zero, the factor itself is used.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(least_squares_solver), | intent(in) | :: | this |
The least_squares_solver object. |
The factor.
Gets the convergence on change in variable tolerance.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(in) | :: | this |
The equation_solver object. |
The tolerance value.
Sets the convergence on function value tolerance.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(inout) | :: | this |
The equation_solver object. |
||
| real(kind=real64), | intent(in) | :: | x |
The tolerance value. |
Sets the convergence on slope of the gradient vector tolerance.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(inout) | :: | this |
The equation_solver object. |
||
| real(kind=real64), | intent(in) | :: | x |
The tolerance value. |
Sets the maximum number of function evaluations allowed during a single solve.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(inout) | :: | this |
The equation_solver object. |
||
| integer(kind=int32), | intent(in) | :: | n |
The maximum number of function evaluations. |
Sets a logical value determining if iteration status should be printed.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(inout) | :: | this |
The equation_solver object. |
||
| logical, | intent(in) | :: | x |
True if the iteration status should be printed; else, false. |
Sets a factor used to scale the bounds on the initial step.
This factor is used to set the bounds on the initial step such that the initial step is bounded as the product of the factor with the Euclidean norm of the vector resulting from multiplication of the diagonal scaling matrix and the solution estimate. If zero, the factor itself is used.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(least_squares_solver), | intent(inout) | :: | this |
The least_squares_solver object. |
||
| real(kind=real64), | intent(in) | :: | x |
The factor. |
Sets the convergence on change in variable tolerance.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(inout) | :: | this |
The equation_solver object. |
||
| real(kind=real64), | intent(in) | :: | x |
The tolerance value. |
Applies the Levenberg-Marquardt method to solve the nonlinear least-squares problem. This routines is based upon the MINPACK routine LMDIF.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(least_squares_solver), | intent(inout) | :: | this |
The least_squares_solver object. |
||
| class(vecfcn_helper), | intent(in) | :: | fcn |
The vecfcn_helper object containing the equations to solve. |
||
| real(kind=real64), | intent(inout), | dimension(:) | :: | x |
On input, an N-element array containing an initial estimate to the solution. On output, the updated solution estimate. N is the number of variables. |
|
| real(kind=real64), | intent(out), | dimension(:) | :: | fvec |
An M-element array that, on output, will contain the values of each equation as evaluated at the variable values given in x. |
|
| type(iteration_behavior), | optional | :: | ib |
An optional output, that if provided, allows the caller to obtain iteration performance statistics. |
||
| class(errors), | intent(inout), | optional, | target | :: | err |
An error handling object. |