From 8473aa38e5a080e8f91ea3da0df344a2dc255f73 Mon Sep 17 00:00:00 2001 From: Joakim Hove Date: Fri, 13 Mar 2020 08:53:57 +0100 Subject: [PATCH] Remove Deck argument to RelpermDiagnostic --- ebos/eclbasevanguard.hh | 2 +- opm/core/props/satfunc/RelpermDiagnostics.hpp | 6 +----- opm/core/props/satfunc/RelpermDiagnostics_impl.hpp | 6 ++---- opm/simulators/flow/FlowMainEbos.hpp | 2 +- tests/test_relpermdiagnostics.cpp | 2 +- 5 files changed, 6 insertions(+), 12 deletions(-) diff --git a/ebos/eclbasevanguard.hh b/ebos/eclbasevanguard.hh index fef9eae80..e407dccdc 100644 --- a/ebos/eclbasevanguard.hh +++ b/ebos/eclbasevanguard.hh @@ -552,7 +552,7 @@ protected: if (enableExperiments) { Opm::RelpermDiagnostics relpermDiagnostics; - relpermDiagnostics.diagnosis(*eclState_, *deck_, asImp_().grid()); + relpermDiagnostics.diagnosis(*eclState_, asImp_().grid()); } } private: diff --git a/opm/core/props/satfunc/RelpermDiagnostics.hpp b/opm/core/props/satfunc/RelpermDiagnostics.hpp index 4cac01f0f..672bb29d5 100644 --- a/opm/core/props/satfunc/RelpermDiagnostics.hpp +++ b/opm/core/props/satfunc/RelpermDiagnostics.hpp @@ -29,7 +29,6 @@ #include #include -#include #include #include #include @@ -52,11 +51,9 @@ namespace Opm { ///eclipse data file. Errors and warings will be ///output if they're found. ///\param[in] eclState eclipse state. - ///\param[in] deck ecliplise data file. ///\param[in] grid unstructured grid. template void diagnosis(const EclipseState& eclState, - const Deck& deck, const GridT& grid); private: @@ -95,8 +92,7 @@ namespace Opm { void unscaledEndPointsCheck_(const EclipseState& eclState); template - void scaledEndPointsCheck_(const Deck& deck, - const EclipseState& eclState, + void scaledEndPointsCheck_(const EclipseState& eclState, const GridT& grid); ///For every table, need to deal with case by case. diff --git a/opm/core/props/satfunc/RelpermDiagnostics_impl.hpp b/opm/core/props/satfunc/RelpermDiagnostics_impl.hpp index e2d7c2e4c..f4f602a45 100644 --- a/opm/core/props/satfunc/RelpermDiagnostics_impl.hpp +++ b/opm/core/props/satfunc/RelpermDiagnostics_impl.hpp @@ -33,7 +33,6 @@ namespace Opm { template void RelpermDiagnostics::diagnosis(const Opm::EclipseState& eclState, - const Opm::Deck& deck, const GridT& grid) { OpmLog::info("\n===============Saturation Functions Diagnostics===============\n"); @@ -41,12 +40,11 @@ namespace Opm { satFamilyCheck_(eclState); tableCheck_(eclState); unscaledEndPointsCheck_(eclState); - scaledEndPointsCheck_(deck, eclState, grid); + scaledEndPointsCheck_(eclState, grid); } template - void RelpermDiagnostics::scaledEndPointsCheck_(const Deck& deck, - const EclipseState& eclState, + void RelpermDiagnostics::scaledEndPointsCheck_(const EclipseState& eclState, const GridT& grid) { // All end points are subject to round-off errors, checks should account for it diff --git a/opm/simulators/flow/FlowMainEbos.hpp b/opm/simulators/flow/FlowMainEbos.hpp index 30cd0ba17..308982de8 100644 --- a/opm/simulators/flow/FlowMainEbos.hpp +++ b/opm/simulators/flow/FlowMainEbos.hpp @@ -454,7 +454,7 @@ namespace Opm this->grid().switchToGlobalView(); static_cast(this->eclState()).switchToGlobalProps(); } - diagnostic.diagnosis(eclState(), deck(), this->grid()); + diagnostic.diagnosis(eclState(), this->grid()); if (mpi_size_ > 1) { this->grid().switchToDistributedView(); static_cast(this->eclState()).switchToDistributedProps(); diff --git a/tests/test_relpermdiagnostics.cpp b/tests/test_relpermdiagnostics.cpp index ae1a37a2b..d74e77b2a 100644 --- a/tests/test_relpermdiagnostics.cpp +++ b/tests/test_relpermdiagnostics.cpp @@ -53,7 +53,7 @@ BOOST_AUTO_TEST_CASE(diagnosis) std::shared_ptr counterLog = std::make_shared(Log::DefaultMessageTypes); OpmLog::addBackend( "COUNTERLOG" , counterLog ); RelpermDiagnostics diagnostics; - diagnostics.diagnosis(eclState, deck, grid); + diagnostics.diagnosis(eclState, grid); BOOST_CHECK_EQUAL(1, counterLog->numMessages(Log::MessageType::Warning)); } BOOST_AUTO_TEST_SUITE_END()