From 40bd7b86b08fa8d4d23633235634109f512f7c14 Mon Sep 17 00:00:00 2001 From: Joakim Hove Date: Thu, 21 Feb 2019 11:49:33 +0100 Subject: [PATCH] Renamed UDQ -> UDQInput --- CMakeLists_files.cmake | 6 +++--- .../eclipse/EclipseState/Schedule/Schedule.hpp | 6 +++--- .../Schedule/UDQ/{UDQ.hpp => UDQInput.hpp} | 7 ++++--- src/opm/output/eclipse/Summary.cpp | 6 +++--- .../eclipse/EclipseState/Schedule/Schedule.cpp | 8 ++++---- .../Schedule/UDQ/{UDQ.cpp => UDQInput.cpp} | 12 ++++++------ tests/parser/UDQTests.cpp | 2 +- 7 files changed, 24 insertions(+), 23 deletions(-) rename opm/parser/eclipse/EclipseState/Schedule/UDQ/{UDQ.hpp => UDQInput.hpp} (95%) rename src/opm/parser/eclipse/EclipseState/Schedule/UDQ/{UDQ.cpp => UDQInput.cpp} (84%) diff --git a/CMakeLists_files.cmake b/CMakeLists_files.cmake index 12506e23a..f9a0410bd 100644 --- a/CMakeLists_files.cmake +++ b/CMakeLists_files.cmake @@ -127,8 +127,8 @@ if(ENABLE_ECL_INPUT) src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQParams.cpp src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQSet.cpp src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQWellSet.cpp - src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQ.cpp src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQAssign.cpp + src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQInput.cpp src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQContext.cpp src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQExpression.cpp src/opm/parser/eclipse/EclipseState/Schedule/VFPInjTable.cpp @@ -515,9 +515,9 @@ if(ENABLE_ECL_INPUT) opm/parser/eclipse/EclipseState/Runspec.hpp opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQAssign.hpp opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQContext.hpp - opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQ.hpp + opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQInput.hpp opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQParams.hpp - opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQ.hpp + opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQInput.hpp opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQWellSet.hpp opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQSet.hpp opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQExpression.hpp diff --git a/opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp b/opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp index 56eb8ee80..94ec425d6 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp +++ b/opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp @@ -59,7 +59,7 @@ namespace Opm class UnitSystem; class ErrorGuard; class WListManager; - class UDQ; + class UDQInput; class Schedule { public: @@ -137,7 +137,7 @@ namespace Opm const WellTestConfig& wtestConfig(size_t timestep) const; const WListManager& getWListManager(size_t timeStep) const; - const UDQ& getUDQConfig(size_t timeStep) const; + const UDQInput& getUDQConfig(size_t timeStep) const; const Actions& actions() const; void evalAction(const SummaryState& summary_state, size_t timeStep); @@ -182,7 +182,7 @@ namespace Opm std::map>> vfpinj_tables; DynamicState> wtest_config; DynamicState> wlist_manager; - DynamicState> udq_config; + DynamicState> udq_config; WellProducer::ControlModeEnum m_controlModeWHISTCTL; Actions m_actions; diff --git a/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQ.hpp b/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQInput.hpp similarity index 95% rename from opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQ.hpp rename to opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQInput.hpp index 61623c563..977f6d576 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQ.hpp +++ b/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQInput.hpp @@ -18,8 +18,8 @@ */ -#ifndef UDQState_HPP_ -#define UDQState_HPP_ +#ifndef UDQINPUT_HPP_ +#define UDQINPUT_HPP_ #include #include @@ -30,7 +30,8 @@ namespace Opm { - class UDQ{ + + class UDQInput { public: void add_record(const DeckRecord& record); const std::vector& expressions() const noexcept; diff --git a/src/opm/output/eclipse/Summary.cpp b/src/opm/output/eclipse/Summary.cpp index 8b374be77..a77e428f9 100644 --- a/src/opm/output/eclipse/Summary.cpp +++ b/src/opm/output/eclipse/Summary.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include @@ -1119,7 +1119,7 @@ bool is_udq(const std::string& keyword) { return (keyword.size() > 1 && keyword[1] == 'U'); } -void eval_udq(const UDQ& udq, const UDQContext& context, SummaryState& st) +void eval_udq(const UDQInput& udq, const UDQContext& context, SummaryState& st) { } @@ -1489,7 +1489,7 @@ void Summary::add_timestep( int report_step, { UDQContext udq_context(st); - const UDQ& udq = schedule.getUDQConfig(sim_step); + const UDQInput& udq = schedule.getUDQConfig(sim_step); eval_udq(udq, udq_context, st); } { diff --git a/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp b/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp index 6c348893c..1eead5f35 100644 --- a/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp +++ b/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp @@ -49,7 +49,7 @@ #include #include -#include +#include #include #include #include @@ -83,7 +83,7 @@ namespace Opm { m_runspec( runspec ), wtest_config(this->m_timeMap, std::make_shared() ), wlist_manager( this->m_timeMap, std::make_shared()), - udq_config(this->m_timeMap, std::make_shared()) + udq_config(this->m_timeMap, std::make_shared()) { m_controlModeWHISTCTL = WellProducer::CMODE_UNDEFINED; addGroup( "FIELD", 0 ); @@ -943,7 +943,7 @@ namespace Opm { void Schedule::handleUDQ(const DeckKeyword& keyword, size_t currentStep) { const auto& current = *this->udq_config.get(currentStep); - std::shared_ptr new_udq = std::make_shared(current); + std::shared_ptr new_udq = std::make_shared(current); for (const auto& record : keyword) new_udq->add_record(record); @@ -2163,7 +2163,7 @@ namespace Opm { return *ptr; } - const UDQ& Schedule::getUDQConfig(size_t timeStep) const { + const UDQInput& Schedule::getUDQConfig(size_t timeStep) const { const auto& ptr = this->udq_config.get(timeStep); return *ptr; } diff --git a/src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQ.cpp b/src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQInput.cpp similarity index 84% rename from src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQ.cpp rename to src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQInput.cpp index 0db3f0fc0..1f98e9b99 100644 --- a/src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQ.cpp +++ b/src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQInput.cpp @@ -18,7 +18,7 @@ */ #include -#include +#include namespace Opm { @@ -33,7 +33,7 @@ namespace Opm { } - void UDQ::add_record(const DeckRecord& record) { + void UDQInput::add_record(const DeckRecord& record) { auto action = UDQExpression::actionString2Enum(record.getItem("ACTION").get(0)); const auto& quantity = record.getItem("QUANTITY").get(0); const auto& data = record.getItem("DATA").getData(); @@ -49,17 +49,17 @@ namespace Opm { } - const std::vector& UDQ::expressions() const noexcept { + const std::vector& UDQInput::expressions() const noexcept { return this->m_expressions; } - const std::vector& UDQ::assignments() const { + const std::vector& UDQInput::assignments() const { return this->m_assignments; } - const std::string& UDQ::unit(const std::string& key) const { + const std::string& UDQInput::unit(const std::string& key) const { const auto pair_ptr = this->units.find(key); if (pair_ptr == this->units.end()) throw std::invalid_argument("No such UDQ quantity: " + key); @@ -68,7 +68,7 @@ namespace Opm { } - void UDQ::assign_unit(const std::string& keyword, const std::string& quoted_unit) { + void UDQInput::assign_unit(const std::string& keyword, const std::string& quoted_unit) { const std::string unit = strip_quotes(quoted_unit); const auto pair_ptr = this->units.find(keyword); if (pair_ptr != this->units.end()) { diff --git a/tests/parser/UDQTests.cpp b/tests/parser/UDQTests.cpp index 7e27796b8..647fd554f 100644 --- a/tests/parser/UDQTests.cpp +++ b/tests/parser/UDQTests.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include