diff --git a/opm/autodiff/ConservativeSparseSparseProduct.h b/opm/autodiff/ConservativeSparseSparseProduct.h index ca4221622..42c6ef750 100644 --- a/opm/autodiff/ConservativeSparseSparseProduct.h +++ b/opm/autodiff/ConservativeSparseSparseProduct.h @@ -88,24 +88,29 @@ static void conservative_sparse_sparse_product_impl(const Lhs& lhs, const Rhs& r // we compute each column of the result, one after the other for (Index j=0; j::sort( indices.data(), indices.data()+nnz ); } + res.startVec(j); // ordered insertion // still using insertBackByOuterInnerUnordered since we know what we are doing for(Index k=0; k