mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
remove old serialization support for GuideRateConfig
This commit is contained in:
parent
1d254914e1
commit
52bd4cb81c
@ -29,7 +29,6 @@
|
||||
#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/Group/GuideRateConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/MSW/icd.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/MSW/SpiralICD.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/MSW/Valve.hpp>
|
||||
@ -657,14 +656,6 @@ std::size_t packSize(const Group& data,
|
||||
packSize(data.productionProperties(), comm);
|
||||
}
|
||||
|
||||
std::size_t packSize(const GuideRateConfig& data,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
return packSize(data.getModel(), comm) +
|
||||
packSize(data.getWells(), comm) +
|
||||
packSize(data.getGroups(), comm);
|
||||
}
|
||||
|
||||
std::size_t packSize(const GConSale::GCONSALEGroup& data,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
@ -821,21 +812,6 @@ std::size_t packSize(const Well::WellGuideRate& data,
|
||||
packSize(data.scale_factor, comm);
|
||||
}
|
||||
|
||||
std::size_t packSize(const GuideRateConfig::WellTarget& data,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
return packSize(data.guide_rate, comm) +
|
||||
packSize(data.target, comm) +
|
||||
packSize(data.scaling_factor, comm);
|
||||
}
|
||||
|
||||
std::size_t packSize(const GuideRateConfig::GroupTarget& data,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
return packSize(data.guide_rate, comm) +
|
||||
packSize(data.target, comm);
|
||||
}
|
||||
|
||||
////// pack routines
|
||||
|
||||
template<class T>
|
||||
@ -1445,15 +1421,6 @@ void pack(const Group& data,
|
||||
pack(data.productionProperties(), buffer, position, comm);
|
||||
}
|
||||
|
||||
void pack(const GuideRateConfig& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
pack(data.getModel(), buffer, position, comm);
|
||||
pack(data.getWells(), buffer, position, comm);
|
||||
pack(data.getGroups(), buffer, position, comm);
|
||||
}
|
||||
|
||||
void pack(const GConSale::GCONSALEGroup& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
@ -1626,23 +1593,6 @@ void pack(const Well::WellGuideRate& data,
|
||||
pack(data.scale_factor, buffer, position, comm);
|
||||
}
|
||||
|
||||
void pack(const GuideRateConfig::WellTarget& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
pack(data.guide_rate, buffer, position, comm);
|
||||
pack(data.target, buffer, position, comm);
|
||||
pack(data.scaling_factor, buffer, position, comm);
|
||||
}
|
||||
|
||||
void pack(const GuideRateConfig::GroupTarget& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
pack(data.guide_rate, buffer, position, comm);
|
||||
pack(data.target, buffer, position, comm);
|
||||
}
|
||||
|
||||
/// unpack routines
|
||||
|
||||
template<class T>
|
||||
@ -2480,20 +2430,6 @@ void unpack(Group& data,
|
||||
injection, production);
|
||||
}
|
||||
|
||||
void unpack(GuideRateConfig& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
std::shared_ptr<GuideRateModel> model;
|
||||
std::unordered_map<std::string, GuideRateConfig::WellTarget> wells;
|
||||
std::unordered_map<std::string, GuideRateConfig::GroupTarget> groups;
|
||||
|
||||
unpack(model, buffer, position, comm);
|
||||
unpack(wells, buffer, position, comm);
|
||||
unpack(groups, buffer, position, comm);
|
||||
data = GuideRateConfig(model, wells, groups);
|
||||
}
|
||||
|
||||
void unpack(GConSale::GCONSALEGroup& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
@ -2717,23 +2653,6 @@ void unpack(Well::WellGuideRate& data,
|
||||
unpack(data.scale_factor, buffer, position, comm);
|
||||
}
|
||||
|
||||
void unpack(GuideRateConfig::WellTarget& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
unpack(data.guide_rate, buffer, position, comm);
|
||||
unpack(data.target, buffer, position, comm);
|
||||
unpack(data.scaling_factor, buffer, position, comm);
|
||||
}
|
||||
|
||||
void unpack(GuideRateConfig::GroupTarget& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
unpack(data.guide_rate, buffer, position, comm);
|
||||
unpack(data.target, buffer, position, comm);
|
||||
}
|
||||
|
||||
#define INSTANTIATE_PACK_VECTOR(...) \
|
||||
template std::size_t packSize(const std::vector<__VA_ARGS__>& data, \
|
||||
Dune::MPIHelper::MPICommunicator comm); \
|
||||
@ -2826,7 +2745,6 @@ INSTANTIATE_PACK(DynamicState<int>)
|
||||
INSTANTIATE_PACK(DynamicState<std::shared_ptr<Action::Actions>>)
|
||||
INSTANTIATE_PACK(DynamicState<std::shared_ptr<GConSale>>)
|
||||
INSTANTIATE_PACK(DynamicState<std::shared_ptr<GConSump>>)
|
||||
INSTANTIATE_PACK(DynamicState<std::shared_ptr<GuideRateConfig>>)
|
||||
INSTANTIATE_PACK(DynamicState<Well::ProducerCMode>)
|
||||
INSTANTIATE_PACK(DynamicVector<Deck>)
|
||||
|
||||
|
@ -31,7 +31,6 @@
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Group/GConSale.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Group/GConSump.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Group/Group.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Group/GuideRateConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well/Well.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Util/OrderedMap.hpp>
|
||||
|
||||
@ -418,9 +417,6 @@ ADD_PACK_PROTOTYPES(GConSale)
|
||||
ADD_PACK_PROTOTYPES(GConSale::GCONSALEGroup)
|
||||
ADD_PACK_PROTOTYPES(GConSump)
|
||||
ADD_PACK_PROTOTYPES(GConSump::GCONSUMPGroup)
|
||||
ADD_PACK_PROTOTYPES(GuideRateConfig)
|
||||
ADD_PACK_PROTOTYPES(GuideRateConfig::GroupTarget)
|
||||
ADD_PACK_PROTOTYPES(GuideRateConfig::WellTarget)
|
||||
ADD_PACK_PROTOTYPES(Group)
|
||||
ADD_PACK_PROTOTYPES(Group::GroupInjectionProperties)
|
||||
ADD_PACK_PROTOTYPES(Group::GroupProductionProperties)
|
||||
|
@ -1818,7 +1818,7 @@ BOOST_AUTO_TEST_CASE(GuideRateConfigGroup)
|
||||
{
|
||||
#ifdef HAVE_MPI
|
||||
Opm::GuideRateConfig::GroupTarget val1 = getGuideRateConfigGroup();
|
||||
auto val2 = PackUnpack(val1);
|
||||
auto val2 = PackUnpack2(val1);
|
||||
DO_CHECKS(GuideRateConfig::GroupTarget)
|
||||
#endif
|
||||
}
|
||||
@ -1828,7 +1828,7 @@ BOOST_AUTO_TEST_CASE(GuideRateConfigWell)
|
||||
{
|
||||
#ifdef HAVE_MPI
|
||||
Opm::GuideRateConfig::WellTarget val1 = getGuideRateConfigWell();
|
||||
auto val2 = PackUnpack(val1);
|
||||
auto val2 = PackUnpack2(val1);
|
||||
DO_CHECKS(GuideRateConfig::WellTarget)
|
||||
#endif
|
||||
}
|
||||
@ -1841,7 +1841,7 @@ BOOST_AUTO_TEST_CASE(GuideRateConfig)
|
||||
Opm::GuideRateConfig val1(model,
|
||||
{{"test1", getGuideRateConfigWell()}},
|
||||
{{"test2", getGuideRateConfigGroup()}});
|
||||
auto val2 = PackUnpack(val1);
|
||||
auto val2 = PackUnpack2(val1);
|
||||
DO_CHECKS(GuideRateConfig)
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user