SmartEquilibriumSolver.hpp
61 //=================================================================================================================
65 //=================================================================================================================
74 auto solve(ChemicalState& state, EquilibriumRestrictions const& restrictions) -> SmartEquilibriumResult;
79 auto solve(ChemicalState& state, EquilibriumConditions const& conditions) -> SmartEquilibriumResult;
85 auto solve(ChemicalState& state, EquilibriumConditions const& conditions, EquilibriumRestrictions const& restrictions) -> SmartEquilibriumResult;
87 //=================================================================================================================
91 //=================================================================================================================
102 auto solve(ChemicalState& state, EquilibriumSensitivity& sensitivity, EquilibriumRestrictions const& restrictions) -> SmartEquilibriumResult;
108 auto solve(ChemicalState& state, EquilibriumSensitivity& sensitivity, EquilibriumConditions const& conditions) -> SmartEquilibriumResult;
115 auto solve(ChemicalState& state, EquilibriumSensitivity& sensitivity, EquilibriumConditions const& conditions, EquilibriumRestrictions const& restrictions) -> SmartEquilibriumResult;
117 //=================================================================================================================
121 //=================================================================================================================
The class used to represent a chemical system and its attributes and properties.
Definition: ChemicalSystem.hpp:70
Definition: ClusterConnectivity.hpp:28
The class used to define conditions to be satisfied at chemical equilibrium.
Definition: EquilibriumConditions.hpp:32
Used to predict a chemical equilibrium state at given conditions using first-order Taylor approximati...
Definition: EquilibriumPredictor.hpp:33
The class used to define reactivity restrictions in a chemical equilibrium calculation.
Definition: EquilibriumRestrictions.hpp:28
The sensitivity derivatives of a chemical equilibrium state.
Definition: EquilibriumSensitivity.hpp:37
The class used to define conditions to be satisfied at chemical equilibrium.
Definition: EquilibriumSpecs.hpp:281
Definition: PriorityQueue.hpp:27
Used for calculating chemical equilibrium states using an on-demand machine learning (ODML) strategy.
Definition: SmartEquilibriumSolver.hpp:44
SmartEquilibriumSolver(SmartEquilibriumSolver const &other)
Construct a copy of an SmartEquilibriumSolver object.
auto operator=(SmartEquilibriumSolver other) -> SmartEquilibriumSolver &
Assign a copy of an SmartEquilibriumSolver object to this.
auto solve(ChemicalState &state, EquilibriumSensitivity &sensitivity, EquilibriumConditions const &conditions) -> SmartEquilibriumResult
Equilibrate a chemical state respecting given constraint conditions and compute sensitivity derivativ...
auto solve(ChemicalState &state) -> SmartEquilibriumResult
Equilibrate a chemical state.
auto setOptions(SmartEquilibriumOptions const &options) -> void
Set the options of the equilibrium solver.
SmartEquilibriumSolver(ChemicalSystem const &system)
Construct an SmartEquilibriumSolver object with given chemical system.
~SmartEquilibriumSolver()
Destroy this SmartEquilibriumSolver object.
auto solve(ChemicalState &state, EquilibriumRestrictions const &restrictions) -> SmartEquilibriumResult
Equilibrate a chemical state respecting given reactivity restrictions.
auto solve(ChemicalState &state, EquilibriumConditions const &conditions, EquilibriumRestrictions const &restrictions) -> SmartEquilibriumResult
Equilibrate a chemical state respecting given constraint conditions and reactivity restrictions.
auto solve(ChemicalState &state, EquilibriumSensitivity &sensitivity, EquilibriumConditions const &conditions, EquilibriumRestrictions const &restrictions) -> SmartEquilibriumResult
Equilibrate a chemical state respecting given constraint conditions and reactivity restrictions and c...
SmartEquilibriumSolver(EquilibriumSpecs const &specs)
Construct an SmartEquilibriumSolver object with given chemical equilibrium specifications.
auto solve(ChemicalState &state, EquilibriumSensitivity &sensitivity, EquilibriumRestrictions const &restrictions) -> SmartEquilibriumResult
Equilibrate a chemical state respecting given reactivity restrictions and compute sensitivity derivat...
auto solve(ChemicalState &state, EquilibriumSensitivity &sensitivity) -> SmartEquilibriumResult
Equilibrate a chemical state and compute sensitivity derivatives.
auto solve(ChemicalState &state, EquilibriumConditions const &conditions) -> SmartEquilibriumResult
Equilibrate a chemical state respecting given constraint conditions.
The namespace containing all components of the Reaktoro library.
Definition: Algorithms.hpp:29
std::unique_ptr< T > Ptr
Convenient alias for std::unique_ptr<T>.
Definition: Types.hpp:102
ArrayX< Eigen::Index > ArrayXl
Convenient alias to Eigen type.
Definition: Matrix.hpp:95
std::unordered_map< Key, T > Map
Convenient alias for std::unordered_map<Key, T>.
Definition: Types.hpp:74
The options for the smart equilibrium calculations.
Definition: SmartEquilibriumOptions.hpp:28
Used to describe the result of a smart chemical equilibrium calculation.
Definition: SmartEquilibriumResult.hpp:102
The collection of clusters containing learned input-output data associated to a temperature-pressure ...
Definition: SmartEquilibriumSolver.hpp:160
PriorityQueue priority
The priority queue for the clusters based on their usage counts.
Definition: SmartEquilibriumSolver.hpp:168
Deque< Cluster > clusters
The clusters containing the learned input-output data points in a temperature-pressure grid cell.
Definition: SmartEquilibriumSolver.hpp:162
ClusterConnectivity connectivity
The connectivity matrix of the clusters to determine how we move from one to another when searching.
Definition: SmartEquilibriumSolver.hpp:165
The cluster storing learned input-output data with same classification.
Definition: SmartEquilibriumSolver.hpp:144
Deque< Record > records
The records stored in this cluster with learning data.
Definition: SmartEquilibriumSolver.hpp:152
ArrayXl iprimary
The indices of the primary species for this cluster.
Definition: SmartEquilibriumSolver.hpp:146
PriorityQueue priority
The priority queue for the records based on their usage count.
Definition: SmartEquilibriumSolver.hpp:155
Index label
The hash of the indices of the primary species for this cluster.
Definition: SmartEquilibriumSolver.hpp:149
The temperature-pressure grid cells containing learned input-output data.
Definition: SmartEquilibriumSolver.hpp:173
Map< Pair< long, long >, Cell > cells
The hash table used to access a temperature-pressure grid cell containing learned computations.
Definition: SmartEquilibriumSolver.hpp:178
The record of the knowledge database containing input, output, and derivatives data.
Definition: SmartEquilibriumSolver.hpp:128
EquilibriumSensitivity sensitivity
The sensitivity derivatives at the calculated chemical equilibrium state.
Definition: SmartEquilibriumSolver.hpp:136
EquilibriumPredictor predictor
The predictor of chemical equilibrium states at given new conditions.
Definition: SmartEquilibriumSolver.hpp:139
EquilibriumConditions conditions
The conditions at which the chemical equilibrium state was calculated.
Definition: SmartEquilibriumSolver.hpp:133
ChemicalState state
The fully calculated chemical equilibrium state.
Definition: SmartEquilibriumSolver.hpp:130