adding 0th phase only once when computing sparse pattern

This commit is contained in:
Kai Bao 2015-08-17 15:33:33 +02:00
parent ce4b25f0b8
commit 997616658b

View File

@ -205,7 +205,7 @@ namespace Opm
// corresponding to the jacobians with respect to pressure.
// Use addition to get to the union structure.
Eigen::SparseMatrix<double> structure = eqs[0].derivative()[0];
for (int phase = 0; phase < np; ++phase) {
for (int phase = 1; phase < np; ++phase) {
structure += eqs[phase].derivative()[0];
}