Add optional code for well testing

This commit is contained in:
Joakim Hove 2019-03-17 21:03:47 +01:00
parent fa77187871
commit c910a51359
3 changed files with 19 additions and 1 deletions

View File

@ -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)

View File

@ -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
};
}

View File

@ -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
}