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 @@ -191,7 +191,10 @@ void IdealGasMoleReactor::buildJacobian(vector<Eigen::Triplet<double>>& jacVecto
191191 // d (dot(omega)) / d c_j, it is later transformed appropriately.
192192 Eigen::SparseMatrix<double > dnk_dnj = m_kin->netProductionRates_ddCi ();
193193 // species size that accounts for surface species
194- size_t ssize = m_nv - m_sidx;
194+ size_t ssize = m_nsp;
195+ for (auto surf : m_surfaces) {
196+ ssize += surf->thermo ()->nSpecies ();
197+ }
195198 // map derivatives from the surface chemistry jacobian
196199 // to the reactor jacobian
197200 if (!m_surfaces.empty ()) {
You can’t perform that action at this time.
0 commit comments