Code cleanup

This commit is contained in:
babrodtk 2016-04-22 08:18:15 +02:00
parent a1504a2bff
commit 613052525b
3 changed files with 4 additions and 23 deletions

View File

@ -292,16 +292,6 @@ namespace Opm
/// Elementwise operator -
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()) {
return constant(val_ - rhs.val_);
}

View File

@ -536,7 +536,6 @@ BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck&
typedef Opm::LocalAd::Evaluation<double, /*size=*/2> LadEval;
// FIXME: What is Lad?
LadEval pLad = 0.0;
LadEval TLad = 0.0;
LadEval RsLad = 0.0;
@ -556,7 +555,6 @@ BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck&
}
else {
if (rs.size() == 0) {
// If FIXME
RsLad.value = 0.0;
}
else {

View File

@ -453,18 +453,11 @@ namespace Opm
const int oilpos = pu.phase_pos[Oil];
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 = 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];
}
const ADB tmp_gas = cmix_s[gaspos] - (rs_perfcells * cmix_s[oilpos] / d);
volumeRatio += tmp_gas / b_perfcells[gaspos];
}
else {
if (active[Oil]) {