remove old serialization support for Group

This commit is contained in:
Arne Morten Kvarving
2020-03-18 09:29:02 +01:00
parent 714caef9c6
commit eef690f910
3 changed files with 1 additions and 86 deletions

View File

@@ -371,26 +371,6 @@ std::size_t packSize(const UnitSystem& data,
packSize(data.use_count(), comm); packSize(data.use_count(), comm);
} }
std::size_t packSize(const Group& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.name(), comm) +
packSize(data.insert_index(), comm) +
packSize(data.initStep(), comm) +
packSize(data.udqUndefined(), comm) +
packSize(data.units(), comm) +
packSize(data.type(), comm) +
packSize(data.getGroupEfficiencyFactor(), comm) +
packSize(data.getTransferGroupEfficiencyFactor(), comm) +
packSize(data.isAvailableForGroupControl(), comm) +
packSize(data.getGroupNetVFPTable(), comm) +
packSize(data.parent(), comm) +
packSize(data.iwells(), comm) +
packSize(data.igroups(), comm) +
packSize(data.injectionProperties(), comm) +
packSize(data.productionProperties(), comm);
}
////// pack routines ////// pack routines
template<class T> template<class T>
@@ -716,27 +696,6 @@ void pack(const UnitSystem& data,
pack(data.use_count(), buffer, position, comm); pack(data.use_count(), buffer, position, comm);
} }
void pack(const Group& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.name(), buffer, position, comm);
pack(data.insert_index(), buffer, position, comm);
pack(data.initStep(), buffer, position, comm);
pack(data.udqUndefined(), buffer, position, comm);
pack(data.units(), buffer, position, comm);
pack(data.type(), buffer, position, comm);
pack(data.getGroupEfficiencyFactor(), buffer, position, comm);
pack(data.getTransferGroupEfficiencyFactor(), buffer, position, comm);
pack(data.isAvailableForGroupControl(), buffer, position, comm);
pack(data.getGroupNetVFPTable(), buffer, position, comm);
pack(data.parent(), buffer, position, comm);
pack(data.iwells(), buffer, position, comm);
pack(data.igroups(), buffer, position, comm);
pack(data.injectionProperties(), buffer, position, comm);
pack(data.productionProperties(), buffer, position, comm);
}
/// unpack routines /// unpack routines
template<class T> template<class T>
@@ -1128,47 +1087,6 @@ void unpack(UnitSystem& data,
data = UnitSystem(name, type, dimensions, use_count); data = UnitSystem(name, type, dimensions, use_count);
} }
void unpack(Group& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
std::string name;
std::size_t insert_index, initStep;
double udqUndefined;
UnitSystem units;
Group::GroupType type;
double groupEfficiencyFactor;
bool transferGroupEfficiencyFactor;
bool availableForGroupControl;
int groupNetVFPTable;
std::string parent;
IOrderSet<std::string> wells, groups;
std::map<Phase, Group::GroupInjectionProperties> injection;
Group::GroupProductionProperties production;
unpack(name, buffer, position, comm);
unpack(insert_index, buffer, position, comm);
unpack(initStep, buffer, position, comm);
unpack(udqUndefined, buffer, position, comm);
unpack(units, buffer, position, comm);
unpack(type, buffer, position, comm);
unpack(groupEfficiencyFactor, buffer, position, comm);
unpack(transferGroupEfficiencyFactor, buffer, position, comm);
unpack(availableForGroupControl, buffer, position, comm);
unpack(groupNetVFPTable, buffer, position, comm);
unpack(parent, buffer, position, comm);
unpack(wells, buffer, position, comm);
unpack(groups, buffer, position, comm);
unpack(injection, buffer, position, comm);
unpack(production, buffer, position, comm);
data = Group(name, insert_index, initStep, udqUndefined,
units, type, groupEfficiencyFactor,
transferGroupEfficiencyFactor,
availableForGroupControl,
groupNetVFPTable, parent, wells, groups,
injection, production);
}
#define INSTANTIATE_PACK_VECTOR(...) \ #define INSTANTIATE_PACK_VECTOR(...) \
template std::size_t packSize(const std::vector<__VA_ARGS__>& data, \ template std::size_t packSize(const std::vector<__VA_ARGS__>& data, \
Dune::MPIHelper::MPICommunicator comm); \ Dune::MPIHelper::MPICommunicator comm); \
@@ -1188,7 +1106,6 @@ INSTANTIATE_PACK_VECTOR(size_t)
INSTANTIATE_PACK_VECTOR(std::time_t) INSTANTIATE_PACK_VECTOR(std::time_t)
INSTANTIATE_PACK_VECTOR(std::array<double, 3>) INSTANTIATE_PACK_VECTOR(std::array<double, 3>)
INSTANTIATE_PACK_VECTOR(std::pair<bool,double>) INSTANTIATE_PACK_VECTOR(std::pair<bool,double>)
INSTANTIATE_PACK_VECTOR(std::shared_ptr<Group>)
INSTANTIATE_PACK_VECTOR(std::shared_ptr<VFPInjTable>) INSTANTIATE_PACK_VECTOR(std::shared_ptr<VFPInjTable>)
INSTANTIATE_PACK_VECTOR(std::shared_ptr<VFPProdTable>) INSTANTIATE_PACK_VECTOR(std::shared_ptr<VFPProdTable>)
INSTANTIATE_PACK_VECTOR(std::map<std::string,int>) INSTANTIATE_PACK_VECTOR(std::map<std::string,int>)

View File

@@ -27,7 +27,6 @@
#include <opm/output/eclipse/EclipseIO.hpp> #include <opm/output/eclipse/EclipseIO.hpp>
#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/Group/Group.hpp>
#include <opm/parser/eclipse/EclipseState/Util/OrderedMap.hpp> #include <opm/parser/eclipse/EclipseState/Util/OrderedMap.hpp>
#include <dune/common/parallel/mpihelper.hh> #include <dune/common/parallel/mpihelper.hh>
@@ -353,7 +352,6 @@ ADD_PACK_PROTOTYPES(data::Solution)
ADD_PACK_PROTOTYPES(data::Well) ADD_PACK_PROTOTYPES(data::Well)
ADD_PACK_PROTOTYPES(data::WellRates) ADD_PACK_PROTOTYPES(data::WellRates)
ADD_PACK_PROTOTYPES(Dimension) ADD_PACK_PROTOTYPES(Dimension)
ADD_PACK_PROTOTYPES(Group)
ADD_PACK_PROTOTYPES(RestartKey) ADD_PACK_PROTOTYPES(RestartKey)
ADD_PACK_PROTOTYPES(RestartValue) ADD_PACK_PROTOTYPES(RestartValue)
ADD_PACK_PROTOTYPES(std::string) ADD_PACK_PROTOTYPES(std::string)

View File

@@ -1633,7 +1633,7 @@ BOOST_AUTO_TEST_CASE(Group)
injection, injection,
Opm::Group::GroupProductionProperties()); Opm::Group::GroupProductionProperties());
auto val2 = PackUnpack(val1); auto val2 = PackUnpack2(val1);
DO_CHECKS(Group) DO_CHECKS(Group)
#endif #endif
} }