remove old serialization support for GConSale

This commit is contained in:
Arne Morten Kvarving
2020-03-17 15:40:52 +01:00
parent 52bd4cb81c
commit 486c9ce8dd
3 changed files with 2 additions and 63 deletions

View File

@@ -656,23 +656,6 @@ std::size_t packSize(const Group& data,
packSize(data.productionProperties(), comm); packSize(data.productionProperties(), comm);
} }
std::size_t packSize(const GConSale::GCONSALEGroup& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.sales_target, comm) +
packSize(data.max_sales_rate, comm) +
packSize(data.min_sales_rate, comm) +
packSize(data.max_proc, comm) +
packSize(data.udq_undefined, comm) +
packSize(data.unit_system, comm);
}
std::size_t packSize(const GConSale& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.getGroups(), comm);
}
std::size_t packSize(const GConSump::GCONSUMPGroup& data, std::size_t packSize(const GConSump::GCONSUMPGroup& data,
Dune::MPIHelper::MPICommunicator comm) Dune::MPIHelper::MPICommunicator comm)
{ {
@@ -1421,25 +1404,6 @@ void pack(const Group& data,
pack(data.productionProperties(), buffer, position, comm); pack(data.productionProperties(), buffer, position, comm);
} }
void pack(const GConSale::GCONSALEGroup& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.sales_target, buffer, position, comm);
pack(data.max_sales_rate, buffer, position, comm);
pack(data.min_sales_rate, buffer, position, comm);
pack(data.max_proc, buffer, position, comm);
pack(data.udq_undefined, buffer, position, comm);
pack(data.unit_system, buffer, position, comm);
}
void pack(const GConSale& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.getGroups(), buffer, position, comm);
}
void pack(const GConSump::GCONSUMPGroup& data, void pack(const GConSump::GCONSUMPGroup& data,
std::vector<char>& buffer, int& position, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm) Dune::MPIHelper::MPICommunicator comm)
@@ -2430,27 +2394,6 @@ void unpack(Group& data,
injection, production); injection, production);
} }
void unpack(GConSale::GCONSALEGroup& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
unpack(data.sales_target, buffer, position, comm);
unpack(data.max_sales_rate, buffer, position, comm);
unpack(data.min_sales_rate, buffer, position, comm);
unpack(data.max_proc, buffer, position, comm);
unpack(data.udq_undefined, buffer, position, comm);
unpack(data.unit_system, buffer, position, comm);
}
void unpack(GConSale& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
std::map<std::string,GConSale::GCONSALEGroup> groups;
unpack(groups, buffer, position, comm);
data = GConSale(groups);
}
void unpack(GConSump::GCONSUMPGroup& data, void unpack(GConSump::GCONSUMPGroup& data,
std::vector<char>& buffer, int& position, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm) Dune::MPIHelper::MPICommunicator comm)
@@ -2743,7 +2686,6 @@ INSTANTIATE_PACK(std::pair<bool,double>)
INSTANTIATE_PACK(std::pair<bool,std::size_t>) INSTANTIATE_PACK(std::pair<bool,std::size_t>)
INSTANTIATE_PACK(DynamicState<int>) INSTANTIATE_PACK(DynamicState<int>)
INSTANTIATE_PACK(DynamicState<std::shared_ptr<Action::Actions>>) 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<GConSump>>)
INSTANTIATE_PACK(DynamicState<Well::ProducerCMode>) INSTANTIATE_PACK(DynamicState<Well::ProducerCMode>)
INSTANTIATE_PACK(DynamicVector<Deck>) INSTANTIATE_PACK(DynamicVector<Deck>)

View File

@@ -28,7 +28,6 @@
#include <opm/output/eclipse/Summary.hpp> #include <opm/output/eclipse/Summary.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/DynamicState.hpp> #include <opm/parser/eclipse/EclipseState/Schedule/DynamicState.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/DynamicVector.hpp> #include <opm/parser/eclipse/EclipseState/Schedule/DynamicVector.hpp>
#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/GConSump.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Group/Group.hpp> #include <opm/parser/eclipse/EclipseState/Schedule/Group/Group.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Well/Well.hpp> #include <opm/parser/eclipse/EclipseState/Schedule/Well/Well.hpp>
@@ -413,8 +412,6 @@ ADD_PACK_PROTOTYPES(DeckItem)
ADD_PACK_PROTOTYPES(DeckKeyword) ADD_PACK_PROTOTYPES(DeckKeyword)
ADD_PACK_PROTOTYPES(DeckRecord) ADD_PACK_PROTOTYPES(DeckRecord)
ADD_PACK_PROTOTYPES(Dimension) ADD_PACK_PROTOTYPES(Dimension)
ADD_PACK_PROTOTYPES(GConSale)
ADD_PACK_PROTOTYPES(GConSale::GCONSALEGroup)
ADD_PACK_PROTOTYPES(GConSump) ADD_PACK_PROTOTYPES(GConSump)
ADD_PACK_PROTOTYPES(GConSump::GCONSUMPGroup) ADD_PACK_PROTOTYPES(GConSump::GCONSUMPGroup)
ADD_PACK_PROTOTYPES(Group) ADD_PACK_PROTOTYPES(Group)

View File

@@ -1855,7 +1855,7 @@ BOOST_AUTO_TEST_CASE(GConSaleGroup)
Opm::UDAValue(3.0), Opm::UDAValue(3.0),
Opm::GConSale::MaxProcedure::PLUG, Opm::GConSale::MaxProcedure::PLUG,
4.0, Opm::UnitSystem()}; 4.0, Opm::UnitSystem()};
auto val2 = PackUnpack(val1); auto val2 = PackUnpack2(val1);
DO_CHECKS(GConSale::GCONSALEGroup) DO_CHECKS(GConSale::GCONSALEGroup)
#endif #endif
} }
@@ -1870,7 +1870,7 @@ BOOST_AUTO_TEST_CASE(GConSale)
Opm::GConSale::MaxProcedure::PLUG, Opm::GConSale::MaxProcedure::PLUG,
4.0, Opm::UnitSystem()}; 4.0, Opm::UnitSystem()};
Opm::GConSale val1({{"test1", group}, {"test2", group}}); Opm::GConSale val1({{"test1", group}, {"test2", group}});
auto val2 = PackUnpack(val1); auto val2 = PackUnpack2(val1);
DO_CHECKS(GConSale) DO_CHECKS(GConSale)
#endif #endif
} }