Reaktoro 
A unified framework for modeling chemically reactive systems
EquilibriumInverseSolver.hpp
1 // Reaktoro is a unified framework for modeling chemically reactive systems.
2 //
3 // Copyright (C) 2014-2015 Allan Leal
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program 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
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18 #pragma once
19 
20 // C++ includes
21 #include <memory>
22 
23 // Reaktoro includes
24 #include <Reaktoro/Math/Matrix.hpp>
25 
26 namespace Reaktoro {
27 
28 // Forward declarations
29 class ChemicalSystem;
30 class EquilibriumInverseProblem;
31 class ChemicalState;
32 class Partition;
33 struct EquilibriumOptions;
34 struct EquilibriumResult;
35 struct EquilibriumSensitivity;
36 
39 {
40 public:
42  explicit EquilibriumInverseSolver(const ChemicalSystem& system);
43 
46 
48  virtual ~EquilibriumInverseSolver();
49 
52 
54  auto setOptions(const EquilibriumOptions& options) -> void;
55 
57  auto setPartition(const Partition& partition) -> void;
58 
62  auto solve(ChemicalState& state, const EquilibriumInverseProblem& problem) -> EquilibriumResult;
63 
69 
70 private:
71  struct Impl;
72 
73  std::unique_ptr<Impl> pimpl;
74 };
75 
76 } // namespace Reaktoro
A class used for solving inverse equilibrium problems.
Definition: EquilibriumInverseSolver.hpp:38
A class to represent a system and its attributes and properties.
Definition: ChemicalSystem.hpp:47
The options for the equilibrium calculations.
Definition: EquilibriumOptions.hpp:44
A type that contains the sensitivity data of the equilibrium state.
Definition: EquilibriumSensitivity.hpp:31
A class used for defining an inverse equilibrium problem.
Definition: EquilibriumInverseProblem.hpp:56
auto sensitivity() -> EquilibriumSensitivity
Return the sensitivity of the equilibrium state.
Definition: EquilibriumInverseSolver.cpp:200
auto setPartition(const Partition &partition) -> void
Set the partition of the chemical system.
Definition: EquilibriumInverseSolver.cpp:190
EquilibriumInverseSolver(const ChemicalSystem &system)
Construct an EquilibriumInverseSolver instance.
Definition: EquilibriumInverseSolver.cpp:168
A type used to describe the result of an equilibrium calculation.
Definition: EquilibriumResult.hpp:27
Provide a computational representation of the Partition of a chemical system.
Definition: Partition.hpp:55
virtual ~EquilibriumInverseSolver()
Destroy this EquilibriumInverseSolver instance.
Definition: EquilibriumInverseSolver.cpp:176
auto setOptions(const EquilibriumOptions &options) -> void
Set the options of the equilibrium solver.
Definition: EquilibriumInverseSolver.cpp:185
auto solve(ChemicalState &state, const EquilibriumInverseProblem &problem) -> EquilibriumResult
Solve an inverse equilibrium problem.
Definition: EquilibriumInverseSolver.cpp:195
Provides a computational representation of the state of a multiphase chemical system.
Definition: ChemicalState.hpp:60
auto operator=(EquilibriumInverseSolver other) -> EquilibriumInverseSolver &
Assign a copy of an EquilibriumInverseSolver instance.
Definition: EquilibriumInverseSolver.cpp:179
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24