mango::Solver Class Reference

#include <Solver.hpp>

Inheritance diagram for mango::Solver:
mango::Least_squares_solver

Public Member Functions

 Solver (Problem *, int)
 
 ~Solver ()
 
virtual double optimize (MPI_Partition *)
 
virtual void init_optimization ()
 
virtual void objective_function_wrapper (const double *, double *, bool *)
 
virtual void finite_difference_gradient (const double *, double *, double *)
 
virtual bool record_function_evaluation (const double *, double, bool)
 
virtual void record_function_evaluation_pointer (const double *, double *, bool)
 
void finite_difference_Jacobian (vector_function_type, int, const double *, double *, double *)
 
void evaluate_set_in_parallel (vector_function_type, int, int, double *, double *, bool *)
 

Static Public Member Functions

static void objective_to_vector_function (int *, const double *, int *, double *, int *, mango::Problem *, void *)
 

Public Attributes

algorithm_type algorithm
 
int N_parameters
 
objective_function_type objective_function
 
int function_evaluations
 
int argc
 
char ** argv
 
int max_function_and_gradient_evaluations
 
bool at_least_one_success
 
double * best_state_vector
 
double best_objective_function
 
int best_function_evaluation
 
bool bound_constraints_set
 
double * lower_bounds
 
double * upper_bounds
 
clock_t start_time
 
clock_t best_time
 
Packagepackage
 
double * state_vector
 
bool centered_differences
 
double finite_difference_step_size
 
std::string output_filename
 
int max_function_evaluations
 
int verbose
 
void * user_data
 
MPI_Partitionmpi_partition
 
Problemproblem
 
Recorderrecorder
 
int N_line_search
 

Protected Member Functions

 Solver ()
 
virtual void group_leaders_loop ()
 
virtual void set_package ()
 

Detailed Description

Definition at line 31 of file Solver.hpp.

Constructor & Destructor Documentation

◆ Solver() [1/2]

mango::Solver::Solver ( )
protected

Definition at line 54 of file Solver.cpp.

◆ Solver() [2/2]

mango::Solver::Solver ( Problem problem_in,
int  N_parameters_in 
)

Definition at line 27 of file Solver.cpp.

◆ ~Solver()

mango::Solver::~Solver ( )

Definition at line 67 of file Solver.cpp.

Member Function Documentation

◆ evaluate_set_in_parallel()

void mango::Solver::evaluate_set_in_parallel ( vector_function_type  vector_function,
int  N_terms,
int  N_set,
double *  state_vectors,
double *  results,
bool *  failures 
)

Definition at line 28 of file evaluate_set_in_parallel.cpp.

◆ finite_difference_gradient()

void mango::Solver::finite_difference_gradient ( const double *  state_vector,
double *  base_case_objective_function,
double *  gradient 
)
virtual

Reimplemented in mango::Least_squares_solver.

Definition at line 82 of file Solver.cpp.

◆ finite_difference_Jacobian()

void mango::Solver::finite_difference_Jacobian ( vector_function_type  vector_function,
int  N_terms,
const double *  state_vector,
double *  base_case_residual_function,
double *  Jacobian 
)

Definition at line 28 of file finite_difference_Jacobian.cpp.

◆ group_leaders_loop()

void mango::Solver::group_leaders_loop ( )
protectedvirtual

Reimplemented in mango::Least_squares_solver.

Definition at line 23 of file group_leaders_loop.cpp.

◆ init_optimization()

void mango::Solver::init_optimization ( )
virtual

Definition at line 28 of file init_optimization.cpp.

◆ objective_function_wrapper()

void mango::Solver::objective_function_wrapper ( const double *  x,
double *  f,
bool *  failed 
)
virtual

Reimplemented in mango::Least_squares_solver.

Definition at line 27 of file objective_function_wrapper.cpp.

◆ objective_to_vector_function()

void mango::Solver::objective_to_vector_function ( int *  N_parameters_arg,
const double *  state_vector_arg,
int *  N_terms,
double *  results,
int *  failed,
mango::Problem problem_arg,
void *  user_data_arg 
)
static

Definition at line 71 of file Solver.cpp.

◆ optimize()

double mango::Solver::optimize ( MPI_Partition mpi_partition_in)
virtual

Reimplemented in mango::Least_squares_solver.

Definition at line 28 of file optimize.cpp.

◆ record_function_evaluation()

bool mango::Solver::record_function_evaluation ( const double *  x,
double  f,
bool  failed 
)
virtual

Reimplemented in mango::Least_squares_solver.

Definition at line 41 of file objective_function_wrapper.cpp.

◆ record_function_evaluation_pointer()

void mango::Solver::record_function_evaluation_pointer ( const double *  state_vector_arg,
double *  objective_function_arg,
bool  failed 
)
virtual

Reimplemented in mango::Least_squares_solver.

Definition at line 86 of file Solver.cpp.

◆ set_package()

void mango::Solver::set_package ( )
protectedvirtual

Definition at line 34 of file set_package.cpp.

Member Data Documentation

◆ algorithm

algorithm_type mango::Solver::algorithm

Definition at line 42 of file Solver.hpp.

◆ argc

int mango::Solver::argc

Definition at line 46 of file Solver.hpp.

◆ argv

char** mango::Solver::argv

Definition at line 47 of file Solver.hpp.

◆ at_least_one_success

bool mango::Solver::at_least_one_success

Definition at line 49 of file Solver.hpp.

◆ best_function_evaluation

int mango::Solver::best_function_evaluation

Definition at line 52 of file Solver.hpp.

◆ best_objective_function

double mango::Solver::best_objective_function

Definition at line 51 of file Solver.hpp.

◆ best_state_vector

double* mango::Solver::best_state_vector

Definition at line 50 of file Solver.hpp.

◆ best_time

clock_t mango::Solver::best_time

Definition at line 56 of file Solver.hpp.

◆ bound_constraints_set

bool mango::Solver::bound_constraints_set

Definition at line 53 of file Solver.hpp.

◆ centered_differences

bool mango::Solver::centered_differences

Definition at line 59 of file Solver.hpp.

◆ finite_difference_step_size

double mango::Solver::finite_difference_step_size

Definition at line 60 of file Solver.hpp.

◆ function_evaluations

int mango::Solver::function_evaluations

Definition at line 45 of file Solver.hpp.

◆ lower_bounds

double* mango::Solver::lower_bounds

Definition at line 54 of file Solver.hpp.

◆ max_function_and_gradient_evaluations

int mango::Solver::max_function_and_gradient_evaluations

Definition at line 48 of file Solver.hpp.

◆ max_function_evaluations

int mango::Solver::max_function_evaluations

Definition at line 62 of file Solver.hpp.

◆ mpi_partition

MPI_Partition* mango::Solver::mpi_partition

Definition at line 65 of file Solver.hpp.

◆ N_line_search

int mango::Solver::N_line_search

Definition at line 68 of file Solver.hpp.

◆ N_parameters

int mango::Solver::N_parameters

Definition at line 43 of file Solver.hpp.

◆ objective_function

objective_function_type mango::Solver::objective_function

Definition at line 44 of file Solver.hpp.

◆ output_filename

std::string mango::Solver::output_filename

Definition at line 61 of file Solver.hpp.

◆ package

Package* mango::Solver::package

Definition at line 57 of file Solver.hpp.

◆ problem

Problem* mango::Solver::problem

Definition at line 66 of file Solver.hpp.

◆ recorder

Recorder* mango::Solver::recorder

Definition at line 67 of file Solver.hpp.

◆ start_time

clock_t mango::Solver::start_time

Definition at line 56 of file Solver.hpp.

◆ state_vector

double* mango::Solver::state_vector

Definition at line 58 of file Solver.hpp.

◆ upper_bounds

double* mango::Solver::upper_bounds

Definition at line 55 of file Solver.hpp.

◆ user_data

void* mango::Solver::user_data

Definition at line 64 of file Solver.hpp.

◆ verbose

int mango::Solver::verbose

Definition at line 63 of file Solver.hpp.


The documentation for this class was generated from the following files: