mango_mod::vector_function_interface Interface Reference

Format for the user-supplied subroutine that computes the residuals for a least-squares optimization problem. More...

Public Member Functions

subroutine vector_function_interface (N_parameters, state_vector, N_terms, residuals, failed, problem, user_data)
 

Detailed Description

Format for the user-supplied subroutine that computes the residuals for a least-squares optimization problem.

Parameters
N_parametersThe number of independent variables, i.e. the dimension of the search space.
state_vectorAn array of size N_parameters containing the values of the indpendent variables.
N_termsThe number of least-squares terms that are summed in the total objective function, i.e. the number of residuals.
residualsAn array of size N_terms which must be set to the residuals, denoted \( R_j \) on Core Concepts.
failedSet 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.
problemA pointer to the class representing this optimization problem. This pointer can be useful for getting information about the MPI communicators.
user_dataPointer to user-supplied data, which can be set by mango_set_user_data().

Definition at line 336 of file mango.F90.

Constructor & Destructor Documentation

◆ 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 
)

Definition at line 337 of file mango.F90.


The documentation for this interface was generated from the following file: