File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,10 @@ void IdealGasConstPressureMoleReactor::buildJacobian(
125125 // d (dot(omega)) / d c_j, it is later transformed appropriately.
126126 Eigen::SparseMatrix<double > dnk_dnj = m_kin->netProductionRates_ddCi ();
127127 // species size that accounts for surface species
128- size_t ssize = m_nv - m_sidx;
128+ size_t ssize = m_nsp;
129+ for (auto surf : m_surfaces) {
130+ ssize += surf->thermo ()->nSpecies ();
131+ }
129132 // map derivatives from the surface chemistry jacobian
130133 // to the reactor jacobian
131134 if (!m_surfaces.empty ()) {
Original file line number Diff line number Diff line change @@ -193,7 +193,10 @@ void IdealGasMoleReactor::buildJacobian(vector<Eigen::Triplet<double>>& jacVecto
193193 // d (dot(omega)) / d c_j, it is later transformed appropriately.
194194 Eigen::SparseMatrix<double > dnk_dnj = m_kin->netProductionRates_ddCi ();
195195 // species size that accounts for surface species
196- size_t ssize = m_nv - m_sidx;
196+ size_t ssize = m_nsp;
197+ for (auto surf : m_surfaces) {
198+ ssize += surf->thermo ()->nSpecies ();
199+ }
197200 // map derivatives from the surface chemistry jacobian
198201 // to the reactor jacobian
199202 if (!m_surfaces.empty ()) {
You can’t perform that action at this time.
0 commit comments