@@ -214,12 +214,17 @@ class IDynamicReactionModel
214
214
double * res, double factor, LinearBufferAllocator workSpace) const = 0;
215
215
216
216
217
- virtual int quasiStationaryFlux (double t, unsigned int secIdx, const ColumnPosition& colPos, active const * y,
218
- Eigen::Map<Eigen::VectorXd > fluxes, int const * mapQSReac, LinearBufferAllocator workSpace) = 0;
217
+ virtual int computeQuasiStationaryReactionFlux (double t, unsigned int secIdx, const ColumnPosition& colPos, double const * y,
218
+ Eigen::Map<Eigen::Vector<active, Eigen::Dynamic> > fluxes, int const * mapQSReac, LinearBufferAllocator workSpace) = 0;
219
219
220
- virtual int quasiStationaryFlux (double t, unsigned int secIdx, const ColumnPosition& colPos, double const * y,
221
- Eigen::Map<Eigen::VectorXd > fluxes, int const * mapQSReac, LinearBufferAllocator workSpace) = 0;
220
+ virtual int computeQuasiStationaryReactionFlux (double t, unsigned int secIdx, const ColumnPosition& colPos, active const * y,
221
+ Eigen::Map<Eigen::Vector< double , Eigen::Dynamic> > fluxes, int const * mapQSReac, LinearBufferAllocator workSpace) = 0;
222
222
223
+ virtual int computeQuasiStationaryReactionFlux (double t, unsigned int secIdx, const ColumnPosition& colPos, double const * y,
224
+ Eigen::Map<Eigen::Vector<double , Eigen::Dynamic>> fluxes, int const * mapQSReac, LinearBufferAllocator workSpace) = 0;
225
+
226
+ virtual int computeQuasiStationaryReactionFlux (double t, unsigned int secIdx, const ColumnPosition& colPos, active const * y,
227
+ Eigen::Map<Eigen::Vector<active, Eigen::Dynamic>> fluxes, int const * mapQSReac, LinearBufferAllocator workSpace) = 0;
223
228
224
229
/* *
225
230
* @brief Adds the analytical Jacobian of the reaction terms for one liquid phase cell
@@ -246,15 +251,29 @@ class IDynamicReactionModel
246
251
virtual void analyticJacobianLiquidAdd (double t, unsigned int secIdx, const ColumnPosition& colPos, double const * y, double factor, linalg::DenseBandedRowIterator jac, LinearBufferAllocator workSpace) const = 0;
247
252
virtual void analyticJacobianLiquidAdd (double t, unsigned int secIdx, const ColumnPosition& colPos, double const * y, double factor, linalg::BandedSparseRowIterator jac, LinearBufferAllocator workSpace) const = 0;
248
253
249
- virtual void analyticQuasiSteadyJacobianLiquid (double t, unsigned int secIdx, const ColumnPosition& colPos, double const * y, int state, int reaction, linalg::BandMatrix::RowIterator jac, LinearBufferAllocator workSpace) const = 0;
250
- virtual void analyticQuasiSteadyJacobianLiquid (double t, unsigned int secIdx, const ColumnPosition& colPos, double const * y, int state, int reaction, linalg::DenseBandedRowIterator jac, LinearBufferAllocator workSpace) const = 0;
251
- virtual void analyticQuasiSteadyJacobianLiquid (double t, unsigned int secIdx, const ColumnPosition& colPos, double const * y, int state, int reaction, linalg::BandedSparseRowIterator jac, LinearBufferAllocator workSpace) const = 0;
254
+ virtual void analyticJacobianQuasiStationaryReaction (double t, unsigned int secIdx, const ColumnPosition& colPos, double const * y, int state, int reaction, linalg::BandMatrix::RowIterator jac, LinearBufferAllocator workSpace) const = 0;
255
+ virtual void analyticJacobianQuasiStationaryReaction (double t, unsigned int secIdx, const ColumnPosition& colPos, double const * y, int state, int reaction, linalg::DenseBandedRowIterator jac, LinearBufferAllocator workSpace) const = 0;
256
+ virtual void analyticJacobianQuasiStationaryReaction (double t, unsigned int secIdx, const ColumnPosition& colPos, double const * y, int state, int reaction, linalg::BandedSparseRowIterator jac, LinearBufferAllocator workSpace) const = 0;
252
257
253
258
virtual void analyticJacobianLiquidSingleFluxAdd (double t, unsigned int secIdx, const ColumnPosition& colPos, double const * y, int state, int reaction, linalg::BandMatrix::RowIterator jac, LinearBufferAllocator workSpace) const = 0;
254
259
virtual void analyticJacobianLiquidSingleFluxAdd (double t, unsigned int secIdx, const ColumnPosition& colPos, double const * y, int state, int reaction, linalg::DenseBandedRowIterator jac, LinearBufferAllocator workSpace) const = 0;
255
260
virtual void analyticJacobianLiquidSingleFluxAdd (double t, unsigned int secIdx, const ColumnPosition& colPos, double const * y, int state, int reaction, linalg::BandedSparseRowIterator jac, LinearBufferAllocator workSpace) const = 0;
256
261
257
- virtual void fillConservedMoietiesBulk (Eigen::MatrixXd& M, unsigned int & QSReaction, std::vector<int >& _QsCompBulk) = 0;
262
+ /* *
263
+ * @brief fills the conserved moieties matrix and the vector of components involved in qs reactions
264
+ * @param [in,out] M Matrix to be filled with the conserved moieties
265
+ * @param [in,out] QsCompBulk Vector to be filled with the components involved in qs reactions
266
+ */
267
+ virtual void fillConservedMoietiesBulk (Eigen::MatrixXd& M, std::vector<int >& QsCompBulk) {}
268
+
269
+ /* *
270
+ * @brief Returns whether this dynamic reaction model has quasi-stationary reactions
271
+ * @details Quasi-stationary reactions are reactions that are in equilibrium and can be solved
272
+ * algebraically. This function is used to determine whether the model can be solved
273
+ * in quasi-stationary mode.
274
+ * @return @c true if the model has quasi-stationary reactions, otherwise @c false
275
+ */
276
+ virtual bool hasQuasiStationaryReactionsBulk () const CADET_NOEXCEPT { return false ; }
258
277
259
278
virtual void timeDerivativeQuasiStationaryReaction (double t, unsigned int secIdx, const ColumnPosition& colPos, double const * y, double * dReacDt, LinearBufferAllocator workSpace) = 0;
260
279
0 commit comments