Restart: Save/Restore Historical Cumulative Production

This commit adds support for saving and restoring cumulative
production quantities like WOPTH, GWPTH, FGPTH, GGITH, and WWITH.
While here, also cater to the case of wells alternating between
injecting gas and injecting water.  This means that we'll save and
restore cumulative gas/water injection for all injectors,
irrespective of current injecting phase.

Update unit tests accordingly.
This commit is contained in:
Bård Skaflestad 2019-01-22 19:00:46 +01:00
parent 169ec76605
commit e685eccdc9
10 changed files with 310 additions and 73 deletions

View File

@ -89,12 +89,16 @@ namespace Opm { namespace RestartIO { namespace Helpers {
const std::vector<std::string> restart_group_keys = {"GOPP", "GWPP", "GOPR", "GWPR", "GGPR", const std::vector<std::string> restart_group_keys = {"GOPP", "GWPP", "GOPR", "GWPR", "GGPR",
"GVPR", "GWIR", "GGIR", "GWCT", "GGOR", "GVPR", "GWIR", "GGIR", "GWCT", "GGOR",
"GOPT", "GWPT", "GGPT", "GVPT", "GWIT", "GOPT", "GWPT", "GGPT", "GVPT", "GWIT",
"GGIT"}; "GGIT",
"GOPTH", "GWPTH", "GGPTH",
"GWITH", "GGITH"};
const std::vector<std::string> restart_field_keys = {"FOPP", "FWPP", "FOPR", "FWPR", "FGPR", const std::vector<std::string> restart_field_keys = {"FOPP", "FWPP", "FOPR", "FWPR", "FGPR",
"FVPR", "FWIR", "FGIR", "FWCT", "FGOR", "FVPR", "FWIR", "FGIR", "FWCT", "FGOR",
"FOPT", "FWPT", "FGPT", "FVPT", "FWIT", "FOPT", "FWPT", "FGPT", "FVPT", "FWIT",
"FGIT"}; "FGIT",
"FOPTH", "FWPTH", "FGPTH",
"FWITH", "FGITH"};
const std::map<std::string, size_t> groupKeyToIndex = { const std::map<std::string, size_t> groupKeyToIndex = {
{"GOPR", 0}, {"GOPR", 0},
@ -113,6 +117,11 @@ namespace Opm { namespace RestartIO { namespace Helpers {
{"GGIT", 16}, {"GGIT", 16},
{"GOPP", 22}, {"GOPP", 22},
{"GWPP", 23}, {"GWPP", 23},
{"GOPTH", 135},
{"GWPTH", 139},
{"GWITH", 140},
{"GGPTH", 143},
{"GGITH", 144},
}; };
const std::map<std::string, size_t> fieldKeyToIndex = { const std::map<std::string, size_t> fieldKeyToIndex = {
@ -132,6 +141,11 @@ namespace Opm { namespace RestartIO { namespace Helpers {
{"FGIT", 16}, {"FGIT", 16},
{"FOPP", 22}, {"FOPP", 22},
{"FWPP", 23}, {"FWPP", 23},
{"FOPTH", 135},
{"FWPTH", 139},
{"FWITH", 140},
{"FGPTH", 143},
{"FGITH", 144},
}; };
private: private:

View File

@ -48,6 +48,17 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
OilPrPot = 22, // Group's oil production potential OilPrPot = 22, // Group's oil production potential
WatPrPot = 23, // Group's water production potential WatPrPot = 23, // Group's water production potential
HistOilPrTotal = 135, // Group's total cumulative oil
// production (observed/historical rates)
HistWatPrTotal = 139, // Group's total cumulative water
// production (observed/historical rates)
HistWatInjTotal = 140, // Group's total cumulative water
// injection (observed/historical rates)
HistGasPrTotal = 143, // Group's total cumulative gas
// production (observed/historical rates)
HistGasInjTotal = 144, // Group's total cumulative gas injection
// (observed/historical rates)
}; };
} // XGroup } // XGroup

View File

@ -116,10 +116,15 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
BHPTarget = 6, // Well's bottom hole pressure target BHPTarget = 6, // Well's bottom hole pressure target
DatumDepth = 9, // Well's reference depth for BHP DatumDepth = 9, // Well's reference depth for BHP
LiqRateTarget_2 = 33, //Well's liquid rate target/limit for a well on WCONINJH control or for a producer
GasRateTarget_2 = 54, //Well's gas rate target/limit for a well on WCONINJH control or for producer
BHPTarget_2 = 55, //Well's bottom hole pressure target/limit
HistLiqRateTarget = 33, // Well's historical/observed liquid
// rate target/limit
HistGasRateTarget = 54, // Well's historical/observed gas rate
// target/limit
HistBHPTarget = 55, // Well's historical/observed bottom
// hole pressure target/limit
}; };
} // SWell } // SWell
@ -151,8 +156,17 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
BHPTarget = 41, // Well's current BHP Target/Limit BHPTarget = 41, // Well's current BHP Target/Limit
item82 = 81, // Unknown HistOilPrTotal = 75, // Well's total cumulative oil production
item83 = 82, // Unknown // (observed/historical rates)
HistWatPrTotal = 76, // Well's total cumulative water
// production (observed/historical rates)
HistGasPrTotal = 77, // Well's total cumulative gas production
// (observed(historical rates)
HistWatInjTotal = 81, // Well's total cumulative water injection
// (observed/historical rates)
HistGasInjTotal = 82, // Well's total cumulative gas injection
// (observed/historical rates)
WatVoidPrRate = 122, // Well's voidage production rate WatVoidPrRate = 122, // Well's voidage production rate
GasVoidPrRate = 123, // Well's voidage production rate GasVoidPrRate = 123, // Well's voidage production rate

View File

@ -381,7 +381,8 @@ namespace {
for (const auto& key : keys) { for (const auto& key : keys) {
if ((key[3] == 'T') && ((key[2] == 'I') || (key[2] == 'P'))) { if ((key[3] == 'T') && ((key[2] == 'I') || (key[2] == 'P'))) {
// Don't write cumulative quantities in case of // Don't write cumulative quantities in case of OPM
// extended restart files.
continue; continue;
} }
@ -424,7 +425,7 @@ namespace {
}*/ }*/
} }
} }
} } // XGrp
namespace ZGrp { namespace ZGrp {
std::size_t entriesPerGroup(const std::vector<int>& inteHead) std::size_t entriesPerGroup(const std::vector<int>& inteHead)
@ -447,7 +448,7 @@ namespace {
WV::WindowSize{ entriesPerGroup(inteHead) } WV::WindowSize{ entriesPerGroup(inteHead) }
}; };
} }
} } // ZGrp
} // Anonymous } // Anonymous
void void

View File

@ -30,7 +30,6 @@
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp> #include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/ScheduleEnums.hpp> #include <opm/parser/eclipse/EclipseState/Schedule/ScheduleEnums.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Well.hpp> #include <opm/parser/eclipse/EclipseState/Schedule/Well.hpp>
//#include <opm/output/data/Wells.hpp>
#include <opm/parser/eclipse/Units/UnitSystem.hpp> #include <opm/parser/eclipse/Units/UnitSystem.hpp>
#include <opm/parser/eclipse/Units/Units.hpp> #include <opm/parser/eclipse/Units/Units.hpp>
@ -511,13 +510,13 @@ namespace {
if ((pp.GasRate != 0.0) || (!predMode)) { if ((pp.GasRate != 0.0) || (!predMode)) {
sWell[Ix::GasRateTarget] = sWell[Ix::GasRateTarget] =
swprop(M::gas_surface_rate, pp.GasRate); swprop(M::gas_surface_rate, pp.GasRate);
sWell[Ix::GasRateTarget_2] = sWell[Ix::GasRateTarget]; sWell[Ix::HistGasRateTarget] = sWell[Ix::GasRateTarget];
} }
if (pp.LiquidRate != 0.0 || (!predMode)) { if (pp.LiquidRate != 0.0 || (!predMode)) {
sWell[Ix::LiqRateTarget] = sWell[Ix::LiqRateTarget] =
swprop(M::liquid_surface_rate, pp.LiquidRate); swprop(M::liquid_surface_rate, pp.LiquidRate);
sWell[Ix::LiqRateTarget_2] = sWell[Ix::LiqRateTarget]; sWell[Ix::HistLiqRateTarget] = sWell[Ix::LiqRateTarget];
} }
else { else {
sWell[Ix::LiqRateTarget] = sWell[Ix::LiqRateTarget] =
@ -542,7 +541,7 @@ namespace {
sWell[Ix::BHPTarget] = pp.BHPLimit != 0.0 sWell[Ix::BHPTarget] = pp.BHPLimit != 0.0
? swprop(M::pressure, pp.BHPLimit) ? swprop(M::pressure, pp.BHPLimit)
: swprop(M::pressure, 1.0*::Opm::unit::atm); : swprop(M::pressure, 1.0*::Opm::unit::atm);
sWell[Ix::BHPTarget_2] = sWell[Ix::BHPTarget]; sWell[Ix::HistBHPTarget] = sWell[Ix::BHPTarget];
} }
else if (well.isInjector(sim_step)) { else if (well.isInjector(sim_step)) {
const auto& ip = well.getInjectionProperties(sim_step); const auto& ip = well.getInjectionProperties(sim_step);
@ -552,15 +551,18 @@ namespace {
if (ip.hasInjectionControl(IP::RATE)) { if (ip.hasInjectionControl(IP::RATE)) {
if (ip.injectorType == IT::OIL) { if (ip.injectorType == IT::OIL) {
sWell[Ix::OilRateTarget] = swprop(M::liquid_surface_rate, ip.surfaceInjectionRate); sWell[Ix::OilRateTarget] =
swprop(M::liquid_surface_rate, ip.surfaceInjectionRate);
} }
if (ip.injectorType == IT::WATER) { if (ip.injectorType == IT::WATER) {
sWell[Ix::WatRateTarget] = swprop(M::liquid_surface_rate, ip.surfaceInjectionRate); sWell[Ix::WatRateTarget] =
sWell[Ix::LiqRateTarget_2] = sWell[Ix::WatRateTarget]; swprop(M::liquid_surface_rate, ip.surfaceInjectionRate);
sWell[Ix::HistLiqRateTarget] = sWell[Ix::WatRateTarget];
} }
if (ip.injectorType == IT::GAS) { if (ip.injectorType == IT::GAS) {
sWell[Ix::GasRateTarget] = swprop(M::gas_surface_rate, ip.surfaceInjectionRate); sWell[Ix::GasRateTarget] =
sWell[Ix::GasRateTarget_2] = sWell[Ix::GasRateTarget]; swprop(M::gas_surface_rate, ip.surfaceInjectionRate);
sWell[Ix::HistGasRateTarget] = sWell[Ix::GasRateTarget];
} }
} }
@ -575,7 +577,7 @@ namespace {
sWell[Ix::BHPTarget] = ip.hasInjectionControl(IP::BHP) sWell[Ix::BHPTarget] = ip.hasInjectionControl(IP::BHP)
? swprop(M::pressure, ip.BHPLimit) ? swprop(M::pressure, ip.BHPLimit)
: swprop(M::pressure, 1.0E05*::Opm::unit::psia); : swprop(M::pressure, 1.0E05*::Opm::unit::psia);
sWell[Ix::BHPTarget_2] = sWell[Ix::BHPTarget]; sWell[Ix::HistBHPTarget] = sWell[Ix::BHPTarget];
} }
sWell[Ix::DatumDepth] = sWell[Ix::DatumDepth] =
@ -653,9 +655,35 @@ namespace {
xWell[Ix::GasPrTotal] = get("WGPT"); xWell[Ix::GasPrTotal] = get("WGPT");
xWell[Ix::VoidPrTotal] = get("WVPT"); xWell[Ix::VoidPrTotal] = get("WVPT");
} }
// Not fully characterised. // Not fully characterised.
xWell[Ix::item37] = xWell[Ix::WatPrRate]; xWell[Ix::item37] = xWell[Ix::WatPrRate];
xWell[Ix::item38] = xWell[Ix::GasPrRate]; xWell[Ix::item38] = xWell[Ix::GasPrRate];
if (ecl_compatible_rst) {
xWell[Ix::HistOilPrTotal] = get("WOPTH");
xWell[Ix::HistWatPrTotal] = get("WWPTH");
xWell[Ix::HistGasPrTotal] = get("WGPTH");
}
}
template <class GetSummaryVector, class XWellArray>
void assignCommonInjector(GetSummaryVector& get,
const bool ecl_compatible_rst,
XWellArray& xWell)
{
using Ix = ::Opm::RestartIO::Helpers::VectorItems::XWell::index;
xWell[Ix::FlowBHP] = get("WBHP");
if (ecl_compatible_rst) {
// Note: Assign both water and gas cumulatives to support
// case of well alternating between injecting water and gas.
xWell[Ix::WatInjTotal] = get("WWIT");
xWell[Ix::GasInjTotal] = get("WGIT");
xWell[Ix::HistWatInjTotal] = get("WWITH");
xWell[Ix::HistGasInjTotal] = get("WGITH");
}
} }
template <class XWellArray> template <class XWellArray>
@ -673,19 +701,14 @@ namespace {
return smry.has(key) ? smry.get(key) : 0.0; return smry.has(key) ? smry.get(key) : 0.0;
}; };
// Injection rates reported as negative, cumulative assignCommonInjector(get, ecl_compatible_rst, xWell);
// totals as positive.
// Injection rates reported as negative.
xWell[Ix::WatPrRate] = -get("WWIR"); xWell[Ix::WatPrRate] = -get("WWIR");
xWell[Ix::LiqPrRate] = xWell[Ix::WatPrRate]; xWell[Ix::LiqPrRate] = xWell[Ix::WatPrRate];
xWell[Ix::FlowBHP] = get("WBHP"); // Not fully characterised.
if (ecl_compatible_rst) {
xWell[Ix::WatInjTotal] = get("WWIT");
}
xWell[Ix::item37] = xWell[Ix::WatPrRate]; xWell[Ix::item37] = xWell[Ix::WatPrRate];
xWell[Ix::item82] = xWell[Ix::WatInjTotal];
xWell[Ix::WatVoidPrRate] = -get("WWVIR"); xWell[Ix::WatVoidPrRate] = -get("WWVIR");
} }
@ -705,17 +728,12 @@ namespace {
return smry.has(key) ? smry.get(key) : 0.0; return smry.has(key) ? smry.get(key) : 0.0;
}; };
// Injection rates reported as negative production rates, assignCommonInjector(get, ecl_compatible_rst, xWell);
// cumulative injection totals as positive.
// Injection rates reported as negative production rates.
xWell[Ix::GasPrRate] = -get("WGIR"); xWell[Ix::GasPrRate] = -get("WGIR");
xWell[Ix::VoidPrRate] = -get("WGVIR"); xWell[Ix::VoidPrRate] = -get("WGVIR");
xWell[Ix::FlowBHP] = get("WBHP");
if (ecl_compatible_rst) {
xWell[Ix::GasInjTotal] = get("WGIT");
}
xWell[Ix::GasFVF] = (std::abs(xWell[Ix::GasPrRate]) > 0.0) xWell[Ix::GasFVF] = (std::abs(xWell[Ix::GasPrRate]) > 0.0)
? xWell[Ix::VoidPrRate] / xWell[Ix::GasPrRate] ? xWell[Ix::VoidPrRate] / xWell[Ix::GasPrRate]
: 0.0; : 0.0;
@ -724,7 +742,6 @@ namespace {
// Not fully characterised. // Not fully characterised.
xWell[Ix::item38] = xWell[Ix::GasPrRate]; xWell[Ix::item38] = xWell[Ix::GasPrRate];
xWell[Ix::item83] = xWell[Ix::GasInjTotal];
xWell[Ix::GasVoidPrRate] = xWell[Ix::VoidPrRate]; xWell[Ix::GasVoidPrRate] = xWell[Ix::VoidPrRate];
} }

View File

@ -1088,6 +1088,13 @@ namespace {
smry.add(key("WWIT"), xwel[VI::XWell::index::WatInjTotal]); smry.add(key("WWIT"), xwel[VI::XWell::index::WatInjTotal]);
smry.add(key("WGIT"), xwel[VI::XWell::index::GasInjTotal]); smry.add(key("WGIT"), xwel[VI::XWell::index::GasInjTotal]);
smry.add(key("WOPTH"), xwel[VI::XWell::index::HistOilPrTotal]);
smry.add(key("WWPTH"), xwel[VI::XWell::index::HistWatPrTotal]);
smry.add(key("WGPTH"), xwel[VI::XWell::index::HistGasPrTotal]);
smry.add(key("WWITH"), xwel[VI::XWell::index::HistWatInjTotal]);
smry.add(key("WGITH"), xwel[VI::XWell::index::HistGasInjTotal]);
} }
void assign_group_cumulatives(const std::string& group, void assign_group_cumulatives(const std::string& group,
@ -1118,6 +1125,12 @@ namespace {
smry.add(key("WIT"), xgrp[VI::XGroup::index::WatInjTotal]); smry.add(key("WIT"), xgrp[VI::XGroup::index::WatInjTotal]);
smry.add(key("GIT"), xgrp[VI::XGroup::index::GasInjTotal]); smry.add(key("GIT"), xgrp[VI::XGroup::index::GasInjTotal]);
smry.add(key("OPTH"), xgrp[VI::XGroup::index::HistOilPrTotal]);
smry.add(key("WPTH"), xgrp[VI::XGroup::index::HistWatPrTotal]);
smry.add(key("GPTH"), xgrp[VI::XGroup::index::HistGasPrTotal]);
smry.add(key("WITH"), xgrp[VI::XGroup::index::HistWatInjTotal]);
smry.add(key("GITH"), xgrp[VI::XGroup::index::HistGasInjTotal]);
} }
Opm::SummaryState Opm::SummaryState

View File

@ -65,6 +65,8 @@ namespace {
"WIR", "GIR", "WIR", "GIR",
"WIT", "GIT", "WIT", "GIT",
"WCT", "GOR", "WCT", "GOR",
"OPTH", "WPTH", "GPTH",
"WITH", "GITH",
}; };
} }

View File

@ -1,4 +1,5 @@
/* /*
Copyright 2019 Equinor
Copyright 2018 Statoil ASA Copyright 2018 Statoil ASA
This file is part of the Open Porous Media project (OPM). This file is part of the Open Porous Media project (OPM).
@ -232,6 +233,11 @@ TSTEP -- 8
state.add("WWCT:OP_1" , 0.625); state.add("WWCT:OP_1" , 0.625);
state.add("WGOR:OP_1" , 234.5); state.add("WGOR:OP_1" , 234.5);
state.add("WBHP:OP_1" , 314.15); state.add("WBHP:OP_1" , 314.15);
state.add("WOPTH:OP_1", 345.6);
state.add("WWPTH:OP_1", 456.7);
state.add("WGPTH:OP_1", 567.8);
state.add("WWITH:OP_1", 0.0);
state.add("WGITH:OP_1", 0.0);
state.add("WGVIR:OP_1", 0.0); state.add("WGVIR:OP_1", 0.0);
state.add("WWVIR:OP_1", 0.0); state.add("WWVIR:OP_1", 0.0);
@ -250,6 +256,11 @@ TSTEP -- 8
state.add("WWCT:OP_2" , 0.0); state.add("WWCT:OP_2" , 0.0);
state.add("WGOR:OP_2" , 0.0); state.add("WGOR:OP_2" , 0.0);
state.add("WBHP:OP_2" , 400.6); state.add("WBHP:OP_2" , 400.6);
state.add("WOPTH:OP_2", 0.0);
state.add("WWPTH:OP_2", 0.0);
state.add("WGPTH:OP_2", 0.0);
state.add("WWITH:OP_2", 1515.0);
state.add("WGITH:OP_2", 3030.0);
state.add("WGVIR:OP_2", 1234.0); state.add("WGVIR:OP_2", 1234.0);
state.add("WWVIR:OP_2", 4321.0); state.add("WWVIR:OP_2", 4321.0);
@ -268,6 +279,11 @@ TSTEP -- 8
state.add("WWCT:OP_3" , 0.0625); state.add("WWCT:OP_3" , 0.0625);
state.add("WGOR:OP_3" , 1234.5); state.add("WGOR:OP_3" , 1234.5);
state.add("WBHP:OP_3" , 314.15); state.add("WBHP:OP_3" , 314.15);
state.add("WOPTH:OP_3", 2345.6);
state.add("WWPTH:OP_3", 3456.7);
state.add("WGPTH:OP_3", 4567.8);
state.add("WWITH:OP_3", 0.0);
state.add("WGITH:OP_3", 0.0);
state.add("WGVIR:OP_3", 0.0); state.add("WGVIR:OP_3", 0.0);
state.add("WWVIR:OP_3", 43.21); state.add("WWVIR:OP_3", 43.21);
@ -570,8 +586,18 @@ BOOST_AUTO_TEST_CASE (Dynamic_Well_Data_Step1)
BOOST_CHECK_CLOSE(xwell[i0 + Ix::GasPrTotal], 30.0, 1.0e-10); BOOST_CHECK_CLOSE(xwell[i0 + Ix::GasPrTotal], 30.0, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i0 + Ix::VoidPrTotal], 40.0, 1.0e-10); BOOST_CHECK_CLOSE(xwell[i0 + Ix::VoidPrTotal], 40.0, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i0 + Ix::item37], xwell[i0 + Ix::WatPrRate], 1.0e-10); BOOST_CHECK_CLOSE(xwell[i0 + Ix::item37],
BOOST_CHECK_CLOSE(xwell[i0 + Ix::item38], xwell[i0 + Ix::GasPrRate], 1.0e-10); xwell[i0 + Ix::WatPrRate], 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i0 + Ix::item38],
xwell[i0 + Ix::GasPrRate], 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i0 + Ix::HistOilPrTotal], 345.6, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i0 + Ix::HistWatPrTotal], 456.7, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i0 + Ix::HistGasPrTotal], 567.8, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i0 + Ix::HistWatInjTotal], 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i0 + Ix::HistGasInjTotal], 0.0, 1.0e-10);
} }
// XWEL (OP_2) // XWEL (OP_2)
@ -585,6 +611,7 @@ BOOST_AUTO_TEST_CASE (Dynamic_Well_Data_Step1)
BOOST_CHECK_CLOSE(xwell[i1 + Ix::VoidPrRate], -1234.0, 1.0e-10); BOOST_CHECK_CLOSE(xwell[i1 + Ix::VoidPrRate], -1234.0, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i1 + Ix::FlowBHP], 400.6, 1.0e-10); BOOST_CHECK_CLOSE(xwell[i1 + Ix::FlowBHP], 400.6, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i1 + Ix::WatInjTotal], 1000.0, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i1 + Ix::GasInjTotal], 2000.0, 1.0e-10); BOOST_CHECK_CLOSE(xwell[i1 + Ix::GasInjTotal], 2000.0, 1.0e-10);
// Bg = VGIR / GIR = 1234.0 / 200.0 // Bg = VGIR / GIR = 1234.0 / 200.0
@ -593,11 +620,11 @@ BOOST_AUTO_TEST_CASE (Dynamic_Well_Data_Step1)
BOOST_CHECK_CLOSE(xwell[i1 + Ix::item38], BOOST_CHECK_CLOSE(xwell[i1 + Ix::item38],
xwell[i1 + Ix::GasPrRate], 1.0e-10); xwell[i1 + Ix::GasPrRate], 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i1 + Ix::item83], BOOST_CHECK_CLOSE(xwell[i1 + Ix::HistOilPrTotal] , 0.0, 1.0e-10);
xwell[i1 + Ix::GasInjTotal], 1.0e-10); BOOST_CHECK_CLOSE(xwell[i1 + Ix::HistWatPrTotal] , 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i1 + Ix::HistGasPrTotal] , 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i1 + Ix::GasVoidPrRate], BOOST_CHECK_CLOSE(xwell[i1 + Ix::HistWatInjTotal], 1515.0, 1.0e-10);
xwell[i1 + Ix::VoidPrRate], 1.0e-10); BOOST_CHECK_CLOSE(xwell[i1 + Ix::HistGasInjTotal], 3030.0, 1.0e-10);
} }
} }
@ -672,6 +699,10 @@ BOOST_AUTO_TEST_CASE (Dynamic_Well_Data_Step2)
BOOST_CHECK_CLOSE(xwell[i0 + Ix::item38], BOOST_CHECK_CLOSE(xwell[i0 + Ix::item38],
xwell[i0 + Ix::GasPrRate], 1.0e-10); xwell[i0 + Ix::GasPrRate], 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i0 + Ix::HistOilPrTotal], 345.6, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i0 + Ix::HistWatPrTotal], 456.7, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i0 + Ix::HistGasPrTotal], 567.8, 1.0e-10);
} }
// XWEL (OP_2) -- water injector // XWEL (OP_2) -- water injector
@ -690,14 +721,17 @@ BOOST_AUTO_TEST_CASE (Dynamic_Well_Data_Step2)
BOOST_CHECK_CLOSE(xwell[i1 + Ix::FlowBHP], 400.6, 1.0e-10); BOOST_CHECK_CLOSE(xwell[i1 + Ix::FlowBHP], 400.6, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i1 + Ix::WatInjTotal], 1000.0, 1.0e-10); BOOST_CHECK_CLOSE(xwell[i1 + Ix::WatInjTotal], 1000.0, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i1 + Ix::GasInjTotal], 2000.0, 1.0e-10);
// Copy of WWIR // Copy of WWIR
BOOST_CHECK_CLOSE(xwell[i1 + Ix::item37], BOOST_CHECK_CLOSE(xwell[i1 + Ix::item37],
xwell[i1 + Ix::WatPrRate], 1.0e-10); xwell[i1 + Ix::WatPrRate], 1.0e-10);
// Copy of WWIT BOOST_CHECK_CLOSE(xwell[i1 + Ix::HistOilPrTotal] , 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i1 + Ix::item82], BOOST_CHECK_CLOSE(xwell[i1 + Ix::HistWatPrTotal] , 0.0, 1.0e-10);
xwell[i1 + Ix::WatInjTotal], 1.0e-10); BOOST_CHECK_CLOSE(xwell[i1 + Ix::HistGasPrTotal] , 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i1 + Ix::HistWatInjTotal], 1515.0, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i1 + Ix::HistGasInjTotal], 3030.0, 1.0e-10);
// WWVIR // WWVIR
BOOST_CHECK_CLOSE(xwell[i1 + Ix::WatVoidPrRate], BOOST_CHECK_CLOSE(xwell[i1 + Ix::WatVoidPrRate],
@ -733,6 +767,10 @@ BOOST_AUTO_TEST_CASE (Dynamic_Well_Data_Step2)
// Copy of WGPR // Copy of WGPR
BOOST_CHECK_CLOSE(xwell[i2 + Ix::item38], BOOST_CHECK_CLOSE(xwell[i2 + Ix::item38],
xwell[i2 + Ix::GasPrRate], 1.0e-10); xwell[i2 + Ix::GasPrRate], 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i2 + Ix::HistOilPrTotal], 2345.6, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i2 + Ix::HistWatPrTotal], 3456.7, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i2 + Ix::HistGasPrTotal], 4567.8, 1.0e-10);
} }
} }

View File

@ -366,6 +366,11 @@ Opm::SummaryState sim_state()
state.add("WWCT:OP_1" , 0.625); state.add("WWCT:OP_1" , 0.625);
state.add("WGOR:OP_1" , 234.5); state.add("WGOR:OP_1" , 234.5);
state.add("WBHP:OP_1" , 314.15); state.add("WBHP:OP_1" , 314.15);
state.add("WOPTH:OP_1", 345.6);
state.add("WWPTH:OP_1", 456.7);
state.add("WGPTH:OP_1", 567.8);
state.add("WWITH:OP_1", 0.0);
state.add("WGITH:OP_1", 0.0);
state.add("WGVIR:OP_1", 0.0); state.add("WGVIR:OP_1", 0.0);
state.add("WWVIR:OP_1", 0.0); state.add("WWVIR:OP_1", 0.0);
@ -384,6 +389,11 @@ Opm::SummaryState sim_state()
state.add("WWCT:OP_2" , 0.0); state.add("WWCT:OP_2" , 0.0);
state.add("WGOR:OP_2" , 0.0); state.add("WGOR:OP_2" , 0.0);
state.add("WBHP:OP_2" , 400.6); state.add("WBHP:OP_2" , 400.6);
state.add("WOPTH:OP_2", 0.0);
state.add("WWPTH:OP_2", 0.0);
state.add("WGPTH:OP_2", 0.0);
state.add("WWITH:OP_2", 1515.0);
state.add("WGITH:OP_2", 3030.0);
state.add("WGVIR:OP_2", 1234.0); state.add("WGVIR:OP_2", 1234.0);
state.add("WWVIR:OP_2", 4321.0); state.add("WWVIR:OP_2", 4321.0);
@ -402,6 +412,11 @@ Opm::SummaryState sim_state()
state.add("WWCT:OP_3" , 0.0625); state.add("WWCT:OP_3" , 0.0625);
state.add("WGOR:OP_3" , 1234.5); state.add("WGOR:OP_3" , 1234.5);
state.add("WBHP:OP_3" , 314.15); state.add("WBHP:OP_3" , 314.15);
state.add("WOPTH:OP_3", 2345.6);
state.add("WWPTH:OP_3", 3456.7);
state.add("WGPTH:OP_3", 4567.8);
state.add("WWITH:OP_3", 0.0);
state.add("WGITH:OP_3", 0.0);
state.add("WGVIR:OP_3", 0.0); state.add("WGVIR:OP_3", 0.0);
state.add("WWVIR:OP_3", 43.21); state.add("WWVIR:OP_3", 43.21);
@ -419,6 +434,13 @@ Opm::SummaryState sim_state()
state.add("GGIT:OP" , 27182.8); state.add("GGIT:OP" , 27182.8);
state.add("GWCT:OP" , 0.625); state.add("GWCT:OP" , 0.625);
state.add("GGOR:OP" , 1234.5); state.add("GGOR:OP" , 1234.5);
state.add("GGVIR:OP", 123.45);
state.add("GWVIR:OP", 1234.56);
state.add("GOPTH:OP", 5678.90);
state.add("GWPTH:OP", 6789.01);
state.add("GGPTH:OP", 7890.12);
state.add("GWITH:OP", 8901.23);
state.add("GGITH:OP", 9012.34);
state.add("FOPR" , 1100.0); state.add("FOPR" , 1100.0);
state.add("FWPR" , 1200.0); state.add("FWPR" , 1200.0);
@ -434,6 +456,13 @@ Opm::SummaryState sim_state()
state.add("FGIT" , 271828.1); state.add("FGIT" , 271828.1);
state.add("FWCT" , 0.625); state.add("FWCT" , 0.625);
state.add("FGOR" , 1234.5); state.add("FGOR" , 1234.5);
state.add("FOPTH", 56789.01);
state.add("FWPTH", 67890.12);
state.add("FGPTH", 78901.23);
state.add("FWITH", 89012.34);
state.add("FGITH", 90123.45);
state.add("FGVIR", 1234.56);
state.add("FWVIR", 12345.67);
return state; return state;
} }
@ -835,13 +864,18 @@ BOOST_AUTO_TEST_CASE(Restore_Cumulatives)
// Verify that the restored summary state has all of its requisite // Verify that the restored summary state has all of its requisite
// cumulative summary vectors. // cumulative summary vectors.
// Producer => W*IT saved/restored as zero (0.0) // Producer => W*IT{,H} saved/restored as zero (0.0)
BOOST_CHECK(rstSumState.has("WOPT:OP_1")); BOOST_CHECK(rstSumState.has("WOPT:OP_1"));
BOOST_CHECK(rstSumState.has("WGPT:OP_1")); BOOST_CHECK(rstSumState.has("WGPT:OP_1"));
BOOST_CHECK(rstSumState.has("WWPT:OP_1")); BOOST_CHECK(rstSumState.has("WWPT:OP_1"));
BOOST_CHECK(rstSumState.has("WVPT:OP_1")); BOOST_CHECK(rstSumState.has("WVPT:OP_1"));
BOOST_CHECK(rstSumState.has("WWIT:OP_1")); BOOST_CHECK(rstSumState.has("WWIT:OP_1"));
BOOST_CHECK(rstSumState.has("WGIT:OP_1")); BOOST_CHECK(rstSumState.has("WGIT:OP_1"));
BOOST_CHECK(rstSumState.has("WOPTH:OP_1"));
BOOST_CHECK(rstSumState.has("WGPTH:OP_1"));
BOOST_CHECK(rstSumState.has("WWPTH:OP_1"));
BOOST_CHECK(rstSumState.has("WWITH:OP_1"));
BOOST_CHECK(rstSumState.has("WGITH:OP_1"));
BOOST_CHECK_CLOSE(rstSumState.get("WOPT:OP_1"), 10.0, 1.0e-10); BOOST_CHECK_CLOSE(rstSumState.get("WOPT:OP_1"), 10.0, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("WGPT:OP_1"), 30.0, 1.0e-10); BOOST_CHECK_CLOSE(rstSumState.get("WGPT:OP_1"), 30.0, 1.0e-10);
@ -849,21 +883,36 @@ BOOST_AUTO_TEST_CASE(Restore_Cumulatives)
BOOST_CHECK_CLOSE(rstSumState.get("WVPT:OP_1"), 40.0, 1.0e-10); BOOST_CHECK_CLOSE(rstSumState.get("WVPT:OP_1"), 40.0, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("WWIT:OP_1"), 0.0, 1.0e-10); BOOST_CHECK_CLOSE(rstSumState.get("WWIT:OP_1"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("WGIT:OP_1"), 0.0, 1.0e-10); BOOST_CHECK_CLOSE(rstSumState.get("WGIT:OP_1"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("WOPTH:OP_1"), 345.6, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("WWPTH:OP_1"), 456.7, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("WGPTH:OP_1"), 567.8, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("WWITH:OP_1"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("WGITH:OP_1"), 0.0, 1.0e-10);
// Gas injector => W*PT and WWIT saved/restored as zero (0.0) // Gas injector => W*PT{,H} saved/restored as zero (0.0)
BOOST_CHECK(rstSumState.has("WOPT:OP_2")); BOOST_CHECK(rstSumState.has("WOPT:OP_2"));
BOOST_CHECK(rstSumState.has("WGPT:OP_2")); BOOST_CHECK(rstSumState.has("WGPT:OP_2"));
BOOST_CHECK(rstSumState.has("WWPT:OP_2")); BOOST_CHECK(rstSumState.has("WWPT:OP_2"));
BOOST_CHECK(rstSumState.has("WVPT:OP_2")); BOOST_CHECK(rstSumState.has("WVPT:OP_2"));
BOOST_CHECK(rstSumState.has("WWIT:OP_2")); BOOST_CHECK(rstSumState.has("WWIT:OP_2"));
BOOST_CHECK(rstSumState.has("WGIT:OP_2")); BOOST_CHECK(rstSumState.has("WGIT:OP_2"));
BOOST_CHECK(rstSumState.has("WOPTH:OP_2"));
BOOST_CHECK(rstSumState.has("WGPTH:OP_2"));
BOOST_CHECK(rstSumState.has("WWPTH:OP_2"));
BOOST_CHECK(rstSumState.has("WWITH:OP_2"));
BOOST_CHECK(rstSumState.has("WGITH:OP_2"));
BOOST_CHECK_CLOSE(rstSumState.get("WOPT:OP_2"), 0.0, 1.0e-10); BOOST_CHECK_CLOSE(rstSumState.get("WOPT:OP_2"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("WGPT:OP_2"), 0.0, 1.0e-10); BOOST_CHECK_CLOSE(rstSumState.get("WGPT:OP_2"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("WWPT:OP_2"), 0.0, 1.0e-10); BOOST_CHECK_CLOSE(rstSumState.get("WWPT:OP_2"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("WVPT:OP_2"), 0.0, 1.0e-10); BOOST_CHECK_CLOSE(rstSumState.get("WVPT:OP_2"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("WWIT:OP_2"), 0.0, 1.0e-10); BOOST_CHECK_CLOSE(rstSumState.get("WWIT:OP_2"), 1000.0, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("WGIT:OP_2"), 2000.0, 1.0e-10); BOOST_CHECK_CLOSE(rstSumState.get("WGIT:OP_2"), 2000.0, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("WOPTH:OP_2"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("WGPTH:OP_2"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("WWPTH:OP_2"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("WWITH:OP_2"), 1515.0, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("WGITH:OP_2"), 3030.0, 1.0e-10);
// Group cumulatives saved/restored for all phases // Group cumulatives saved/restored for all phases
BOOST_CHECK(rstSumState.has("GOPT:OP")); BOOST_CHECK(rstSumState.has("GOPT:OP"));
@ -872,6 +921,11 @@ BOOST_AUTO_TEST_CASE(Restore_Cumulatives)
BOOST_CHECK(rstSumState.has("GVPT:OP")); BOOST_CHECK(rstSumState.has("GVPT:OP"));
BOOST_CHECK(rstSumState.has("GWIT:OP")); BOOST_CHECK(rstSumState.has("GWIT:OP"));
BOOST_CHECK(rstSumState.has("GGIT:OP")); BOOST_CHECK(rstSumState.has("GGIT:OP"));
BOOST_CHECK(rstSumState.has("GOPTH:OP"));
BOOST_CHECK(rstSumState.has("GGPTH:OP"));
BOOST_CHECK(rstSumState.has("GWPTH:OP"));
BOOST_CHECK(rstSumState.has("GWITH:OP"));
BOOST_CHECK(rstSumState.has("GGITH:OP"));
BOOST_CHECK_CLOSE(rstSumState.get("GOPT:OP"), 1100.0, 1.0e-10); BOOST_CHECK_CLOSE(rstSumState.get("GOPT:OP"), 1100.0, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("GWPT:OP"), 1200.0, 1.0e-10); BOOST_CHECK_CLOSE(rstSumState.get("GWPT:OP"), 1200.0, 1.0e-10);
@ -880,6 +934,12 @@ BOOST_AUTO_TEST_CASE(Restore_Cumulatives)
BOOST_CHECK_CLOSE(rstSumState.get("GWIT:OP"), 31415.9, 1.0e-10); BOOST_CHECK_CLOSE(rstSumState.get("GWIT:OP"), 31415.9, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("GGIT:OP"), 27182.8, 1.0e-10); BOOST_CHECK_CLOSE(rstSumState.get("GGIT:OP"), 27182.8, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("GOPTH:OP"), 5678.90, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("GGPTH:OP"), 7890.12, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("GWPTH:OP"), 6789.01, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("GWITH:OP"), 8901.23, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("GGITH:OP"), 9012.34, 1.0e-10);
// Field cumulatives saved/restored for all phases // Field cumulatives saved/restored for all phases
BOOST_CHECK(rstSumState.has("FOPT")); BOOST_CHECK(rstSumState.has("FOPT"));
BOOST_CHECK(rstSumState.has("FGPT")); BOOST_CHECK(rstSumState.has("FGPT"));
@ -887,6 +947,11 @@ BOOST_AUTO_TEST_CASE(Restore_Cumulatives)
BOOST_CHECK(rstSumState.has("FVPT")); BOOST_CHECK(rstSumState.has("FVPT"));
BOOST_CHECK(rstSumState.has("FWIT")); BOOST_CHECK(rstSumState.has("FWIT"));
BOOST_CHECK(rstSumState.has("FGIT")); BOOST_CHECK(rstSumState.has("FGIT"));
BOOST_CHECK(rstSumState.has("FOPTH"));
BOOST_CHECK(rstSumState.has("FGPTH"));
BOOST_CHECK(rstSumState.has("FWPTH"));
BOOST_CHECK(rstSumState.has("FWITH"));
BOOST_CHECK(rstSumState.has("FGITH"));
BOOST_CHECK_CLOSE(rstSumState.get("FOPT"), 11000.0, 1.0e-10); BOOST_CHECK_CLOSE(rstSumState.get("FOPT"), 11000.0, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("FWPT"), 12000.0, 1.0e-10); BOOST_CHECK_CLOSE(rstSumState.get("FWPT"), 12000.0, 1.0e-10);
@ -894,6 +959,12 @@ BOOST_AUTO_TEST_CASE(Restore_Cumulatives)
BOOST_CHECK_CLOSE(rstSumState.get("FVPT"), 14000.0, 1.0e-10); BOOST_CHECK_CLOSE(rstSumState.get("FVPT"), 14000.0, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("FWIT"), 314159.2, 1.0e-10); BOOST_CHECK_CLOSE(rstSumState.get("FWIT"), 314159.2, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("FGIT"), 271828.1, 1.0e-10); BOOST_CHECK_CLOSE(rstSumState.get("FGIT"), 271828.1, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("FOPTH"), 56789.01, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("FGPTH"), 78901.23, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("FWPTH"), 67890.12, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("FWITH"), 89012.34, 1.0e-10);
BOOST_CHECK_CLOSE(rstSumState.get("FGITH"), 90123.45, 1.0e-10);
} }

View File

@ -2921,6 +2921,13 @@ BOOST_AUTO_TEST_CASE(Reset)
rstrt.add("WWIT:W_1", 5.0); rstrt.add("WWIT:W_1", 5.0);
rstrt.add("WGIT:W_1", 6.0); rstrt.add("WGIT:W_1", 6.0);
rstrt.add("WOPTH:W_1", 0.1);
rstrt.add("WWPTH:W_1", 0.2);
rstrt.add("WGPTH:W_1", 0.3);
rstrt.add("WWITH:W_1", 0.5);
rstrt.add("WGITH:W_1", 0.6);
rstrt.add("GOPT:NoSuchGroup", 1.0); rstrt.add("GOPT:NoSuchGroup", 1.0);
rstrt.add("GWPT:NoSuchGroup", 2.0); rstrt.add("GWPT:NoSuchGroup", 2.0);
rstrt.add("GGPT:NoSuchGroup", 3.0); rstrt.add("GGPT:NoSuchGroup", 3.0);
@ -2937,6 +2944,13 @@ BOOST_AUTO_TEST_CASE(Reset)
rstrt.add("FWIT", 50.0); rstrt.add("FWIT", 50.0);
rstrt.add("FGIT", 60.0); rstrt.add("FGIT", 60.0);
rstrt.add("FOPTH", 0.01);
rstrt.add("FWPTH", 0.02);
rstrt.add("FGPTH", 0.03);
rstrt.add("FWITH", 0.05);
rstrt.add("FGITH", 0.06);
smry.reset_cumulative_quantities(rstrt); smry.reset_cumulative_quantities(rstrt);
const auto& sumstate = smry.get_restart_vectors(); const auto& sumstate = smry.get_restart_vectors();
@ -2969,6 +2983,13 @@ BOOST_AUTO_TEST_CASE(Reset)
BOOST_CHECK_CLOSE(sumstate.get("WWIT:W_1"), 5.0, 1.0e-10); BOOST_CHECK_CLOSE(sumstate.get("WWIT:W_1"), 5.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("WGIT:W_1"), 6.0, 1.0e-10); BOOST_CHECK_CLOSE(sumstate.get("WGIT:W_1"), 6.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("WOPTH:W_1"), 0.1, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("WWPTH:W_1"), 0.2, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("WGPTH:W_1"), 0.3, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("WWITH:W_1"), 0.5, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("WGITH:W_1"), 0.6, 1.0e-10);
// Cumulatives unset for W_2. // Cumulatives unset for W_2.
BOOST_CHECK_CLOSE(sumstate.get("WOPT:W_2"), 0.0, 1.0e-10); BOOST_CHECK_CLOSE(sumstate.get("WOPT:W_2"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("WWPT:W_2"), 0.0, 1.0e-10); BOOST_CHECK_CLOSE(sumstate.get("WWPT:W_2"), 0.0, 1.0e-10);
@ -2978,6 +2999,13 @@ BOOST_AUTO_TEST_CASE(Reset)
BOOST_CHECK_CLOSE(sumstate.get("WWIT:W_2"), 0.0, 1.0e-10); BOOST_CHECK_CLOSE(sumstate.get("WWIT:W_2"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("WGIT:W_2"), 0.0, 1.0e-10); BOOST_CHECK_CLOSE(sumstate.get("WGIT:W_2"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("WOPTH:W_2"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("WWPTH:W_2"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("WGPTH:W_2"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("WWITH:W_2"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("WGITH:W_2"), 0.0, 1.0e-10);
// Cumulatives unset for W_3. // Cumulatives unset for W_3.
BOOST_CHECK_CLOSE(sumstate.get("WOPT:W_3"), 0.0, 1.0e-10); BOOST_CHECK_CLOSE(sumstate.get("WOPT:W_3"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("WWPT:W_3"), 0.0, 1.0e-10); BOOST_CHECK_CLOSE(sumstate.get("WWPT:W_3"), 0.0, 1.0e-10);
@ -2987,6 +3015,13 @@ BOOST_AUTO_TEST_CASE(Reset)
BOOST_CHECK_CLOSE(sumstate.get("WWIT:W_3"), 0.0, 1.0e-10); BOOST_CHECK_CLOSE(sumstate.get("WWIT:W_3"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("WGIT:W_3"), 0.0, 1.0e-10); BOOST_CHECK_CLOSE(sumstate.get("WGIT:W_3"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("WOPTH:W_3"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("WWPTH:W_3"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("WGPTH:W_3"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("WWITH:W_3"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("WGITH:W_3"), 0.0, 1.0e-10);
// Cumulatives unset for G_1. // Cumulatives unset for G_1.
BOOST_CHECK_CLOSE(sumstate.get("GOPT:G_1"), 0.0, 1.0e-10); BOOST_CHECK_CLOSE(sumstate.get("GOPT:G_1"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("GWPT:G_1"), 0.0, 1.0e-10); BOOST_CHECK_CLOSE(sumstate.get("GWPT:G_1"), 0.0, 1.0e-10);
@ -2996,6 +3031,13 @@ BOOST_AUTO_TEST_CASE(Reset)
BOOST_CHECK_CLOSE(sumstate.get("GWIT:G_1"), 0.0, 1.0e-10); BOOST_CHECK_CLOSE(sumstate.get("GWIT:G_1"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("GGIT:G_1"), 0.0, 1.0e-10); BOOST_CHECK_CLOSE(sumstate.get("GGIT:G_1"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("GOPTH:G_1"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("GWPTH:G_1"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("GGPTH:G_1"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("GWITH:G_1"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("GGITH:G_1"), 0.0, 1.0e-10);
// Cumulatives unset for G_2. // Cumulatives unset for G_2.
BOOST_CHECK_CLOSE(sumstate.get("GOPT:G_2"), 0.0, 1.0e-10); BOOST_CHECK_CLOSE(sumstate.get("GOPT:G_2"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("GWPT:G_2"), 0.0, 1.0e-10); BOOST_CHECK_CLOSE(sumstate.get("GWPT:G_2"), 0.0, 1.0e-10);
@ -3005,6 +3047,13 @@ BOOST_AUTO_TEST_CASE(Reset)
BOOST_CHECK_CLOSE(sumstate.get("GWIT:G_2"), 0.0, 1.0e-10); BOOST_CHECK_CLOSE(sumstate.get("GWIT:G_2"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("GGIT:G_2"), 0.0, 1.0e-10); BOOST_CHECK_CLOSE(sumstate.get("GGIT:G_2"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("GOPTH:G_2"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("GWPTH:G_2"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("GGPTH:G_2"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("GWITH:G_2"), 0.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("GGITH:G_2"), 0.0, 1.0e-10);
// Cumulatives reset for FIELD. // Cumulatives reset for FIELD.
BOOST_CHECK_CLOSE(sumstate.get("FOPT"), 10.0, 1.0e-10); BOOST_CHECK_CLOSE(sumstate.get("FOPT"), 10.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("FWPT"), 20.0, 1.0e-10); BOOST_CHECK_CLOSE(sumstate.get("FWPT"), 20.0, 1.0e-10);
@ -3013,6 +3062,13 @@ BOOST_AUTO_TEST_CASE(Reset)
BOOST_CHECK_CLOSE(sumstate.get("FWIT"), 50.0, 1.0e-10); BOOST_CHECK_CLOSE(sumstate.get("FWIT"), 50.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("FGIT"), 60.0, 1.0e-10); BOOST_CHECK_CLOSE(sumstate.get("FGIT"), 60.0, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("FOPTH"), 0.01, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("FWPTH"), 0.02, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("FGPTH"), 0.03, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("FWITH"), 0.05, 1.0e-10);
BOOST_CHECK_CLOSE(sumstate.get("FGITH"), 0.06, 1.0e-10);
} }
BOOST_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_SUITE_END()