Defines a solver based upon Newtons's method for solving an equation of one variable. The algorithm uses a bisection method in conjunction with Newton's method in order to keep bounds upon the Newton iterations.
Gets the convergence on slope of the function (derivative) tolerance.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver_1var), | intent(in) | :: | this |
The equation_solver_1var object. |
The tolerance value.
Gets the convergence on function value tolerance.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver_1var), | intent(in) | :: | this |
The equation_solver_1var object. |
The tolerance value.
Gets the maximum number of function evaluations allowed during a single solve.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver_1var), | intent(in) | :: | this |
The equation_solver_1var 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_1var), | intent(in) | :: | this |
The equation_solver_1var object. |
True if the iteration status should be printed; else, false.
Gets the convergence on change in variable tolerance.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver_1var), | intent(in) | :: | this |
The equation_solver_1var object. |
The tolerance value.
Sets the convergence on slope of the function (derivative) tolerance.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver_1var), | intent(inout) | :: | this |
The equation_solver_1var object. |
||
| real(kind=real64), | intent(in) | :: | x |
The tolerance value. |
Sets the convergence on function value tolerance.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver_1var), | intent(inout) | :: | this |
The equation_solver_1var 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_1var), | intent(inout) | :: | this |
The equation_solver_1var 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_1var), | intent(inout) | :: | this |
The equation_solver_1var object. |
||
| logical, | intent(in) | :: | x |
True if the iteration status should be printed; else, false. |
Sets the convergence on change in variable tolerance.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver_1var), | intent(inout) | :: | this |
The equation_solver_1var object. |
||
| real(kind=real64), | intent(in) | :: | x |
The tolerance value. |
Solves an equation of one variable using Newton's method.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(newton_1var_solver), | intent(inout) | :: | this |
The newton_1var_solver object. |
||
| class(fcn1var_helper), | intent(in) | :: | fcn |
The fcn1var_helper object containing the equation to solve. |
||
| real(kind=real64), | intent(inout) | :: | x |
A parameter used to return the solution. Notice, any input value will be ignored as this routine relies upon the search limits in lim to provide a starting point. |
||
| type(value_pair), | intent(in) | :: | lim |
A value_pair object defining the search limits. |
||
| real(kind=real64), | intent(out), | optional | :: | f |
An optional parameter used to return the function residual as computed at 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. |