OGS
SelfContainedSolver.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <Eigen/Sparse>
14#include <memory>
15
16#include "ChemicalReaction.h"
18
19namespace ChemistryLib
20{
21namespace SelfContainedSolverData
22{
24{
25public:
28 Eigen::SparseMatrix<double>
29 stoichiometric_matrix,
30 std::vector<std::unique_ptr<ChemicalReaction>>
31 chemical_reactions)
33 _stoichiometric_matrix(stoichiometric_matrix),
34 _chemical_reactions(std::move(chemical_reactions))
35 {
36 }
37
38 Eigen::SparseMatrix<double> const* getStoichiometricMatrix() const override
39 {
41 }
42
43 double getKineticPrefactor(std::size_t reaction_id) const override
44 {
45 return _chemical_reactions[reaction_id]->getKineticPrefactor();
46 }
47
48private:
49 Eigen::SparseMatrix<double> _stoichiometric_matrix;
50 std::vector<std::unique_ptr<ChemicalReaction>> _chemical_reactions;
51};
52} // namespace SelfContainedSolverData
53} // namespace ChemistryLib
std::vector< std::unique_ptr< ChemicalReaction > > _chemical_reactions
Eigen::SparseMatrix< double > const * getStoichiometricMatrix() const override
SelfContainedSolver(MeshLib::Mesh const &mesh, GlobalLinearSolver &linear_solver, Eigen::SparseMatrix< double > stoichiometric_matrix, std::vector< std::unique_ptr< ChemicalReaction > > chemical_reactions)
double getKineticPrefactor(std::size_t reaction_id) const override