Format for the user-supplied subroutine that computes the residuals for a least-squares optimization problem.
More...
Format for the user-supplied subroutine that computes the residuals for a least-squares optimization problem.
- Parameters
-
N_parameters | The number of independent variables, i.e. the dimension of the search space. |
state_vector | An array of size N_parameters containing the values of the indpendent variables. |
N_terms | The number of least-squares terms that are summed in the total objective function, i.e. the number of residuals. |
residuals | An array of size N_terms which must be set to the residuals, denoted \( R_j \) on Core Concepts. |
failed | Set the value pointed to by this variable to 1 if the calculation of the residuals fails for some reason. Otherwise the value should be 0. |
problem | A pointer to the class representing this optimization problem. This pointer can be useful for getting information about the MPI communicators. |
user_data | Pointer to user-supplied data, which can be set by mango_set_user_data(). |
Definition at line 336 of file mango.F90.
◆ vector_function_interface()
subroutine mango_mod::vector_function_interface::vector_function_interface |
( |
integer(c_int), intent(in) |
N_parameters, |
|
|
real(c_double), dimension(n_parameters), intent(in) |
state_vector, |
|
|
integer(c_int), intent(in) |
N_terms, |
|
|
real(c_double), dimension(n_terms), intent(out) |
residuals, |
|
|
integer(c_int), intent(out) |
failed, |
|
|
type(mango_problem), intent(in), value |
problem, |
|
|
type(c_ptr), intent(in), value |
user_data |
|
) |
| |
The documentation for this interface was generated from the following file:
- /home/runner/work/mango/mango/src/api/mango.F90