From c4871367e81050e1933576c2cc4cb9fdf377e96e Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Wed, 4 Sep 2024 12:50:22 +0200 Subject: [PATCH 1/2] fixed: building without float simulators pointy hat is all mine --- opm/models/blackoil/blackoilpolymerparams.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) 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) From d36fefd42803b8687a0ecfe3ffc19bb968595ac0 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Wed, 4 Sep 2024 12:50:38 +0200 Subject: [PATCH 2/2] fixed: build without MPI --- opm/models/parallel/mpiutil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {