mango_mod::objective_function_interface Interface Reference

Format for the user-supplied subroutine that computes the objective function for a general (non least-squares) optimization problem. More...

Public Member Functions

subroutine objective_function_interface (N_parameters, state_vector, objective_value, failed, problem, user_data)
 

Detailed Description

Format for the user-supplied subroutine that computes the objective function for a general (non 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.
objective_valueThe subroutine must set this variable to the value of the objective function.
failedSet the value pointed to by this variable to 1 if the calculation of the objective function 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 314 of file mango.F90.

Constructor & Destructor Documentation

◆ objective_function_interface()

subroutine mango_mod::objective_function_interface::objective_function_interface ( integer(c_int), intent(in)  N_parameters,
real(c_double), dimension(n_parameters), intent(in)  state_vector,
real(c_double), intent(out)  objective_value,
integer(c_int), intent(out)  failed,
type(mango_problem), intent(in), value  problem,
type(c_ptr), intent(in), value  user_data 
)

Definition at line 315 of file mango.F90.


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