Merge pull request #1139 from blattms/backport-of-pr-1096

Some janitoring (partial backport of pr #1096)
This commit is contained in:
Markus Blatt
2019-10-21 08:36:27 +02:00
committed by GitHub
8 changed files with 12 additions and 29 deletions

View File

@@ -20,6 +20,7 @@
#include <cassert>
#include <cmath>
#include <opm/common/utility/numeric/calculateCellVol.hpp>
#include <opm/common/ErrorMacros.hpp>
/*
Cell volume calculation based on following publication:
@@ -87,26 +88,18 @@ double perm123sign(int i1, int i2, int i3){
if ((i1 ==1 ) && (i2==2) && (i3 == 3)){
temp = 1.0;
}
if ((i1 == 1) && (i2==3) && (i3 == 2)){
} else if ((i1 == 1) && (i2==3) && (i3 == 2)){
temp = -1.0;
}
if ((i1 == 2) && (i2 == 1) && (i3 == 3)){
} else if ((i1 == 2) && (i2 == 1) && (i3 == 3)){
temp = -1.0;
}
if ((i1 == 2) && (i2 == 3) && (i3 == 1)){
} else if ((i1 == 2) && (i2 == 3) && (i3 == 1)){
temp = 1.0;
}
if ((i1 == 3) && (i2 == 1) && (i3 == 2)){
} else if ((i1 == 3) && (i2 == 1) && (i3 == 2)){
temp = 1.0;
}
if ((i1 == 3) && (i2 == 2) && (i3 == 1)){
} else if ((i1 == 3) && (i2 == 2) && (i3 == 1)){
temp = -1.0;
} else {
OPM_THROW(std::logic_error, "Wrong indices in perm123sign");
}
return temp;

View File

@@ -126,7 +126,7 @@ namespace {
segIndCB.push_back(segIndex);
int newSInd = segIndex;
const auto& origBranchNo = segSet[segIndex].branchNumber();
bool endOrigBranch = true;
bool endOrigBranch;
// loop down branch to find all segments in branch and number from "toe" to "heel"
while (newSInd < segSet.size()) {
endOrigBranch = true;

View File

@@ -55,12 +55,6 @@ namespace {
return inteHead[20];
}
// maximum number of wells
std::size_t nwmaxz(const std::vector<int>& inteHead)
{
return inteHead[163];
}
namespace iUdq {

View File

@@ -82,7 +82,6 @@ createDoubHead(const EclipseState& es,
const double nextTimeStep)
{
const auto& usys = es.getDeckUnitSystem();
const auto& rspec = es.runspec();
const auto tconv = getTimeConv(usys);
auto dh = DoubHEAD{}

View File

@@ -511,7 +511,6 @@ template std::string DeckItem::get< std::string >( size_t ) const;
template UDAValue DeckItem::get< UDAValue >( size_t ) const;
template const std::vector< int >& DeckItem::getData< int >() const;
template const std::vector< double >& DeckItem::getData< double >() const;
template const std::vector< UDAValue >& DeckItem::getData< UDAValue >() const;
template const std::vector< std::string >& DeckItem::getData< std::string >() const;
}

View File

@@ -875,7 +875,7 @@ EclipseGrid::EclipseGrid(const Deck& deck, const int * actnum)
zb = zt + sumKdir(i, j, dims, dz);
double xt=-999;
double xb=-999;
double xb;
if (j == (dims[1]-1) ) {
xt = sumIdir(i, j, 0, dims, dx);
@@ -899,8 +899,6 @@ EclipseGrid::EclipseGrid(const Deck& deck, const int * actnum)
coord.push_back(xb);
coord.push_back(yb);
coord.push_back(zb);
x0 = xt;
}
}

View File

@@ -171,7 +171,7 @@ namespace Opm {
for (int i = segment1; i <= segment2; ++i) {
// for the first or the only segment in the range is the one specified in the WELSEGS
// from the second segment in the range, the outlet segment is the previous segment in the range
int outlet_segment = -1;
int outlet_segment;
if (i == segment1) {
outlet_segment = outlet_segment_readin;
} else {

View File

@@ -63,7 +63,7 @@ namespace Opm {
throw std::invalid_argument(msg);
}
auto cmode = ProducerCMode::CMODE_UNDEFINED;
ProducerCMode cmode;
if (effectiveHistoryProductionControl(this->whistctl_cmode) )
cmode = this->whistctl_cmode;