mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Code cleanup
This commit is contained in:
parent
a1504a2bff
commit
613052525b
@ -292,16 +292,6 @@ namespace Opm
|
|||||||
/// Elementwise operator -
|
/// Elementwise operator -
|
||||||
AutoDiffBlock operator-(const AutoDiffBlock& rhs) const
|
AutoDiffBlock operator-(const AutoDiffBlock& rhs) const
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
assert(val_.rows() > 0 || rhs.val_.rows() > 0);
|
|
||||||
if (val_.rows() == 0) {
|
|
||||||
return rhs*(-1.0);
|
|
||||||
}
|
|
||||||
if (rhs.val_.rows() == 0) {
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (jac_.empty() && rhs.jac_.empty()) {
|
if (jac_.empty() && rhs.jac_.empty()) {
|
||||||
return constant(val_ - rhs.val_);
|
return constant(val_ - rhs.val_);
|
||||||
}
|
}
|
||||||
|
@ -536,7 +536,6 @@ BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck&
|
|||||||
|
|
||||||
typedef Opm::LocalAd::Evaluation<double, /*size=*/2> LadEval;
|
typedef Opm::LocalAd::Evaluation<double, /*size=*/2> LadEval;
|
||||||
|
|
||||||
// FIXME: What is Lad?
|
|
||||||
LadEval pLad = 0.0;
|
LadEval pLad = 0.0;
|
||||||
LadEval TLad = 0.0;
|
LadEval TLad = 0.0;
|
||||||
LadEval RsLad = 0.0;
|
LadEval RsLad = 0.0;
|
||||||
@ -556,7 +555,6 @@ BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck&
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (rs.size() == 0) {
|
if (rs.size() == 0) {
|
||||||
// If FIXME
|
|
||||||
RsLad.value = 0.0;
|
RsLad.value = 0.0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -453,18 +453,11 @@ namespace Opm
|
|||||||
const int oilpos = pu.phase_pos[Oil];
|
const int oilpos = pu.phase_pos[Oil];
|
||||||
const int gaspos = pu.phase_pos[Gas];
|
const int gaspos = pu.phase_pos[Gas];
|
||||||
|
|
||||||
|
const ADB tmp_oil = cmix_s[oilpos] - (rv_perfcells * cmix_s[gaspos] / d);
|
||||||
|
volumeRatio += tmp_oil / b_perfcells[oilpos];
|
||||||
|
|
||||||
// First compute for Oil
|
const ADB tmp_gas = cmix_s[gaspos] - (rs_perfcells * cmix_s[oilpos] / d);
|
||||||
{
|
volumeRatio += tmp_gas / b_perfcells[gaspos];
|
||||||
const ADB tmp = cmix_s[oilpos] - (rv_perfcells * cmix_s[gaspos] / d);
|
|
||||||
volumeRatio += tmp / b_perfcells[oilpos];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Then compute for Gas
|
|
||||||
{
|
|
||||||
const ADB tmp = cmix_s[gaspos] - (rs_perfcells * cmix_s[oilpos] / d);
|
|
||||||
volumeRatio += tmp / b_perfcells[gaspos];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (active[Oil]) {
|
if (active[Oil]) {
|
||||||
|
Loading…
Reference in New Issue
Block a user