Silence warnings (shadowing and unused argument).

This commit is contained in:
Atgeirr Flø Rasmussen 2015-10-07 10:07:45 +02:00
parent 0149732abc
commit 9e3d360b5b
2 changed files with 18 additions and 20 deletions

View File

@ -370,7 +370,6 @@ namespace Opm {
// A weighted sum of the b-factors of gas and solvent are used. // A weighted sum of the b-factors of gas and solvent are used.
const int nc = Opm::AutoDiffGrid::numCells(grid_); const int nc = Opm::AutoDiffGrid::numCells(grid_);
const Opm::PhaseUsage& pu = fluid_.phaseUsage();
const ADB zero = ADB::constant(V::Zero(nc)); const ADB zero = ADB::constant(V::Zero(nc));
const ADB& ss = state.solvent_saturation; const ADB& ss = state.solvent_saturation;
const ADB& sg = (active_[ Gas ] const ADB& sg = (active_[ Gas ]
@ -380,7 +379,6 @@ namespace Opm {
Selector<double> zero_selector(ss.value() + sg.value(), Selector<double>::Zero); Selector<double> zero_selector(ss.value() + sg.value(), Selector<double>::Zero);
V F_solvent = subset(zero_selector.select(ss, ss / (ss + sg)),well_cells).value(); V F_solvent = subset(zero_selector.select(ss, ss / (ss + sg)),well_cells).value();
const int nw = wells().number_of_wells;
V injectedSolventFraction = Eigen::Map<const V>(&xw.solventFraction()[0], nperf); V injectedSolventFraction = Eigen::Map<const V>(&xw.solventFraction()[0], nperf);
V isProducer = V::Zero(nperf); V isProducer = V::Zero(nperf);
@ -637,7 +635,6 @@ namespace Opm {
mob_perfcells[gas_pos] += subset(rq_[solvent_pos_].mob, well_cells); mob_perfcells[gas_pos] += subset(rq_[solvent_pos_].mob, well_cells);
// A weighted sum of the b-factors of gas and solvent are used. // A weighted sum of the b-factors of gas and solvent are used.
const int nperf = wells().well_connpos[wells().number_of_wells];
const int nc = Opm::AutoDiffGrid::numCells(grid_); const int nc = Opm::AutoDiffGrid::numCells(grid_);
const Opm::PhaseUsage& pu = fluid_.phaseUsage(); const Opm::PhaseUsage& pu = fluid_.phaseUsage();
@ -647,7 +644,6 @@ namespace Opm {
? state.saturation[ pu.phase_pos[ Gas ] ] ? state.saturation[ pu.phase_pos[ Gas ] ]
: zero); : zero);
const std::vector<int> well_cells(wells().well_cells, wells().well_cells + nperf);
Selector<double> zero_selector(ss.value() + sg.value(), Selector<double>::Zero); Selector<double> zero_selector(ss.value() + sg.value(), Selector<double>::Zero);
ADB F_solvent = subset(zero_selector.select(ss, ss / (ss + sg)),well_cells); ADB F_solvent = subset(zero_selector.select(ss, ss / (ss + sg)),well_cells);
V ones = V::Constant(nperf,1.0); V ones = V::Constant(nperf,1.0);

View File

@ -207,7 +207,7 @@ namespace Opm
*/ */
template<typename Scalar> struct PointOneOp { template<typename Scalar> struct PointOneOp {
EIGEN_EMPTY_STRUCT_CTOR(PointOneOp) EIGEN_EMPTY_STRUCT_CTOR(PointOneOp)
Scalar operator()(const Scalar& a, const Scalar& b) const { return 0.1; } Scalar operator()(const Scalar&, const Scalar&) const { return 0.1; }
}; };
} }
@ -234,6 +234,7 @@ namespace Opm
assert(size == row_major.cols()); assert(size == row_major.cols());
// Create ISTL matrix with interleaved rows and columns (block structured). // Create ISTL matrix with interleaved rows and columns (block structured).
{
assert(np == 3); assert(np == 3);
istlA.setSize(row_major.rows(), row_major.cols(), row_major.nonZeros()); istlA.setSize(row_major.rows(), row_major.cols(), row_major.nonZeros());
istlA.setBuildMode(Mat::row_wise); istlA.setBuildMode(Mat::row_wise);
@ -253,6 +254,7 @@ namespace Opm
istlA[row][col] = 0.0; istlA[row][col] = 0.0;
} }
} }
}
/** /**
* Go through all jacobians, and insert in correct spot * Go through all jacobians, and insert in correct spot