mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
In collapseJacs(), avoid explicit zeros.
This commit is contained in:
parent
dd52d444e7
commit
51dde7cec5
@ -464,9 +464,11 @@ collapseJacs(const AutoDiffBlock<double>& x, Matrix& jacobian)
|
|||||||
jac1.toSparse(jac);
|
jac1.toSparse(jac);
|
||||||
for (Eigen::SparseMatrix<double>::Index k = 0; k < jac.outerSize(); ++k) {
|
for (Eigen::SparseMatrix<double>::Index k = 0; k < jac.outerSize(); ++k) {
|
||||||
for (Eigen::SparseMatrix<double>::InnerIterator i(jac, k); i ; ++i) {
|
for (Eigen::SparseMatrix<double>::InnerIterator i(jac, k); i ; ++i) {
|
||||||
t.push_back(Tri(i.row(),
|
if (i.value() != 0.0) {
|
||||||
i.col() + block_col_start,
|
t.push_back(Tri(i.row(),
|
||||||
i.value()));
|
i.col() + block_col_start,
|
||||||
|
i.value()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
block_col_start += jac.cols();
|
block_col_start += jac.cols();
|
||||||
|
Loading…
Reference in New Issue
Block a user