Defines a quasi-Newton solver based upon Broyden's method. The algorithm maintains an approximate Jacobian and updates the iterate from the nonlinear system $F(x)=0$ using with the rank-one Jacobian correction where .
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 number of iterations that may pass before forcing a recalculation of the Jacobian matrix.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(quasi_newton_solver), | intent(in) | :: | this |
The quasi_newton_solver object. |
The number of iterations.
Gets the line search module.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(line_search_solver), | intent(in) | :: | this |
The line_search_solver object. |
||
| class(line_search), | intent(out), | allocatable | :: | ls |
The line_search object. |
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 value determining if a line-search should be employed.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(line_search_solver), | intent(in) | :: | this |
The line_search_solver object. |
Returns true if a line search should be used; else, false.
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.
Tests to see if a line search module is defined.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(line_search_solver), | intent(in) | :: | this |
The line_search_solver object. |
Returns true if a module is defined; else, false.
Establishes a default line_search object for the line search module.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(line_search_solver), | intent(inout) | :: | this |
The line_search_solver object. |
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 number of iterations that may pass before forcing a recalculation of the Jacobian matrix.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(quasi_newton_solver), | intent(inout) | :: | this |
The quasi_newton_solver object. |
||
| integer(kind=int32), | intent(in) | :: | n |
The number of iterations. |
Sets the line search module.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(line_search_solver), | intent(inout) | :: | this |
The line_search_solver object. |
||
| class(line_search), | intent(in) | :: | ls |
The line_search object. |
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 value determining if a line-search should be employed.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(line_search_solver), | intent(inout) | :: | this |
The line_search_solver object. |
||
| logical, | intent(in) | :: | x |
Set to true if a line search should be used; else, false. |
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 quasi-Newton's method developed by Broyden in conjunction with a backtracking type line search to solve N equations of N unknowns.
See Also:
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(quasi_newton_solver), | intent(inout) | :: | this |
The quasi_newton_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 N-element array that, on output, will contain the values of each equation as evaluated at the variable values given in x. If the iteration process does not converge, each element is returned as NaN, and, if supplied, ib will indicate a failure to converge. |
|
| type(iteration_behavior), | optional | :: | ib |
An optional output, that if provided, allows the caller to obtain iteration performance statistics. |
||
| class(*), | intent(inout), | optional | :: | args |
An optional argument to allow the user to communicate with fcn. |