Defines a type capable of encapsulating an equation of N variables.
Executes the routine containing the function to evaluate.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(fcnnvar_helper), | intent(in) | :: | this |
The fcnnvar_helper object. |
||
| real(kind=real64), | intent(in), | dimension(:) | :: | x |
The value of the independent variables at which the function should be evaluated. |
The value of the function.
Gets the number of variables in this system.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(fcnnvar_helper), | intent(in) | :: | this |
The fcnnvar_helper object. |
The number of variables.
Computes the gradient of the function.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(fcnnvar_helper), | intent(in) | :: | this |
The fcnnvar_helper object. |
||
| real(kind=real64), | intent(inout), | dimension(:) | :: | x |
An N-element array containing the independent variables defining the point about which the derivatives will be calculated. This array is restored upon output. |
|
| real(kind=real64), | intent(out), | dimension(:) | :: | g |
An N-element array where the gradient will be written upon output. |
|
| real(kind=real64), | intent(in), | optional | :: | fv |
An optional input providing the function value at x. |
|
| integer(kind=int32), | intent(out), | optional | :: | err |
An optional integer output that can be used to determine error status. If not used, and an error is encountered, the routine simply returns silently. If used, the following error codes identify error status:
|
Tests if the pointer to the function has been assigned.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(fcnnvar_helper), | intent(in) | :: | this |
The fcnnvar_helper object. |
Returns true if the pointer has been assigned; else, false.
Tests if the pointer to the routine containing the gradient has been assigned.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(fcnnvar_helper), | intent(in) | :: | this |
The fcnnvar_helper object. |
Returns true if the pointer has been assigned; else, false.
Establishes a pointer to the routine containing the function.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(fcnnvar_helper), | intent(inout) | :: | this |
The fcnnvar_helper object. |
||
| procedure(fcnnvar), | intent(in), | pointer | :: | fcn |
The function pointer. |
|
| integer(kind=int32), | intent(in) | :: | nvar |
The number of variables in the function. |
Establishes a pointer to the routine containing the gradient vector of the function.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(fcnnvar_helper), | intent(inout) | :: | this |
The fcnnvar_helper object. |
||
| procedure(gradientfcn), | intent(in), | pointer | :: | fcn |
The pointer to the gradient routine. |