mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-16 00:51:56 -06:00
Merge pull request #93 from atgeirr/fix-compile-error
Adapt to API change for AutoDiffBlock class.
This commit is contained in:
commit
7f90315f48
@ -1198,15 +1198,19 @@ namespace {
|
||||
// Update primary variables, if necessary.
|
||||
if (bhp_changed) {
|
||||
ADB::V new_bhp = Eigen::Map<ADB::V>(xw.bhp().data(), nw);
|
||||
bhp = ADB::function(new_bhp, bhp.derivative());
|
||||
// Avoiding the copy below would require a value setter method
|
||||
// in AutoDiffBlock.
|
||||
std::vector<ADB::M> old_derivs = bhp.derivative();
|
||||
bhp = ADB::function(std::move(new_bhp), std::move(old_derivs));
|
||||
}
|
||||
if (rates_changed) {
|
||||
// Need to reshuffle well rates, from phase running fastest
|
||||
// to wells running fastest.
|
||||
// The transpose() below switches the ordering.
|
||||
const DataBlock wrates = Eigen::Map<const DataBlock>(xw.wellRates().data(), nw, np).transpose();
|
||||
const ADB::V new_qs = Eigen::Map<const V>(wrates.data(), nw*np);
|
||||
well_phase_flow_rate = ADB::function(new_qs, well_phase_flow_rate.derivative());
|
||||
ADB::V new_qs = Eigen::Map<const V>(wrates.data(), nw*np);
|
||||
std::vector<ADB::M> old_derivs = well_phase_flow_rate.derivative();
|
||||
well_phase_flow_rate = ADB::function(std::move(new_qs), std::move(old_derivs));
|
||||
}
|
||||
}
|
||||
|
||||
@ -2171,7 +2175,7 @@ namespace {
|
||||
for (int block = 0; block < num_blocks; ++block) {
|
||||
jacs[block] = dpm_diag * p.derivative()[block];
|
||||
}
|
||||
return ADB::function(pm, jacs);
|
||||
return ADB::function(std::move(pm), std::move(jacs));
|
||||
} else {
|
||||
return ADB::constant(V::Constant(n, 1.0), p.blockPattern());
|
||||
}
|
||||
@ -2199,7 +2203,7 @@ namespace {
|
||||
for (int block = 0; block < num_blocks; ++block) {
|
||||
jacs[block] = dtm_diag * p.derivative()[block];
|
||||
}
|
||||
return ADB::function(tm, jacs);
|
||||
return ADB::function(std::move(tm), std::move(jacs));
|
||||
} else {
|
||||
return ADB::constant(V::Constant(n, 1.0), p.blockPattern());
|
||||
}
|
||||
|
@ -994,7 +994,7 @@ namespace {
|
||||
for (int block = 0; block < num_blocks; ++block) {
|
||||
jacs[block] = dpm_diag * p.derivative()[block];
|
||||
}
|
||||
return ADB::function(pm, jacs);
|
||||
return ADB::function(std::move(pm), std::move(jacs));
|
||||
} else {
|
||||
return ADB::constant(V::Constant(n, 1.0), p.blockPattern());
|
||||
}
|
||||
@ -1021,7 +1021,7 @@ namespace {
|
||||
for (int block = 0; block < num_blocks; ++block) {
|
||||
jacs[block] = dtm_diag * p.derivative()[block];
|
||||
}
|
||||
return ADB::function(tm, jacs);
|
||||
return ADB::function(std::move(tm), std::move(jacs));
|
||||
} else {
|
||||
return ADB::constant(V::Constant(n, 1.0), p.blockPattern());
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ namespace Opm {
|
||||
for (int block = 0; block < num_blocks; ++block) {
|
||||
jacs[block] = dim_diag * c.derivative()[block];
|
||||
}
|
||||
return ADB::function(inv_mu_w_eff, jacs);
|
||||
return ADB::function(std::move(inv_mu_w_eff), std::move(jacs));
|
||||
}
|
||||
|
||||
|
||||
@ -165,7 +165,7 @@ namespace Opm {
|
||||
jacs[block] = dmc_diag * c.derivative()[block];
|
||||
}
|
||||
|
||||
return ADB::function(mc, jacs);
|
||||
return ADB::function(std::move(mc), std::move(jacs));
|
||||
}
|
||||
|
||||
|
||||
@ -213,7 +213,7 @@ namespace Opm {
|
||||
jacs[block] = dads_diag * c.derivative()[block];
|
||||
}
|
||||
|
||||
return ADB::function(ads, jacs);
|
||||
return ADB::function(std::move(ads), std::move(jacs));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user