Reaktoro
A unified framework for modeling chemically reactive systems
EquilibriumOptions.hpp
1 // Reaktoro is a unified framework for modeling chemically reactive systems.
2 //
3 // Copyright (C) 2014-2018 Allan Leal
4 //
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License, or (at your option) any later version.
9 //
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this library. If not, see <http://www.gnu.org/licenses/>.
17 
18 #pragma once
19 
20 // Reaktoro includes
21 #include <Reaktoro/Optimization/OptimumMethod.hpp>
22 #include <Reaktoro/Optimization/OptimumOptions.hpp>
23 #include <Reaktoro/Optimization/NonlinearSolver.hpp>
24 
25 namespace Reaktoro {
26 
28 enum class GibbsHessian
29 {
31  Exact,
32 
34  ExactDiagonal,
35 
37  Approximation,
38 
41 };
42 
45 {
47  double reltol = 1.0;
48 
50  double abstol = 1e-14;
51 };
52 
55 {
58 
60  EquilibriumOptions(const char* str);
61 
65  double epsilon = 1e-20;
66 
74  bool warmstart = true;
75 
78 
80  OptimumMethod method = OptimumMethod::IpNewton;
81 
84 
87 
90 };
91 
92 } // namespace Reaktoro
The options for the equilibrium calculations.
Definition: EquilibriumOptions.hpp:55
double epsilon
The parameter ε for the numerical representation of a zero molar amount.
Definition: EquilibriumOptions.hpp:65
double abstol
The absolute tolerance for estimated species mole amounts.
Definition: EquilibriumOptions.hpp:50
OptimumMethod method
The optimisation method to be used for the equilibrium calculation.
Definition: EquilibriumOptions.hpp:80
EquilibriumOptions()
Construct a default EquilibriumOptions instance.
Definition: EquilibriumOptions.cpp:25
double reltol
The relative tolerance for estimated species mole amounts.
Definition: EquilibriumOptions.hpp:47
GibbsHessian
The options for the description of the Hessian of the Gibbs energy function.
Definition: EquilibriumOptions.hpp:29
OptimumMethod
The method used for the optimisation calculationss.
Definition: OptimumMethod.hpp:24
SmartEquilibriumOptions smart
The options for the smart equilibrium calculation.
Definition: EquilibriumOptions.hpp:89
@ Exact
The Hessian of the Gibbs energy function is H = H(exact).
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24
bool warmstart
The boolean flag that indicates if warm-start strategy should be used when possible.
Definition: EquilibriumOptions.hpp:74
GibbsHessian hessian
The calculation mode of the Hessian of the Gibbs energy function.
Definition: EquilibriumOptions.hpp:77
A type that describes the options for the solution of a non-linear problem.
Definition: NonlinearSolver.hpp:95
A type that describes the options of a optimisation calculation.
Definition: OptimumOptions.hpp:187
The options for the smart equilibrium calculations.
Definition: EquilibriumOptions.hpp:45
NonlinearOptions nonlinear
The options for the nonlinear solver.
Definition: EquilibriumOptions.hpp:86
OptimumOptions optimum
The options for the optimisation calculation.
Definition: EquilibriumOptions.hpp:83