Page MenuHomec4science

micpsolver_structs.hpp
No OneTemporary

File Metadata

Created
Tue, Jun 4, 14:05

micpsolver_structs.hpp

#ifndef SPECMICP_REACTMICP_MICPSOLVER_MICPSOLVERSTRUCTS_HPP
#define SPECMICP_REACTMICP_MICPSOLVER_MICPSOLVERSTRUCTS_HPP
namespace specmicp {
namespace reactmicp {
namespace micpsolver {
//! options for the ReactMiCP solver
struct MiCPParabolicSolverOptions
{
double alpha;
double penalization_factor;
double factor_descent_direction;
double power_descent_direction;
double step_tolerance;
double residuals_tolerance;
double threshold_stationary_point;
double maximum_step_length;
double coeff_accept_newton_step;
double maximum_iterations;
double maximum_iterations_at_maximum_step;
MiCPParabolicSolverOptions():
alpha(1.0),
penalization_factor(0.8),
factor_descent_direction(1.5),
power_descent_direction(1.0),
step_tolerance(1e-8),
residuals_tolerance(1e-6),
threshold_stationary_point(1e-4),
maximum_step_length(100.0),
coeff_accept_newton_step(0.9),
maximum_iterations(50),
maximum_iterations_at_maximum_step(50)
{}
};
enum class MiCPParabolicSolverReturnCode
{
UnknownError = -10,
FailedDecomposition = -5,
MaxStepTakenTooManyTimes = -3,
MaxIterations = -2,
StationaryPoint = -1,
NotConvergedYet = 0,
ResidualMinimized = 1,
ErrorMinimized = 2
};
struct MiCPParabolicSolverPerformance
{
bool gradient_step_taken;
bool maximum_step_taken;
int nb_iterations;
int nb_maximum_step_taken;
int nb_consecutive_maximum_step_taken;
int nb_call_residuals;
int nb_call_jacobian;
MiCPParabolicSolverReturnCode return_code;
MiCPParabolicSolverPerformance():
gradient_step_taken(false),
maximum_step_taken(false),
nb_iterations(0),
nb_maximum_step_taken(0),
nb_consecutive_maximum_step_taken(0),
nb_call_residuals(0),
nb_call_jacobian(0),
return_code(MiCPParabolicSolverReturnCode::NotConvergedYet)
{}
};
} // end namespace micpsolver
} // end namespace reactmicp
} // end namespace specmicp
#endif // SPECMICP_REACTMICP_MICPSOLVER_MICPSOLVERSTRUCTS_HPP

Event Timeline