Objective function for a line search in an N-D space
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | derivativeOrder | = | 2 | Order of finite difference approximations |
|
| real(kind=wp), | public | :: | stepSize | = | 1.0E-3_wp | Step size for finite differences |
|
| class(objN_t), | public, | allocatable | :: | parent | N-D objective function |
||
| real(kind=wp), | public, | dimension(:), allocatable | :: | x0 | Base point in N-space along the line |
||
| real(kind=wp), | public, | dimension(:), allocatable | :: | n0 | Direction in N-space |
Constructors for lineSearch_t
Constructor for lineSearch_t
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(objN_t), | intent(in) | :: | obj | Parent N-D objective function |
||
| real(kind=wp), | intent(in), | dimension(:) | :: | x | Point along line |
New lineSearch_t
Compute the first derivative using finite differences
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(obj_t), | intent(in) | :: | self | Function to differentiate |
||
| real(kind=wp), | intent(in) | :: | x | Evaluation point |
First derivative
Compute the second derivative using finite differences
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(obj_t), | intent(in) | :: | self | Function to differentiate |
||
| real(kind=wp), | intent(in) | :: | x | Evaluation point |
Second derivative
Find the root of a 1-D function using Newton's method
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(obj_t), | intent(in) | :: | self | Function for root finding |
||
| real(kind=wp), | intent(in) | :: | x0 | Initial guess |
||
| real(kind=wp), | intent(in), | optional | :: | tol | Tolerance |
|
| integer, | intent(in), | optional | :: | maxIts | Maximum iterations |
Location of root
Find the minimum of a 1-D function using Newton's method
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(obj_t), | intent(in) | :: | self | Function for minimization |
||
| real(kind=wp), | intent(in) | :: | x0 | Intial guess |
||
| real(kind=wp), | intent(in), | optional | :: | tol | Tolerance |
|
| integer, | intent(in), | optional | :: | maxIts | Maximum iterations |
Location of minimum
Convert a local 1-D x into the parent's N-space
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(lineSearch_t), | intent(in) | :: | self | Line search space |
||
| real(kind=wp), | intent(in) | :: | x | Local location \(x\) |
Parent location \(\vec{x}\)
Evaluate the parent function at a local \(x\)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(lineSearch_t), | intent(in) | :: | self | Line search space |
||
| real(kind=wp), | intent(in) | :: | x | Local location |
Parent result