diff --git a/opm/models/blackoil/blackoilpolymerparams.cpp b/opm/models/blackoil/blackoilpolymerparams.cpp index 219bfff89..ff82f59d6 100644 --- a/opm/models/blackoil/blackoilpolymerparams.cpp +++ b/opm/models/blackoil/blackoilpolymerparams.cpp @@ -40,11 +40,11 @@ copyright holders. namespace { -#if FLOW_INSTANTIATE_FLOAT && HAVE_ECL_INPUT -std::vector> -doubleVecsToFloat(const std::vector>& input) +template +std::vector> +convertVecToVec(const std::vector>& input) { - std::vector> output; + std::vector> output; output.reserve(input.size()); for (std::size_t i = 0; i < input.size(); ++i) { output.emplace_back(input[i].begin(), input[i].end()); @@ -52,7 +52,6 @@ doubleVecsToFloat(const std::vector>& input) return output; } -#endif } @@ -289,7 +288,7 @@ initFromState(const EclipseState& eclState) if constexpr (std::is_same_v) { const std::vector tp(throughput.begin(), throughput.end()); const std::vector wv(watervelocity.begin(), watervelocity.end()); - const auto mw = doubleVecsToFloat(molecularweight); + const auto mw = convertVecToVec(molecularweight); TabulatedTwoDFunction tablefunc(tp, wv, mw, true, false); plymwinjTables_[tableNumber] = std::move(tablefunc); } else { @@ -309,7 +308,7 @@ initFromState(const EclipseState& eclState) if constexpr (std::is_same_v) { const std::vector tp(throughput.begin(), throughput.end()); const std::vector wv(watervelocity.begin(), watervelocity.end()); - const auto sp = doubleVecsToFloat(skinpressure); + const auto sp = convertVecToVec(skinpressure); TabulatedTwoDFunction tablefunc(tp, wv, sp, true, false); skprwatTables_[tableNumber] = std::move(tablefunc); } else { @@ -330,7 +329,7 @@ initFromState(const EclipseState& eclState) if constexpr (std::is_same_v) { const std::vector tp(throughput.begin(), throughput.end()); const std::vector wv(watervelocity.begin(), watervelocity.end()); - const auto sp = doubleVecsToFloat(skinpressure); + const auto sp = convertVecToVec(skinpressure); SkprpolyTable tablefunc { refPolymerConcentration, TabulatedTwoDFunction(tp, wv, sp, true, false) diff --git a/opm/models/parallel/mpiutil.cpp b/opm/models/parallel/mpiutil.cpp index 80fd6c4d8..e6f966dc3 100644 --- a/opm/models/parallel/mpiutil.cpp +++ b/opm/models/parallel/mpiutil.cpp @@ -31,7 +31,6 @@ #if HAVE_MPI #include #include -#endif namespace { @@ -134,6 +133,7 @@ struct Packer> }; } // anonymous namespace +#endif namespace Opm {