interface.cpp File Reference
#include <iostream>
#include <stdexcept>
#include "mango.hpp"

Go to the source code of this file.

Macros

#define mango_interface_string_length   256
 

Functions

mango::Problemmango_problem_create (int *N_parameters, double *state_vector, mango::objective_function_type objective_function)
 
mango::Least_squares_problemmango_problem_create_least_squares (int *N_parameters, double *state_vector, int *N_terms, double *targets, double *sigmas, double *best_residual_function, mango::vector_function_type residual_function)
 
void mango_problem_destroy (mango::Problem *This)
 
void mango_set_algorithm (mango::Problem *This, mango::algorithm_type *algorithm)
 
void mango_set_algorithm_from_string (mango::Problem *This, char algorithm_name[mango_interface_string_length])
 
void mango_read_input_file (mango::Problem *This, char filename[mango_interface_string_length])
 
void mango_set_output_filename (mango::Problem *This, char filename[mango_interface_string_length])
 
void mango_mpi_init (mango::Problem *This, MPI_Fint *comm)
 
void mango_mpi_partition_set_custom (mango::Problem *This, MPI_Fint *comm_world, MPI_Fint *comm_group_leaders, MPI_Fint *comm_worker_groups)
 
void mango_set_N_worker_groups (mango::Problem *This, int *N_worker_groups)
 
int mango_get_N_worker_groups (mango::Problem *This)
 
double mango_optimize (mango::Problem *This)
 
int mango_get_mpi_rank_world (mango::Problem *This)
 
int mango_get_mpi_rank_worker_groups (mango::Problem *This)
 
int mango_get_mpi_rank_group_leaders (mango::Problem *This)
 
int mango_get_N_procs_world (mango::Problem *This)
 
int mango_get_N_procs_worker_groups (mango::Problem *This)
 
int mango_get_N_procs_group_leaders (mango::Problem *This)
 
int mango_get_proc0_world (mango::Problem *This)
 
int mango_get_proc0_worker_groups (mango::Problem *This)
 
int mango_get_mpi_comm_world (mango::Problem *This)
 
int mango_get_mpi_comm_worker_groups (mango::Problem *This)
 
int mango_get_mpi_comm_group_leaders (mango::Problem *This)
 
int mango_get_N_parameters (mango::Problem *This)
 
int mango_get_N_terms (mango::Least_squares_problem *This)
 
int mango_get_worker_group (mango::Problem *This)
 
int mango_get_best_function_evaluation (mango::Problem *This)
 
int mango_get_function_evaluations (mango::Problem *This)
 
void mango_set_max_function_evaluations (mango::Problem *This, int *N)
 
void mango_set_centered_differences (mango::Problem *This, int *centered_differences_int)
 
int mango_does_algorithm_exist (char algorithm_name[mango_interface_string_length])
 
void mango_set_finite_difference_step_size (mango::Problem *This, double *step)
 
void mango_set_bound_constraints (mango::Problem *This, double *lower_bounds, double *upper_bounds)
 
void mango_set_verbose (mango::Problem *This, int *verbose)
 
void mango_set_print_residuals_in_output_file (mango::Least_squares_problem *This, int *print_residuals_in_output_file_int)
 
void mango_set_user_data (mango::Problem *This, void *user_data)
 
void mango_stop_workers (mango::Problem *This)
 
void mango_mobilize_workers (mango::Problem *This)
 
int mango_continue_worker_loop (mango::Problem *This)
 
void mango_mpi_partition_write (mango::Problem *This, char filename[mango_interface_string_length])
 
void mango_set_relative_bound_constraints (mango::Problem *This, double *min_factor, double *max_factor, double *min_radius, int *preserve_sign)
 
void mango_set_N_line_search (mango::Problem *This, int *N)
 

Macro Definition Documentation

◆ mango_interface_string_length

#define mango_interface_string_length   256

Definition at line 26 of file interface.cpp.

Function Documentation

◆ mango_continue_worker_loop()

int mango_continue_worker_loop ( mango::Problem This)

Definition at line 230 of file interface.cpp.

◆ mango_does_algorithm_exist()

int mango_does_algorithm_exist ( char  algorithm_name[mango_interface_string_length])

Definition at line 190 of file interface.cpp.

◆ mango_get_best_function_evaluation()

int mango_get_best_function_evaluation ( mango::Problem This)

Definition at line 168 of file interface.cpp.

◆ mango_get_function_evaluations()

int mango_get_function_evaluations ( mango::Problem This)

Definition at line 172 of file interface.cpp.

◆ mango_get_mpi_comm_group_leaders()

int mango_get_mpi_comm_group_leaders ( mango::Problem This)

Definition at line 152 of file interface.cpp.

◆ mango_get_mpi_comm_worker_groups()

int mango_get_mpi_comm_worker_groups ( mango::Problem This)

Definition at line 148 of file interface.cpp.

◆ mango_get_mpi_comm_world()

int mango_get_mpi_comm_world ( mango::Problem This)

Definition at line 144 of file interface.cpp.

◆ mango_get_mpi_rank_group_leaders()

int mango_get_mpi_rank_group_leaders ( mango::Problem This)

Definition at line 120 of file interface.cpp.

◆ mango_get_mpi_rank_worker_groups()

int mango_get_mpi_rank_worker_groups ( mango::Problem This)

Definition at line 116 of file interface.cpp.

◆ mango_get_mpi_rank_world()

int mango_get_mpi_rank_world ( mango::Problem This)

Definition at line 112 of file interface.cpp.

◆ mango_get_N_parameters()

int mango_get_N_parameters ( mango::Problem This)

Definition at line 156 of file interface.cpp.

◆ mango_get_N_procs_group_leaders()

int mango_get_N_procs_group_leaders ( mango::Problem This)

Definition at line 132 of file interface.cpp.

◆ mango_get_N_procs_worker_groups()

int mango_get_N_procs_worker_groups ( mango::Problem This)

Definition at line 128 of file interface.cpp.

◆ mango_get_N_procs_world()

int mango_get_N_procs_world ( mango::Problem This)

Definition at line 124 of file interface.cpp.

◆ mango_get_N_terms()

int mango_get_N_terms ( mango::Least_squares_problem This)

Definition at line 160 of file interface.cpp.

◆ mango_get_N_worker_groups()

int mango_get_N_worker_groups ( mango::Problem This)

Definition at line 104 of file interface.cpp.

◆ mango_get_proc0_worker_groups()

int mango_get_proc0_worker_groups ( mango::Problem This)

Definition at line 140 of file interface.cpp.

◆ mango_get_proc0_world()

int mango_get_proc0_world ( mango::Problem This)

Definition at line 136 of file interface.cpp.

◆ mango_get_worker_group()

int mango_get_worker_group ( mango::Problem This)

Definition at line 164 of file interface.cpp.

◆ mango_mobilize_workers()

void mango_mobilize_workers ( mango::Problem This)

Definition at line 226 of file interface.cpp.

◆ mango_mpi_init()

void mango_mpi_init ( mango::Problem This,
MPI_Fint *  comm 
)

Definition at line 92 of file interface.cpp.

◆ mango_mpi_partition_set_custom()

void mango_mpi_partition_set_custom ( mango::Problem This,
MPI_Fint *  comm_world,
MPI_Fint *  comm_group_leaders,
MPI_Fint *  comm_worker_groups 
)

Definition at line 96 of file interface.cpp.

◆ mango_mpi_partition_write()

void mango_mpi_partition_write ( mango::Problem This,
char  filename[mango_interface_string_length] 
)

Definition at line 235 of file interface.cpp.

◆ mango_optimize()

double mango_optimize ( mango::Problem This)

Definition at line 108 of file interface.cpp.

◆ mango_problem_create()

mango::Problem* mango_problem_create ( int *  N_parameters,
double *  state_vector,
mango::objective_function_type  objective_function 
)

Definition at line 43 of file interface.cpp.

◆ mango_problem_create_least_squares()

mango::Least_squares_problem* mango_problem_create_least_squares ( int *  N_parameters,
double *  state_vector,
int *  N_terms,
double *  targets,
double *  sigmas,
double *  best_residual_function,
mango::vector_function_type  residual_function 
)

Definition at line 64 of file interface.cpp.

◆ mango_problem_destroy()

void mango_problem_destroy ( mango::Problem This)

Definition at line 70 of file interface.cpp.

◆ mango_read_input_file()

void mango_read_input_file ( mango::Problem This,
char  filename[mango_interface_string_length] 
)

Definition at line 82 of file interface.cpp.

◆ mango_set_algorithm()

void mango_set_algorithm ( mango::Problem This,
mango::algorithm_type algorithm 
)

Definition at line 74 of file interface.cpp.

◆ mango_set_algorithm_from_string()

void mango_set_algorithm_from_string ( mango::Problem This,
char  algorithm_name[mango_interface_string_length] 
)

Definition at line 78 of file interface.cpp.

◆ mango_set_bound_constraints()

void mango_set_bound_constraints ( mango::Problem This,
double *  lower_bounds,
double *  upper_bounds 
)

Definition at line 200 of file interface.cpp.

◆ mango_set_centered_differences()

void mango_set_centered_differences ( mango::Problem This,
int *  centered_differences_int 
)

Definition at line 180 of file interface.cpp.

◆ mango_set_finite_difference_step_size()

void mango_set_finite_difference_step_size ( mango::Problem This,
double *  step 
)

Definition at line 196 of file interface.cpp.

◆ mango_set_max_function_evaluations()

void mango_set_max_function_evaluations ( mango::Problem This,
int *  N 
)

Definition at line 176 of file interface.cpp.

◆ mango_set_N_line_search()

void mango_set_N_line_search ( mango::Problem This,
int *  N 
)

Definition at line 244 of file interface.cpp.

◆ mango_set_N_worker_groups()

void mango_set_N_worker_groups ( mango::Problem This,
int *  N_worker_groups 
)

Definition at line 100 of file interface.cpp.

◆ mango_set_output_filename()

void mango_set_output_filename ( mango::Problem This,
char  filename[mango_interface_string_length] 
)

Definition at line 86 of file interface.cpp.

◆ mango_set_print_residuals_in_output_file()

void mango_set_print_residuals_in_output_file ( mango::Least_squares_problem This,
int *  print_residuals_in_output_file_int 
)

Definition at line 208 of file interface.cpp.

◆ mango_set_relative_bound_constraints()

void mango_set_relative_bound_constraints ( mango::Problem This,
double *  min_factor,
double *  max_factor,
double *  min_radius,
int *  preserve_sign 
)

Definition at line 239 of file interface.cpp.

◆ mango_set_user_data()

void mango_set_user_data ( mango::Problem This,
void *  user_data 
)

Definition at line 218 of file interface.cpp.

◆ mango_set_verbose()

void mango_set_verbose ( mango::Problem This,
int *  verbose 
)

Definition at line 204 of file interface.cpp.

◆ mango_stop_workers()

void mango_stop_workers ( mango::Problem This)

Definition at line 222 of file interface.cpp.