mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-28 18:21:00 -06:00
Use vertcatCollapseJacs() for improved performance.
This commit is contained in:
parent
07258f0249
commit
085c279a0a
@ -463,11 +463,7 @@ namespace Opm
|
||||
L.setFromTriplets(t.begin(), t.end());
|
||||
|
||||
// Combine in single block.
|
||||
ADB total_residual = std::move(eqs[0]);
|
||||
for (int phase = 1; phase < num_phases; ++phase) {
|
||||
total_residual = vertcat(total_residual, eqs[phase]);
|
||||
}
|
||||
total_residual = collapseJacs(total_residual);
|
||||
ADB total_residual = vertcatCollapseJacs(eqs);
|
||||
|
||||
// Create output as product of L with equations.
|
||||
A = L * total_residual.derivative()[0];
|
||||
|
Loading…
Reference in New Issue
Block a user