Merge pull request #2261 from akva2/noecl_flush

More MPI serialization support
This commit is contained in:
Arne Morten Kvarving 2020-01-06 08:45:34 +01:00 committed by GitHub
commit 5779fef8a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 973 additions and 3 deletions

View File

@ -22,6 +22,7 @@
#endif
#include "ParallelRestart.hpp"
#include <opm/common/OpmLog/Location.hpp>
#include <opm/parser/eclipse/EclipseState/Runspec.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/NNC.hpp>
#include <opm/parser/eclipse/EclipseState/InitConfig/Equil.hpp>
@ -30,6 +31,11 @@
#include <opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp>
#include <opm/parser/eclipse/EclipseState/IOConfig/RestartConfig.hpp>
#include <opm/parser/eclipse/EclipseState/Edit/EDITNNC.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Action/ActionAST.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Action/Actions.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Action/ActionX.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Action/ASTNode.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Action/Condition.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Events.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Group/GuideRateConfig.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/MessageLimits.hpp>
@ -37,7 +43,9 @@
#include <opm/parser/eclipse/EclipseState/Schedule/MSW/Valve.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/OilVaporizationProperties.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/RFTConfig.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Tuning.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQASTNode.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQConfig.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQDefine.hpp>
@ -1157,6 +1165,17 @@ std::size_t packSize(const std::shared_ptr<T>& data,
template std::size_t packSize(const std::shared_ptr<SpiralICD>& data,
Dune::MPIHelper::MPICommunicator comm);
template<class T>
std::size_t packSize(const std::unique_ptr<T>& data,
Dune::MPIHelper::MPICommunicator comm)
{
std::size_t size = packSize(bool(), comm);
if (data)
size += packSize(*data, comm);
return size;
}
std::size_t packSize(const Dimension& data,
Dune::MPIHelper::MPICommunicator comm)
{
@ -1480,6 +1499,159 @@ std::size_t packSize(const DeckRecord& data,
return packSize(data.getItems(), comm);
}
std::size_t packSize(const Location& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.filename, comm) +
packSize(data.lineno, comm);
}
std::size_t packSize(const DeckKeyword& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.name(), comm) +
packSize(data.location(), comm) +
packSize(data.records(), comm) +
packSize(data.isDataKeyword(), comm) +
packSize(data.isSlashTerminated(), comm);
}
std::size_t packSize(const Deck& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.keywords(), comm) +
packSize(data.getDefaultUnitSystem(), comm) +
packSize(data.activeUnitSystem(), comm) +
packSize(data.getDataFile(), comm) +
packSize(data.getInputPath(), comm) +
packSize(data.unitSystemAccessCount(), comm);
}
std::size_t packSize(const Tuning& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.getTSINIT(), comm) +
packSize(data.getTSMAXZ(), comm) +
packSize(data.getTSMINZ(), comm) +
packSize(data.getTSMCHP(), comm) +
packSize(data.getTSFMAX(), comm) +
packSize(data.getTSFMIN(), comm) +
packSize(data.getTSFCNV(), comm) +
packSize(data.getTFDIFF(), comm) +
packSize(data.getTHRUPT(), comm) +
packSize(data.getTMAXWC(), comm) +
packSize(data.getTMAXWC_has_value(), comm) +
packSize(data.getTRGTTE(), comm) +
packSize(data.getTRGCNV(), comm) +
packSize(data.getTRGMBE(), comm) +
packSize(data.getTRGLCV(), comm) +
packSize(data.getXXXTTE(), comm) +
packSize(data.getXXXCNV(), comm) +
packSize(data.getXXXMBE(), comm) +
packSize(data.getXXXLCV(), comm) +
packSize(data.getXXXWFL(), comm) +
packSize(data.getTRGFIP(), comm) +
packSize(data.getTRGSFT(), comm) +
packSize(data.getTRGSFT_has_value(), comm) +
packSize(data.getTHIONX(), comm) +
packSize(data.getTRWGHT(), comm) +
packSize(data.getNEWTMX(), comm) +
packSize(data.getNEWTMN(), comm) +
packSize(data.getLITMAX(), comm) +
packSize(data.getLITMIN(), comm) +
packSize(data.getMXWSIT(), comm) +
packSize(data.getMXWPIT(), comm) +
packSize(data.getDDPLIM(), comm) +
packSize(data.getDDSLIM(), comm) +
packSize(data.getTRGDPR(), comm) +
packSize(data.getXXXDPR(), comm) +
packSize(data.getXXXDPR_has_value(), comm) +
packSize(data.getResetValues(), comm);
}
std::size_t packSize(const Action::ASTNode& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.type, comm) +
packSize(data.func_type, comm) +
packSize(data.func, comm) +
packSize(data.argList(), comm) +
packSize(data.getNumber(), comm) +
packSize(data.childrens(), comm);
}
std::size_t packSize(const Action::AST& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.getCondition(), comm);
}
std::size_t packSize(const Action::Quantity& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.quantity, comm) +
packSize(data.args, comm);
}
std::size_t packSize(const Action::Condition& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.lhs, comm) +
packSize(data.rhs, comm) +
packSize(data.logic, comm) +
packSize(data.cmp, comm) +
packSize(data.cmp_string, comm);
}
std::size_t packSize(const Action::ActionX& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.name(), comm) +
packSize(data.max_run(), comm) +
packSize(data.min_wait(), comm) +
packSize(data.start_time(), comm) +
packSize(data.getKeywords(), comm) +
packSize(data.getCondition(), comm) +
packSize(data.conditions(), comm) +
packSize(data.getRunCount(), comm) +
packSize(data.getLastRun(), comm);
}
std::size_t packSize(const Action::Actions& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.getActions(), comm);
}
std::size_t packSize(const Schedule& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.getTimeMap(), comm) +
packSize(data.getStaticWells(), comm) +
packSize(data.getGroups(), comm) +
packSize(data.getOilVapProps(), comm) +
packSize(data.getEvents(), comm) +
packSize(data.getModifierDeck(), comm) +
packSize(data.getTuning(), comm) +
packSize(data.getMessageLimits(), comm) +
packSize(data.getRunspec(), comm) +
packSize(data.getVFPProdTables(), comm) +
packSize(data.getVFPInjTables(), comm) +
packSize(data.getWellTestConfig(), comm) +
packSize(data.getWListManager(), comm) +
packSize(data.getUDQConfig(), comm) +
packSize(data.getUDQActive(), comm) +
packSize(data.getGuideRateConfig(), comm) +
packSize(data.getGConSale(), comm) +
packSize(data.getGConSump(), comm) +
packSize(data.getGlobalWhistCtlMode(), comm) +
packSize(data.getActions(), comm) +
packSize(data.rftConfig(), comm) +
packSize(data.getNupCol(), comm) +
packSize(data.getWellGroupEvents(), comm);
}
////// pack routines
template<class T>
@ -2636,6 +2808,15 @@ void pack(const std::shared_ptr<T>& data, std::vector<char>& buffer, int& positi
pack(*data, buffer, position, comm);
}
template<class T>
void pack(const std::unique_ptr<T>& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data != nullptr, buffer, position, comm);
if (data)
pack(*data, buffer, position, comm);
}
template void pack(const std::shared_ptr<SpiralICD>& data, std::vector<char>& buffer,
int& position, Dune::MPIHelper::MPICommunicator comm);
@ -2988,6 +3169,169 @@ void pack(const DeckRecord& data,
pack(data.getItems(), buffer, position, comm);
}
void pack(const Location& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.filename, buffer, position, comm);
pack(data.lineno, buffer, position, comm);
}
void pack(const DeckKeyword& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.name(), buffer, position, comm);
pack(data.location(), buffer, position, comm);
pack(data.records(), buffer, position, comm);
pack(data.isDataKeyword(), buffer, position, comm);
pack(data.isSlashTerminated(), buffer, position, comm);
}
void pack(const Deck& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.keywords(), buffer, position, comm);
pack(data.getDefaultUnitSystem(), buffer, position, comm);
pack(data.activeUnitSystem(), buffer, position, comm);
pack(data.getDataFile(), buffer, position, comm);
pack(data.getInputPath(), buffer, position, comm);
pack(data.unitSystemAccessCount(), buffer, position, comm);
}
void pack(const Tuning& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.getTSINIT(), buffer, position, comm);
pack(data.getTSMAXZ(), buffer, position, comm);
pack(data.getTSMINZ(), buffer, position, comm);
pack(data.getTSMCHP(), buffer, position, comm);
pack(data.getTSFMAX(), buffer, position, comm);
pack(data.getTSFMIN(), buffer, position, comm);
pack(data.getTSFCNV(), buffer, position, comm);
pack(data.getTFDIFF(), buffer, position, comm);
pack(data.getTHRUPT(), buffer, position, comm);
pack(data.getTMAXWC(), buffer, position, comm);
pack(data.getTMAXWC_has_value(), buffer, position, comm);
pack(data.getTRGTTE(), buffer, position, comm);
pack(data.getTRGCNV(), buffer, position, comm);
pack(data.getTRGMBE(), buffer, position, comm);
pack(data.getTRGLCV(), buffer, position, comm);
pack(data.getXXXTTE(), buffer, position, comm);
pack(data.getXXXCNV(), buffer, position, comm);
pack(data.getXXXMBE(), buffer, position, comm);
pack(data.getXXXLCV(), buffer, position, comm);
pack(data.getXXXWFL(), buffer, position, comm);
pack(data.getTRGFIP(), buffer, position, comm);
pack(data.getTRGSFT(), buffer, position, comm);
pack(data.getTRGSFT_has_value(), buffer, position, comm);
pack(data.getTHIONX(), buffer, position, comm);
pack(data.getTRWGHT(), buffer, position, comm);
pack(data.getNEWTMX(), buffer, position, comm);
pack(data.getNEWTMN(), buffer, position, comm);
pack(data.getLITMAX(), buffer, position, comm);
pack(data.getLITMIN(), buffer, position, comm);
pack(data.getMXWSIT(), buffer, position, comm);
pack(data.getMXWPIT(), buffer, position, comm);
pack(data.getDDPLIM(), buffer, position, comm);
pack(data.getDDSLIM(), buffer, position, comm);
pack(data.getTRGDPR(), buffer, position, comm);
pack(data.getXXXDPR(), buffer, position, comm);
pack(data.getXXXDPR_has_value(), buffer, position, comm);
pack(data.getResetValues(), buffer, position, comm);
}
void pack(const Action::ASTNode& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.type, buffer, position, comm);
pack(data.func_type, buffer, position, comm);
pack(data.func, buffer, position, comm);
pack(data.argList(), buffer, position, comm);
pack(data.getNumber(), buffer, position, comm);
pack(data.childrens(), buffer, position, comm);
}
void pack(const Action::AST& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.getCondition(), buffer, position, comm);
}
void pack(const Action::Quantity& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.quantity, buffer, position, comm);
pack(data.args, buffer, position, comm);
}
void pack(const Action::Condition& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.lhs, buffer, position, comm);
pack(data.rhs, buffer, position, comm);
pack(data.logic, buffer, position, comm);
pack(data.cmp, buffer, position, comm);
pack(data.cmp_string, buffer, position, comm);
}
void pack(const Action::ActionX& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.name(), buffer, position, comm);
pack(data.max_run(), buffer, position, comm);
pack(data.min_wait(), buffer, position, comm);
pack(data.start_time(), buffer, position, comm);
pack(data.getKeywords(), buffer, position, comm);
pack(data.getCondition(), buffer, position, comm);
pack(data.conditions(), buffer, position, comm);
pack(data.getRunCount(), buffer, position, comm);
pack(data.getLastRun(), buffer, position, comm);
}
void pack(const Action::Actions& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.getActions(), buffer, position, comm);
}
void pack(const Schedule& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.getTimeMap(), buffer, position, comm);
pack(data.getStaticWells(), buffer, position, comm);
pack(data.getGroups(), buffer, position, comm);
pack(data.getOilVapProps(), buffer, position, comm);
pack(data.getEvents(), buffer, position, comm);
pack(data.getModifierDeck(), buffer, position, comm);
pack(data.getTuning(), buffer, position, comm);
pack(data.getMessageLimits(), buffer, position, comm);
pack(data.getRunspec(), buffer, position, comm);
pack(data.getVFPProdTables(), buffer, position, comm);
pack(data.getVFPInjTables(), buffer, position, comm);
pack(data.getWellTestConfig(), buffer, position, comm);
pack(data.getWListManager(), buffer, position, comm);
pack(data.getUDQConfig(), buffer, position, comm);
pack(data.getUDQActive(), buffer, position, comm);
pack(data.getGuideRateConfig(), buffer, position, comm);
pack(data.getGConSale(), buffer, position, comm);
pack(data.getGConSump(), buffer, position, comm);
pack(data.getGlobalWhistCtlMode(), buffer, position, comm);
pack(data.getActions(), buffer, position, comm);
pack(data.rftConfig(), buffer, position, comm);
pack(data.getNupCol(), buffer, position, comm);
pack(data.getWellGroupEvents(), buffer, position, comm);
}
/// unpack routines
template<class T>
@ -4595,6 +4939,18 @@ void unpack(std::shared_ptr<T>& data, std::vector<char>& buffer, int& position,
}
}
template<class T>
void unpack(std::unique_ptr<T>& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
bool hasVal;
unpack(hasVal, buffer, position, comm);
if (hasVal) {
data.reset(new T);
unpack(*data, buffer, position, comm);
}
}
template void unpack(std::shared_ptr<SpiralICD>& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm);
@ -5109,6 +5465,275 @@ void unpack(DeckRecord& data,
data = DeckRecord(std::move(items));
}
void unpack(Location& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
data.filename.clear();
unpack(data.filename, buffer, position, comm);
unpack(data.lineno, buffer, position, comm);
}
void unpack(DeckKeyword& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
std::string name;
Location location;
std::vector<DeckRecord> records;
bool isDataKeyword, isSlashTerminated;
unpack(name, buffer, position, comm);
unpack(location, buffer, position, comm);
unpack(records, buffer, position, comm);
unpack(isDataKeyword, buffer, position, comm);
unpack(isSlashTerminated, buffer, position, comm);
data = DeckKeyword(name, location, records,
isDataKeyword, isSlashTerminated);
}
void unpack(Deck& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
std::vector<DeckKeyword> keywords;
UnitSystem defaultUnitSystem;
std::unique_ptr<UnitSystem> activeUnitSystem;
std::string dataFile, inputPath;
size_t accessCount;
unpack(keywords, buffer, position, comm);
unpack(defaultUnitSystem, buffer, position, comm);
unpack(activeUnitSystem, buffer, position, comm);
unpack(dataFile, buffer, position, comm);
unpack(inputPath, buffer, position, comm);
unpack(accessCount, buffer, position, comm);
data = Deck(keywords, defaultUnitSystem,
activeUnitSystem.get(), dataFile, inputPath, accessCount);
}
void unpack(Tuning& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
DynamicState<double> TSINIT;
DynamicState<double> TSMAXZ;
DynamicState<double> TSMINZ;
DynamicState<double> TSMCHP;
DynamicState<double> TSFMAX;
DynamicState<double> TSFMIN;
DynamicState<double> TSFCNV;
DynamicState<double> TFDIFF;
DynamicState<double> THRUPT;
DynamicState<double> TMAXWC;
DynamicState<int> TMAXWC_has_value;
DynamicState<double> TRGTTE;
DynamicState<double> TRGCNV;
DynamicState<double> TRGMBE;
DynamicState<double> TRGLCV;
DynamicState<double> XXXTTE;
DynamicState<double> XXXCNV;
DynamicState<double> XXXMBE;
DynamicState<double> XXXLCV;
DynamicState<double> XXXWFL;
DynamicState<double> TRGFIP;
DynamicState<double> TRGSFT;
DynamicState<int> TRGSFT_has_value;
DynamicState<double> THIONX;
DynamicState<int> TRWGHT;
DynamicState<int> NEWTMX;
DynamicState<int> NEWTMN;
DynamicState<int> LITMAX;
DynamicState<int> LITMIN;
DynamicState<int> MXWSIT;
DynamicState<int> MXWPIT;
DynamicState<double> DDPLIM;
DynamicState<double> DDSLIM;
DynamicState<double> TRGDPR;
DynamicState<double> XXXDPR;
DynamicState<int> XXXDPR_has_value;
std::map<std::string, bool> ResetValue;
unpack(TSINIT, buffer, position, comm);
unpack(TSMAXZ, buffer, position, comm);
unpack(TSMINZ, buffer, position, comm);
unpack(TSMCHP, buffer, position, comm);
unpack(TSFMAX, buffer, position, comm);
unpack(TSFMIN, buffer, position, comm);
unpack(TSFCNV, buffer, position, comm);
unpack(TFDIFF, buffer, position, comm);
unpack(THRUPT, buffer, position, comm);
unpack(TMAXWC, buffer, position, comm);
unpack(TMAXWC_has_value, buffer, position, comm);
unpack(TRGTTE, buffer, position, comm);
unpack(TRGCNV, buffer, position, comm);
unpack(TRGMBE, buffer, position, comm);
unpack(TRGLCV, buffer, position, comm);
unpack(XXXTTE, buffer, position, comm);
unpack(XXXCNV, buffer, position, comm);
unpack(XXXMBE, buffer, position, comm);
unpack(XXXLCV, buffer, position, comm);
unpack(XXXWFL, buffer, position, comm);
unpack(TRGFIP, buffer, position, comm);
unpack(TRGSFT, buffer, position, comm);
unpack(TRGSFT_has_value, buffer, position, comm);
unpack(THIONX, buffer, position, comm);
unpack(TRWGHT, buffer, position, comm);
unpack(NEWTMX, buffer, position, comm);
unpack(NEWTMN, buffer, position, comm);
unpack(LITMAX, buffer, position, comm);
unpack(LITMIN, buffer, position, comm);
unpack(MXWSIT, buffer, position, comm);
unpack(MXWPIT, buffer, position, comm);
unpack(DDPLIM, buffer, position, comm);
unpack(DDSLIM, buffer, position, comm);
unpack(TRGDPR, buffer, position, comm);
unpack(XXXDPR, buffer, position, comm);
unpack(XXXDPR_has_value, buffer, position, comm);
unpack(ResetValue, buffer, position, comm);
data = Tuning(TSINIT, TSMAXZ, TSMINZ, TSMCHP, TSFMAX, TSFMIN, TSFCNV,
TFDIFF, THRUPT, TMAXWC, TMAXWC_has_value, TRGTTE,
TRGCNV, TRGMBE, TRGLCV, XXXTTE, XXXCNV, XXXMBE, XXXLCV,
XXXWFL, TRGFIP, TRGSFT, TRGSFT_has_value, THIONX, TRWGHT,
NEWTMX, NEWTMN, LITMAX, LITMIN, MXWSIT, MXWPIT, DDPLIM,
DDSLIM, TRGDPR, XXXDPR, XXXDPR_has_value, ResetValue);
}
void unpack(Action::ASTNode& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
TokenType token;
FuncType func_type;
std::string func;
std::vector<std::string> argList;
double number;
std::vector<Action::ASTNode> children;
unpack(token, buffer, position, comm);
unpack(func_type, buffer, position, comm);
unpack(func, buffer, position, comm);
unpack(argList, buffer, position, comm);
unpack(number, buffer, position, comm);
unpack(children, buffer, position, comm);
data = Action::ASTNode(token, func_type, func, argList, number, children);
}
void unpack(Action::AST& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
std::shared_ptr<Action::ASTNode> condition;
unpack(condition, buffer, position, comm);
data = Action::AST(condition);
}
void unpack(Action::Quantity& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
unpack(data.quantity, buffer, position, comm);
unpack(data.args, buffer, position, comm);
}
void unpack(Action::Condition& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
unpack(data.lhs, buffer, position, comm);
unpack(data.rhs, buffer, position, comm);
unpack(data.logic, buffer, position, comm);
unpack(data.cmp, buffer, position, comm);
unpack(data.cmp_string, buffer, position, comm);
}
void unpack(Action::ActionX& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
std::string name;
size_t max_run;
double min_wait;
std::time_t start_time;
std::vector<DeckKeyword> keywords;
Action::AST condition;
std::vector<Action::Condition> conditions;
size_t run_count;
std::time_t last_run;
unpack(name, buffer, position, comm);
unpack(max_run, buffer, position, comm);
unpack(min_wait, buffer, position, comm);
unpack(start_time, buffer, position, comm);
unpack(keywords, buffer, position, comm);
unpack(condition, buffer, position, comm);
unpack(conditions, buffer, position, comm);
unpack(run_count, buffer, position, comm);
unpack(last_run, buffer, position, comm);
data = Action::ActionX(name, max_run, min_wait, start_time, keywords,
condition, conditions, run_count, last_run);
}
void unpack(Action::Actions& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
std::vector<Action::ActionX> actions;
unpack(actions, buffer, position, comm);
data = Action::Actions(actions);
}
void unpack(Schedule& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
TimeMap timeMap;
Schedule::WellMap staticWells;
Schedule::GroupMap groups;
DynamicState<OilVaporizationProperties> oilVapProps;
Events events;
DynamicVector<Deck> modifierDeck;
Tuning tuning;
MessageLimits messageLimits;
Runspec runspec;
Schedule::VFPProdMap vfpProdTables;
Schedule::VFPInjMap vfpInjTables;
DynamicState<std::shared_ptr<WellTestConfig>> wellTestConfig;
DynamicState<std::shared_ptr<WListManager>> wListManager;
DynamicState<std::shared_ptr<UDQConfig>> udqConfig;
DynamicState<std::shared_ptr<UDQActive>> udqActive;
DynamicState<std::shared_ptr<GuideRateConfig>> guideRateConfig;
DynamicState<std::shared_ptr<GConSale>> gconSale;
DynamicState<std::shared_ptr<GConSump>> gconSump;
DynamicState<Well::ProducerCMode> globalWhistCtlMode;
DynamicState<std::shared_ptr<Action::Actions>> actions;
RFTConfig rftConfig;
DynamicState<int> nupCol;
std::map<std::string,Events> wellGroupEvents;
unpack(timeMap, buffer, position, comm);
unpack(staticWells, buffer, position, comm);
unpack(groups, buffer, position, comm);
unpack(oilVapProps, buffer, position, comm);
unpack(events, buffer, position, comm);
unpack(modifierDeck, buffer, position, comm);
unpack(tuning, buffer, position, comm);
unpack(messageLimits, buffer, position, comm);
unpack(runspec, buffer, position, comm);
unpack(vfpProdTables, buffer, position, comm);
unpack(vfpInjTables, buffer, position, comm);
unpack(wellTestConfig, buffer, position, comm);
unpack(wListManager, buffer, position, comm);
unpack(udqConfig, buffer, position, comm);
unpack(udqActive, buffer, position, comm);
unpack(guideRateConfig, buffer, position, comm);
unpack(gconSale, buffer, position, comm);
unpack(gconSump, buffer, position, comm);
unpack(globalWhistCtlMode, buffer, position, comm);
unpack(actions, buffer, position, comm);
unpack(rftConfig, buffer, position, comm);
unpack(nupCol, buffer, position, comm);
unpack(wellGroupEvents, buffer, position, comm);
data = Schedule(timeMap, staticWells, groups, oilVapProps, events,
modifierDeck, tuning, messageLimits, runspec,
vfpProdTables, vfpInjTables, wellTestConfig,
wListManager, udqConfig, udqActive, guideRateConfig,
gconSale, gconSump, globalWhistCtlMode, actions,
rftConfig, nupCol, wellGroupEvents);
}
#define INSTANTIATE_PACK_VECTOR(T) \
template std::size_t packSize(const std::vector<T>& data, \
Dune::MPIHelper::MPICommunicator comm); \

View File

@ -63,6 +63,16 @@ namespace Opm
{
class Actdims;
namespace Action {
class Actions;
class ActionX;
class AST;
class ASTNode;
class Condition;
class Quantity;
}
class Aqudims;
class ColumnSchema;
class Connection;
@ -84,6 +94,7 @@ class InitConfig;
class IOConfig;
template<class T> class IOrderSet;
class JFunc;
class Location;
class MessageLimits;
class MLimits;
class NNC;
@ -107,6 +118,7 @@ class RockTable;
class Rock2dTable;
class Rock2dtrTable;
class Runspec;
class Schedule;
class Segment;
class SimulationConfig;
class SimpleTable;
@ -119,6 +131,7 @@ class TableContainer;
class TableManager;
class TableSchema;
class ThresholdPressure;
class Tuning;
class UDAValue;
class UDQASTNode;
class UDQConfig;
@ -193,6 +206,10 @@ std::size_t packSize(const std::shared_ptr<T>& data,
template<class T, std::size_t N>
std::size_t packSize(const std::array<T,N>& data, Dune::MPIHelper::MPICommunicator comm);
template<class T>
std::size_t packSize(const std::unique_ptr<T>& data,
Dune::MPIHelper::MPICommunicator comm);
std::size_t packSize(const char* str, Dune::MPIHelper::MPICommunicator comm);
std::size_t packSize(const std::string& str, Dune::MPIHelper::MPICommunicator comm);
@ -326,6 +343,10 @@ template<class T, size_t N>
void pack(const std::array<T,N>& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm);
template<class T>
void pack(const std::unique_ptr<T>& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm);
template<class T1, class T2, class C, class A>
void pack(const std::map<T1,T2,C,A>& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm);
@ -480,6 +501,10 @@ template<class T, size_t N>
void unpack(std::array<T,N>& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm);
template<class T>
void unpack(std::unique_ptr<T>& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm);
template<class T1, class T2, class C, class A>
void unpack(std::map<T1,T2,C,A>& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm);
@ -584,6 +609,12 @@ void unpack(char* str, std::size_t length, std::vector<char>& buffer, int& posit
Dune::MPIHelper::MPICommunicator comm);
ADD_PACK_PROTOTYPES(Actdims)
ADD_PACK_PROTOTYPES(Action::Actions)
ADD_PACK_PROTOTYPES(Action::ActionX)
ADD_PACK_PROTOTYPES(Action::AST)
ADD_PACK_PROTOTYPES(Action::ASTNode)
ADD_PACK_PROTOTYPES(Action::Condition)
ADD_PACK_PROTOTYPES(Action::Quantity)
ADD_PACK_PROTOTYPES(Aqudims)
ADD_PACK_PROTOTYPES(ColumnSchema)
ADD_PACK_PROTOTYPES(Connection)
@ -594,7 +625,9 @@ ADD_PACK_PROTOTYPES(data::Segment)
ADD_PACK_PROTOTYPES(data::Solution)
ADD_PACK_PROTOTYPES(data::Well)
ADD_PACK_PROTOTYPES(data::WellRates)
ADD_PACK_PROTOTYPES(Deck)
ADD_PACK_PROTOTYPES(DeckItem)
ADD_PACK_PROTOTYPES(DeckKeyword)
ADD_PACK_PROTOTYPES(DeckRecord)
ADD_PACK_PROTOTYPES(DENSITYRecord)
ADD_PACK_PROTOTYPES(DensityTable)
@ -622,6 +655,7 @@ ADD_PACK_PROTOTYPES(Group::GroupProductionProperties)
ADD_PACK_PROTOTYPES(InitConfig)
ADD_PACK_PROTOTYPES(IOConfig)
ADD_PACK_PROTOTYPES(JFunc)
ADD_PACK_PROTOTYPES(Location)
ADD_PACK_PROTOTYPES(MessageLimits)
ADD_PACK_PROTOTYPES(MLimits)
ADD_PACK_PROTOTYPES(NNC)
@ -647,13 +681,14 @@ ADD_PACK_PROTOTYPES(RockTable)
ADD_PACK_PROTOTYPES(Rock2dTable)
ADD_PACK_PROTOTYPES(Rock2dtrTable)
ADD_PACK_PROTOTYPES(Runspec)
ADD_PACK_PROTOTYPES(std::string)
ADD_PACK_PROTOTYPES(Schedule)
ADD_PACK_PROTOTYPES(Segment)
ADD_PACK_PROTOTYPES(SimulationConfig)
ADD_PACK_PROTOTYPES(SimpleTable)
ADD_PACK_PROTOTYPES(SkprpolyTable)
ADD_PACK_PROTOTYPES(SkprwatTable)
ADD_PACK_PROTOTYPES(SpiralICD)
ADD_PACK_PROTOTYPES(std::string)
ADD_PACK_PROTOTYPES(Tabdims)
ADD_PACK_PROTOTYPES(TableColumn)
ADD_PACK_PROTOTYPES(TableContainer)
@ -662,6 +697,7 @@ ADD_PACK_PROTOTYPES(TableSchema)
ADD_PACK_PROTOTYPES(ThresholdPressure)
ADD_PACK_PROTOTYPES(TimeMap)
ADD_PACK_PROTOTYPES(TimeMap::StepData)
ADD_PACK_PROTOTYPES(Tuning)
ADD_PACK_PROTOTYPES(UDAValue)
ADD_PACK_PROTOTYPES(UDQActive)
ADD_PACK_PROTOTYPES(UDQActive::InputRecord)

View File

@ -24,10 +24,11 @@
#include <boost/test/unit_test.hpp>
#include <opm/simulators/utils/ParallelRestart.hpp>
#include <opm/common/OpmLog/Location.hpp>
#include <opm/material/fluidsystems/blackoilpvt/DryGasPvt.hpp>
#include <opm/material/fluidsystems/blackoilpvt/SolventPvt.hpp>
#include <opm/material/fluidsystems/blackoilpvt/WetGasPvt.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Deck/DeckItem.hpp>
#include <opm/parser/eclipse/EclipseState/Runspec.hpp>
#include <opm/parser/eclipse/EclipseState/Edit/EDITNNC.hpp>
@ -37,6 +38,11 @@
#include <opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp>
#include <opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp>
#include <opm/parser/eclipse/EclipseState/IOConfig/RestartConfig.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Action/ActionAST.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Action/Actions.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Action/ActionX.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Action/ASTNode.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Action/Condition.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Events.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Group/GConSale.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Group/Group.hpp>
@ -46,7 +52,9 @@
#include <opm/parser/eclipse/EclipseState/Schedule/MSW/Valve.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/OilVaporizationProperties.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/RFTConfig.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Tuning.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQActive.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQAssign.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQASTNode.hpp>
@ -86,6 +94,7 @@
#include <opm/parser/eclipse/EclipseState/Tables/TableManager.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/TableSchema.hpp>
#include <opm/output/eclipse/RestartValue.hpp>
#include <opm/simulators/utils/ParallelRestart.hpp>
namespace {
@ -350,7 +359,6 @@ Opm::GuideRateModel getGuideRateModel()
Opm::UDAValue(10.0),
Opm::UDAValue(11.0)});
}
#endif
Opm::GuideRateConfig::GroupTarget getGuideRateConfigGroup()
@ -385,6 +393,77 @@ Opm::DeckRecord getDeckRecord()
}
Opm::Tuning getTuning()
{
return Opm::Tuning(Opm::DynamicState<double>(std::vector<double>{1.0}, 1), //TSINIT
Opm::DynamicState<double>(std::vector<double>{2.0}, 1), //TSMAXZ
Opm::DynamicState<double>(std::vector<double>{3.0}, 1), //TSMINZ
Opm::DynamicState<double>(std::vector<double>{4.0}, 1), //TSMCHP
Opm::DynamicState<double>(std::vector<double>{5.0}, 1), //TSFMAX
Opm::DynamicState<double>(std::vector<double>{6.0}, 1), //TSFMIN
Opm::DynamicState<double>(std::vector<double>{7.0}, 1), //TSFCNV
Opm::DynamicState<double>(std::vector<double>{8.0}, 1), //TFDIFF
Opm::DynamicState<double>(std::vector<double>{9.0}, 1), //THRUPT
Opm::DynamicState<double>(std::vector<double>{10.0}, 1), //TMAXWC
Opm::DynamicState<int>(std::vector<int>{1}, 1), //TMAXWC_has_value
Opm::DynamicState<double>(std::vector<double>{11.0}, 1), //TRGTTE
Opm::DynamicState<double>(std::vector<double>{12.0}, 1), //TRGCNV
Opm::DynamicState<double>(std::vector<double>{13.0}, 1), //TRGMBE
Opm::DynamicState<double>(std::vector<double>{14.0}, 1), //TRGLCV
Opm::DynamicState<double>(std::vector<double>{15.0}, 1), //XXXTTE
Opm::DynamicState<double>(std::vector<double>{16.0}, 1), //XXXCNV
Opm::DynamicState<double>(std::vector<double>{17.0}, 1), //XXXMBE
Opm::DynamicState<double>(std::vector<double>{18.0}, 1), //XXXLCV
Opm::DynamicState<double>(std::vector<double>{19.0}, 1), //XXXWFL
Opm::DynamicState<double>(std::vector<double>{20.0}, 1), ///TRGFIP
Opm::DynamicState<double>(std::vector<double>{21.0}, 1), //TRGSFT
Opm::DynamicState<int>(std::vector<int>{2}, 1), //TRGSFT_has_value
Opm::DynamicState<double>(std::vector<double>{22.0}, 1), // THIONX
Opm::DynamicState<int>(std::vector<int>{3}, 1), //TRWGHT
Opm::DynamicState<int>(std::vector<int>{4}, 1), //NEWTMX
Opm::DynamicState<int>(std::vector<int>{5}, 1), //NEWTMN
Opm::DynamicState<int>(std::vector<int>{6}, 1), //LITMAX
Opm::DynamicState<int>(std::vector<int>{7}, 1), //LITMIN
Opm::DynamicState<int>(std::vector<int>{8}, 1), //MXWSIT
Opm::DynamicState<int>(std::vector<int>{9}, 1), //MXWPIT
Opm::DynamicState<double>(std::vector<double>{23.0}, 1), //DDPLIM
Opm::DynamicState<double>(std::vector<double>{24.0}, 1), //DDSLIM
Opm::DynamicState<double>(std::vector<double>{25.0}, 1), //TGRDPR
Opm::DynamicState<double>(std::vector<double>{26.0}, 1), //XXXDPR
Opm::DynamicState<int>(std::vector<int>{10}, 1), //XXDPR_has_value
std::map<std::string,bool>{{"test", false}}); // resetValue
}
Opm::Action::Condition getCondition()
{
Opm::Action::Quantity q;
q.quantity = "test1";
q.args = {"test2", "test3"};
Opm::Action::Condition val1;
val1.lhs = val1.rhs = q;
val1.logic = Opm::Action::Condition::Logical::OR;
val1.cmp = Opm::Action::Condition::Comparator::LESS;
val1.cmp_string = "test";
return val1;
}
Opm::Action::ActionX getActionX()
{
std::shared_ptr<Opm::Action::ASTNode> node;
node.reset(new Opm::Action::ASTNode(number, FuncType::field,
"test1", {"test2"}, 1.0, {}));
Opm::Action::AST ast(node);
return Opm::Action::ActionX("test", 1, 2.0, 3,
{Opm::DeckKeyword("test", {"test",1},
{getDeckRecord(), getDeckRecord()},
true, false)},
ast, {getCondition()}, 4, 5);
}
#endif
}
@ -2029,6 +2108,236 @@ BOOST_AUTO_TEST_CASE(DeckRecord)
}
BOOST_AUTO_TEST_CASE(Location)
{
#ifdef HAVE_MPI
Opm::Location val1{"test", 1};
auto val2 = PackUnpack(val1);
BOOST_CHECK(std::get<1>(val2) == std::get<2>(val2));
BOOST_CHECK(val1 == std::get<0>(val2));
#endif
}
BOOST_AUTO_TEST_CASE(DeckKeyword)
{
#ifdef HAVE_MPI
Opm::DeckKeyword val1("test", {"test",1},
{getDeckRecord(), getDeckRecord()}, true, false);
auto val2 = PackUnpack(val1);
BOOST_CHECK(std::get<1>(val2) == std::get<2>(val2));
BOOST_CHECK(val1 == std::get<0>(val2));
#endif
}
BOOST_AUTO_TEST_CASE(Deck)
{
#ifdef HAVE_MPI
std::unique_ptr<Opm::UnitSystem> unitSys(new Opm::UnitSystem);
Opm::Deck val1({Opm::DeckKeyword("test", {"test",1},
{getDeckRecord(), getDeckRecord()}, true, false)},
Opm::UnitSystem(), unitSys.get(),
"test2", "test3", 2);
auto val2 = PackUnpack(val1);
BOOST_CHECK(std::get<1>(val2) == std::get<2>(val2));
BOOST_CHECK(val1 == std::get<0>(val2));
#endif
}
BOOST_AUTO_TEST_CASE(Tuning)
{
#ifdef HAVE_MPI
Opm::Tuning val1 = getTuning();
auto val2 = PackUnpack(val1);
BOOST_CHECK(std::get<1>(val2) == std::get<2>(val2));
BOOST_CHECK(val1 == std::get<0>(val2));
#endif
}
BOOST_AUTO_TEST_CASE(ASTNode)
{
#ifdef HAVE_MPI
Opm::Action::ASTNode child(number, FuncType::field, "test3", {"test2"}, 2.0, {});
Opm::Action::ASTNode val1(number, FuncType::field, "test1", {"test2"}, 1.0, {child});
auto val2 = PackUnpack(val1);
BOOST_CHECK(std::get<1>(val2) == std::get<2>(val2));
BOOST_CHECK(val1 == std::get<0>(val2));
#endif
}
BOOST_AUTO_TEST_CASE(AST)
{
#ifdef HAVE_MPI
std::shared_ptr<Opm::Action::ASTNode> node;
node.reset(new Opm::Action::ASTNode(number, FuncType::field,
"test1", {"test2"}, 1.0, {}));
Opm::Action::AST val1(node);
auto val2 = PackUnpack(val1);
BOOST_CHECK(std::get<1>(val2) == std::get<2>(val2));
BOOST_CHECK(val1 == std::get<0>(val2));
#endif
}
BOOST_AUTO_TEST_CASE(Quantity)
{
#ifdef HAVE_MPI
Opm::Action::Quantity val1;
val1.quantity = "test1";
val1.args = {"test2", "test3"};
auto val2 = PackUnpack(val1);
BOOST_CHECK(std::get<1>(val2) == std::get<2>(val2));
BOOST_CHECK(val1 == std::get<0>(val2));
#endif
}
BOOST_AUTO_TEST_CASE(Condition)
{
#ifdef HAVE_MPI
Opm::Action::Condition val1 = getCondition();
auto val2 = PackUnpack(val1);
BOOST_CHECK(std::get<1>(val2) == std::get<2>(val2));
BOOST_CHECK(val1 == std::get<0>(val2));
#endif
}
BOOST_AUTO_TEST_CASE(ActionX)
{
#ifdef HAVE_MPI
Opm::Action::ActionX val1 = getActionX();
auto val2 = PackUnpack(val1);
BOOST_CHECK(std::get<1>(val2) == std::get<2>(val2));
BOOST_CHECK(val1 == std::get<0>(val2));
#endif
}
BOOST_AUTO_TEST_CASE(Actions)
{
#ifdef HAVE_MPI
Opm::Action::Actions val1({getActionX()});
auto val2 = PackUnpack(val1);
BOOST_CHECK(std::get<1>(val2) == std::get<2>(val2));
BOOST_CHECK(val1 == std::get<0>(val2));
#endif
}
BOOST_AUTO_TEST_CASE(Schedule)
{
#ifdef HAVE_MPI
Opm::UnitSystem unitSystem;
Opm::Schedule::WellMap wells;
wells.insert({"test", {{std::make_shared<Opm::Well>(getFullWell())},1}});
Opm::Schedule::GroupMap groups;
groups.insert({"test", {{std::make_shared<Opm::Group>("test1", 1, 2, 3.0, unitSystem,
Opm::Group::GroupType::PRODUCTION,
4.0, true, 5, "test2",
Opm::IOrderSet<std::string>({"test3", "test4"}, {"test3","test4"}),
Opm::IOrderSet<std::string>({"test5", "test6"}, {"test5","test6"}),
Opm::Group::GroupInjectionProperties(),
Opm::Group::GroupProductionProperties())},1}});
using VapType = Opm::OilVaporizationProperties::OilVaporization;
Opm::DynamicState<Opm::OilVaporizationProperties> oilvap{{Opm::OilVaporizationProperties(VapType::VAPPARS,
{1.0, 2.0}, {3.0, 4.0}, {5.0, 6.0},
{false, true}, {7.0, 8.0})},1};
Opm::Events events(Opm::DynamicVector<uint64_t>({1,2,3,4,5}));
std::unique_ptr<Opm::UnitSystem> unitSys(new Opm::UnitSystem);
Opm::Deck sdeck({Opm::DeckKeyword("test", {"test",1},
{getDeckRecord(), getDeckRecord()}, true, false)},
Opm::UnitSystem(), unitSys.get(),
"test2", "test3", 2);
Opm::DynamicVector<Opm::Deck> modifierDeck({sdeck});
std::vector<Opm::MLimits> limits{Opm::MLimits{1,2,3,4,5,6,7,8,9,10,11,12}};
Opm::MessageLimits messageLimits(Opm::DynamicState<Opm::MLimits>(limits,2));
Opm::Runspec runspec(Opm::Phases(true, true, true, false, true, false, true, false),
Opm::Tabdims(1,2,3,4,5,6),
Opm::EndpointScaling(std::bitset<4>(13)),
Opm::Welldims(1,2,3,4),
Opm::WellSegmentDims(1,2,3),
Opm::UDQParams(true, 1, 2.0, 3.0, 4.0),
Opm::EclHysterConfig(true, 1, 2),
Opm::Actdims(1,2,3,4));
Opm::Schedule::VFPProdMap vfpProd {{1, {{std::make_shared<Opm::VFPProdTable>(getVFPProdTable())},1}}};
Opm::Schedule::VFPInjMap vfpIn{{1, {{std::make_shared<Opm::VFPInjTable>(getVFPInjTable())},1}}};
Opm::WellTestConfig::WTESTWell tw{"test", Opm::WellTestConfig::ECONOMIC,
1.0, 2, 3.0, 4};
Opm::WellTestConfig wtc({tw, tw, tw});
Opm::WList wl({"test1", "test2", "test3"});
std::map<std::string,Opm::WList> data{{"test", wl}, {"test2", wl}};
Opm::WListManager wlm(data);
Opm::UDQActive udqa({Opm::UDQActive::InputRecord(1, "test1", "test2",
Opm::UDAControl::WCONPROD_ORAT)},
{Opm::UDQActive::Record("test1", 1, 2, "test2",
Opm::UDAControl::WCONPROD_ORAT)},
{{"test1", 1}}, {{"test2", 2}});
auto model = std::make_shared<Opm::GuideRateModel>(getGuideRateModel());
Opm::GuideRateConfig grc(model,
{{"test1", getGuideRateConfigWell()}},
{{"test2", getGuideRateConfigGroup()}});
Opm::GConSale::GCONSALEGroup group{Opm::UDAValue(1.0),
Opm::UDAValue(2.0),
Opm::UDAValue(3.0),
Opm::GConSale::MaxProcedure::PLUG,
4.0, Opm::UnitSystem()};
Opm::GConSale gcs({{"test1", group}, {"test2", group}});
Opm::GConSump::GCONSUMPGroup grp{Opm::UDAValue(1.0),
Opm::UDAValue(2.0),
"test",
3.0, Opm::UnitSystem()};
Opm::GConSump gcm({{"test1", grp}, {"test2", grp}});
Opm::Action::Actions acnts({getActionX()});
Opm::RFTConfig rftc(getTimeMap(),
{true, 1},
{"test1", "test2"},
{{"test3", 2}},
{{"test1", {{{Opm::RFTConfig::RFT::TIMESTEP, 3}}, 4}}},
{{"test2", {{{Opm::RFTConfig::PLT::REPT, 5}}, 6}}});
Opm::Schedule val1(getTimeMap(),
wells,
groups,
oilvap,
events,
modifierDeck,
getTuning(),
messageLimits,
runspec,
vfpProd,
vfpIn,
{{std::make_shared<Opm::WellTestConfig>(wtc)}, 1},
{{std::make_shared<Opm::WListManager>(wlm)}, 1},
{{std::make_shared<Opm::UDQConfig>(getUDQConfig())}, 1},
{{std::make_shared<Opm::UDQActive>(udqa)}, 1},
{{std::make_shared<Opm::GuideRateConfig>(grc)}, 1},
{{std::make_shared<Opm::GConSale>(gcs)}, 1},
{{std::make_shared<Opm::GConSump>(gcm)}, 1},
{{Opm::Well::ProducerCMode::CRAT}, 1},
{{std::make_shared<Opm::Action::Actions>(acnts)}, 1},
rftc,
{std::vector<int>{1}, 1},
{{"test", events}});
auto val2 = PackUnpack(val1);
BOOST_CHECK(std::get<1>(val2) == std::get<2>(val2));
BOOST_CHECK(val1 == std::get<0>(val2));
#endif
}
bool init_unit_test_func()
{
return true;