Compare commits

...

8 Commits

Author SHA1 Message Date
Arne Morten Kvarving
0a1691fbba bump to final 2021-05-04 10:08:35 +02:00
Arne Morten Kvarving
049394497b bump packaging versions 2021-04-27 09:55:02 +02:00
Arne Morten Kvarving
ca27588d5a fix cherry-picking error 2021-04-26 14:44:58 +02:00
Arne Morten Kvarving
678676484b fixed: missing member initialization
if deck has no rockcomp keyword, variable is not written
2021-04-26 13:35:03 +02:00
Joakim Hove
1415d849de Merge pull request #2434 from akva2/fix_serialize_valgrind
Fix some valgrind errors in test_ParallelRestart
2021-04-26 12:42:45 +02:00
Tor Harald Sandve
7f24108d09 Raise OPM Version to 2021.04-rc2 2021-04-20 10:30:59 +02:00
Bård Skaflestad
bcc96eda2c Merge pull request #2432 from goncalvesmachadoc/welltemp_output
Fix Well Temperature Output
2021-04-19 08:37:29 +02:00
Joakim Hove
75b81a16a5 Merge pull request #2429 from blattms/fix-compile-g++10.2
Include stdexcept header to fix compilation with g++-10
2021-04-19 08:37:23 +02:00
9 changed files with 19 additions and 12 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
opm-common (2019.04-pre~xenial) xenial; urgency=medium
opm-common (2021.04-rfinal-1~bionic) bionic; urgency=medium
* New release

View File

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

View File

@ -197,7 +197,7 @@ namespace Opm {
private:
constexpr static std::size_t numvals = 5;
std::array<double, numvals> values_;
std::array<double, numvals> values_ = {0};
std::size_t index(const Value ix) const
{

View File

@ -30,6 +30,7 @@
#include <optional>
#include <array>
#include <algorithm>
#include <stdexcept>
namespace Opm
{

View File

@ -398,7 +398,7 @@ namespace Opm
pack_map<K,T>(value_list, index_list);
serializer.vector(value_list);
serializer.template vector<std::size_t, false>(index_list);
serializer(index_list);
if (!serializer.isSerializing())
unpack_map<K,T>(value_list, index_list);
@ -419,7 +419,8 @@ namespace Opm
for (const auto& key : key_list) {
auto& value = current_map.get_ptr(key);
if (value) {
if (!(*value == current_value[key])) {
auto it = current_value.find(key);
if (it == current_value.end() || !(*value == it->second)) {
value_list.push_back( *value );
index_list.push_back( index );

View File

@ -5,7 +5,7 @@
%define tag final
Name: opm-common
Version: 2018.10
Version: 2021.04
Release: 0
Summary: Open Porous Media - common helpers and buildsystem
License: GPL-3.0

View File

@ -926,6 +926,7 @@ quantity roew(const fn_args& args) {
return { oil_prod / args.initial_inplace.get( region_name, Opm::Inplace::Phase::OIL, args.num ) , measure::identity };
}
template< bool injection = true>
inline quantity temperature( const fn_args& args ) {
const quantity zero = { 0, measure::temperature };
if (args.schedule_wells.empty())
@ -933,7 +934,8 @@ inline quantity temperature( const fn_args& args ) {
const auto p = args.wells.find(args.schedule_wells.front().name());
if ((p == args.wells.end()) ||
(p->second.dynamicStatus == Opm::Well::Status::SHUT))
(p->second.dynamicStatus == Opm::Well::Status::SHUT) ||
(p->second.current_control.isProducer == injection))
{
return zero;
}
@ -1510,8 +1512,8 @@ static const std::unordered_map< std::string, ofun > funs = {
{ "WBHP", bhp },
{ "WTHP", thp },
{ "WTPCHEA", temperature},
{ "WTICHEA", temperature},
{ "WTPCHEA", temperature< producer >},
{ "WTICHEA", temperature< injector >},
{ "WVPRT", res_vol_production_target },
{ "WMCTL", well_control_mode },

View File

@ -210,6 +210,7 @@ Schedule::Schedule(const Deck& deck, const EclipseState& es, const std::optional
result.m_static = ScheduleStatic::serializeObject();
result.snapshots = { ScheduleState::serializeObject() };
result.m_sched_deck = ScheduleDeck::serializeObject();
return result;
}

View File

@ -142,9 +142,11 @@ const KeywordLocation& ScheduleBlock::location() const {
ScheduleBlock ScheduleBlock::serializeObject() {
ScheduleBlock block;
block.m_time_type = ScheduleTimeType::TSTEP;
block.m_start_time = TimeService::from_time_t( asTimeT( TimeStampUTC( 2003, 10, 10 )));
block.m_end_time = TimeService::from_time_t( asTimeT( TimeStampUTC( 1993, 07, 06 )));
block.m_location = KeywordLocation{ "Dummy", "File", 123 };
block.m_location = KeywordLocation::serializeObject();
block.m_keywords = {DeckKeyword::serializeObject()};
return block;
}
@ -324,7 +326,7 @@ ScheduleDeck ScheduleDeck::serializeObject() {
ScheduleDeck deck;
deck.m_restart_time = TimeService::from_time_t( asTimeT( TimeStampUTC( 2013, 12, 12 )));
deck.m_restart_offset = 123;
deck.m_location = KeywordLocation{ "Deck", "DeckFile", 321 };
deck.m_location = KeywordLocation::serializeObject();
deck.m_blocks = { ScheduleBlock::serializeObject(), ScheduleBlock::serializeObject() };
return deck;
}