Compare commits

...

12 Commits

Author SHA1 Message Date
Bård Skaflestad
3ecf6db2e0 Raise OPM Version to 2020.10 Final 2020-11-17 13:52:05 +01:00
Bård Skaflestad
0a3557a727 Raise OPM Version to 2020.10-rc5 2020-11-06 11:28:43 +01:00
Bård Skaflestad
bf823a4fd4
Merge pull request #2094 from OPM/backport-of-pr-2093
workaround cmake issue
2020-11-06 11:26:05 +01:00
Arne Morten Kvarving
74b4287b6e workaround cmake issue
cmake does not properly interpret the SYSTEM marker in lists of
include directories. this causes issues downstream when using
dunecontrol / the in-tree cmake config files.
2020-11-06 11:23:10 +01:00
Bård Skaflestad
b99dc9b5ec Raise OPM Version to 2020.10-rc4 2020-10-30 17:16:52 +01:00
Bård Skaflestad
fbfeba9b2e Raise OPM Version to 2020.10-rc3 2020-10-29 23:38:57 +01:00
Bård Skaflestad
3448c9c4ec
Merge pull request #2061 from OPM/backport-of-pr-2038
[cmake] Use scotch include dir for parmetis bindings of scotch.
2020-10-28 13:57:42 +01:00
Markus Blatt
4bb23ecf5a [cmake] Use scotch include dir for parmetis bindings of scotch.
The parmetis.h distributed via the parmetis binding of scotch
with Ubuntu 18.04 (libscotchparmetis-dev) includes the header
scotch.h located in /usr/include/scotch/. Therefore our check
of the include file failed. With this commit we check the
parmetis.h header another time with the scotch include path added.
Now parmetis is found on my Ubuntu.
2020-10-28 13:48:57 +01:00
Bård Skaflestad
2ba39f875c
Merge pull request #2057 from OPM/summary-bugfixes
Summary bugfixes
2020-10-27 14:30:29 +01:00
Bård Skaflestad
705930a5ca Don't Treat WPIL as Completion Keyword
WPIL is the productivity index of liquid (water + oil).
2020-10-27 10:12:13 +01:00
Joakim Hove
465a3447c7 Summary function glir should sum over all argument wells 2020-10-27 10:11:20 +01:00
Bård Skaflestad
a1080f8361 Bump version to 2020.10-rc1 2020-10-19 10:29:03 +02:00
5 changed files with 39 additions and 21 deletions

View File

@ -76,8 +76,9 @@ macro (config_hook)
# For this project
add_definitions(-DFMT_HEADER_ONLY)
list(APPEND EXTRA_INCLUDES SYSTEM ${PROJECT_SOURCE_DIR}/external/fmtlib/include)
include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/external/fmtlib/include)
include_directories(${EXTRA_INCLUDES} ${PROJECT_BINARY_DIR}/include)
list(APPEND EXTRA_INCLUDES ${PROJECT_SOURCE_DIR}/external/fmtlib/include)
# For downstreams
list(APPEND EXTRA_INCLUDES ${PROJECT_BINARY_DIR}/include)

View File

@ -60,6 +60,19 @@ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${MPI_C_COMPILE_FLAGS}")
include(CheckIncludeFile)
check_include_file(parmetis.h PARMETIS_FOUND)
if(NOT PARMETIS_FOUND)
# If we are using the ParMETIS bindings of PTScotch, we need
# to use the scotch include path as partmetis.h includes scotch.h
find_package(PTScotch)
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${PTSCOTCH_INCLUDE_DIR})
unset(PARMETIS_FOUND CACHE) # force recheck of include file
check_include_file(parmetis.h PARMETIS_FOUND)
if(PARMETIS_FOUND)
set(PARMETIS_SCOTCH_INCLUDE_DIRS ${PTSCOTCH_INCLUDE_DIRS})
endif()
endif()
_search_parmetis_lib(PARMETIS_LIBRARY parmetis "The main ParMETIS library.")
# behave like a CMake module is supposed to behave
@ -77,7 +90,7 @@ find_package_handle_standard_args(
cmake_pop_check_state()
if(PARMETIS_FOUND)
set(PARMETIS_INCLUDE_DIRS ${PARMETIS_INCLUDE_DIR})
set(PARMETIS_INCLUDE_DIRS ${PARMETIS_INCLUDE_DIR} ${PARMETIS_SCOTCH_INCLUDE_DIRS})
set(PARMETIS_LIBRARIES ${PARMETIS_LIBRARY} ${METIS_LIBRARIES} ${MPI_C_LIBRARIES}
CACHE FILEPATH "All libraries needed to link programs using ParMETIS")
set(PARMETIS_LINK_FLAGS "${DUNE_C_LINK_FLAGS}"

View File

@ -5,8 +5,8 @@
Module: opm-common
Description: Open Porous Media Initiative shared infrastructure
Version: 2020.10-pre
Label: 2020.10-pre
Version: 2020.10
Label: 2020.10
Maintainer: opm@opm-project.org
MaintainerName: OPM community
Url: http://opm-project.org

View File

@ -468,21 +468,21 @@ double efac( const std::vector<std::pair<std::string,double>>& eff_factors, cons
return (it != eff_factors.end()) ? it->second : 1;
}
inline quantity alqrate( const fn_args& args ) {
const quantity zero = { 0.0, measure::gas_surface_rate };
/*
This is bit dangerous, exactly how the ALQ value should be interpreted varies
between the different VFP tables. The code here assumes - without checking -
that it represents gas lift rate.
*/
inline quantity glir( const fn_args& args ) {
double alq_rate = 0;
if (args.schedule_wells.empty()) {
// No wells. Before simulation starts?
return zero;
for (const auto& well : args.schedule_wells) {
auto xwPos = args.wells.find(well.name());
if (xwPos != args.wells.end())
alq_rate += xwPos->second.rates.get(rt::alq, 0.0);
}
const auto& well = args.schedule_wells.front();
auto xwPos = args.wells.find(well.name());
if (xwPos == args.wells.end()) {
return zero;
}
return { xwPos->second.rates.get(rt::alq, 0.0), measure::gas_surface_rate };
return { alq_rate, measure::gas_surface_rate };
}
template< rt phase, bool injection = true >
@ -1044,7 +1044,7 @@ static const std::unordered_map< std::string, ofun > funs = {
{ "WOPR", rate< rt::oil, producer > },
{ "WGPR", rate< rt::gas, producer > },
{ "WEPR", rate< rt::energy, producer > },
{ "WGLIR", alqrate },
{ "WGLIR", glir },
{ "WNPR", rate< rt::solvent, producer > },
{ "WCPR", rate< rt::polymer, producer > },
{ "WSPR", rate< rt::brine, producer > },
@ -1126,7 +1126,7 @@ static const std::unordered_map< std::string, ofun > funs = {
{ "GWPR", rate< rt::wat, producer > },
{ "GOPR", rate< rt::oil, producer > },
{ "GGPR", rate< rt::gas, producer > },
{ "GGLIR", alqrate },
{ "GGLIR", glir },
{ "GNPR", rate< rt::solvent, producer > },
{ "GCPR", rate< rt::polymer, producer > },
{ "GSPR", rate< rt::brine, producer > },
@ -1280,7 +1280,7 @@ static const std::unordered_map< std::string, ofun > funs = {
{ "FWPR", rate< rt::wat, producer > },
{ "FOPR", rate< rt::oil, producer > },
{ "FGPR", rate< rt::gas, producer > },
{ "FGLIR", alqrate },
{ "FGLIR", glir },
{ "FNPR", rate< rt::solvent, producer > },
{ "FCPR", rate< rt::polymer, producer > },
{ "FSPR", rate< rt::brine, producer > },

View File

@ -255,6 +255,10 @@ namespace {
|| is_in_set(countkw, keyword.substr(1));
}
bool is_liquid_phase(const std::string& keyword) {
return keyword == "WPIL";
}
bool is_region_to_region(const std::string& keyword) {
using sz_t = std::string::size_type;
if ((keyword.size() == sz_t{3}) && keyword[2] == 'F') return true;
@ -424,14 +428,14 @@ inline void keywordW( SummaryConfig::keyword_list& list,
Two step check for whether to discard this keyword as unsupported:
1. Completion quantity keywords are currently not supported. These are
well summary keywords, apart from "WMCTL", that end in 'L'.
well summary keywords, apart from "WMCTL" and "WPIL", that end in 'L'.
2. If the keyword is a UDQ keyword there is no convention enforced to
the last character, and in that case it is treated as a normal well
keyword anyways.
*/
if (keyword.name().back() == 'L') {
if (! (is_control_mode(keyword.name()) || is_udq(keyword.name()))) {
if (! (is_control_mode(keyword.name()) || is_liquid_phase(keyword.name()) || is_udq(keyword.name()))) {
const auto& location = keyword.location();
std::string msg = "Unsupported summary output keyword {}\n"
"In {file} line {line}";