diff --git a/CMakeLists.txt b/CMakeLists.txt index a082cc05a..49c944bf3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,11 @@ set(OPM_MACROS_ROOT ${PROJECT_SOURCE_DIR}) option(ENABLE_ECL_INPUT "Enable eclipse input support?" ON) option(ENABLE_ECL_OUTPUT "Enable eclipse output support?" ON) option(ENABLE_MOCKSIM "Build the mock simulator for io testing" ON) +option(ENABLE_WELL_TEST "Enable testing of well code when building Schedule object" OFF) + +if (ENABLE_WELL_TEST) + add_definitions(-DWELL_TEST) +endif() # Output implies input if(ENABLE_ECL_OUTPUT) diff --git a/opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp b/opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp index 53f557b22..1bee0e1b6 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp +++ b/opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp @@ -257,6 +257,9 @@ namespace Opm static double convertInjectionRateToSI(double rawRate, Phase wellPhase, const Opm::UnitSystem &unitSystem); static bool convertEclipseStringToBool(const std::string& eclipseString); +#ifdef CHECK_WELLS + bool checkWells(const ParseContext& parseContext, ErrorGuard& errors) const; +#endif }; } diff --git a/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp b/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp index e71f9ffc7..d89fdf097 100644 --- a/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp +++ b/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp @@ -104,6 +104,11 @@ namespace Opm { if (Section::hasSCHEDULE(deck)) iterateScheduleSection( parseContext, errors, SCHEDULESection( deck ), grid, eclipseProperties ); + +#ifdef CHECK_WELLS + checkWells(parseContext, errors); +#endif + } @@ -2214,5 +2219,10 @@ namespace Opm { } -} +#ifdef CHECK_WELLS + bool checkWells(const ParseContext& parseContext, ErrorGuard& errors) const { + return true; + } +#endif +}