Compare commits
12 Commits
master
...
release/20
Author | SHA1 | Date | |
---|---|---|---|
|
3ecf6db2e0 | ||
|
0a3557a727 | ||
|
bf823a4fd4 | ||
|
74b4287b6e | ||
|
b99dc9b5ec | ||
|
fbfeba9b2e | ||
|
3448c9c4ec | ||
|
4bb23ecf5a | ||
|
2ba39f875c | ||
|
705930a5ca | ||
|
465a3447c7 | ||
|
a1080f8361 |
@ -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)
|
||||
|
@ -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}"
|
||||
|
@ -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
|
||||
|
@ -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 > },
|
||||
|
@ -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}";
|
||||
|
Loading…
Reference in New Issue
Block a user