remove old serialization support for UDQASTNode

This commit is contained in:
Arne Morten Kvarving 2020-03-16 15:31:06 +01:00
parent 5eb2ec30a5
commit c07fa535bd
3 changed files with 3 additions and 55 deletions

View File

@ -40,7 +40,6 @@
#include <opm/parser/eclipse/EclipseState/Schedule/ScheduleTypes.hpp> #include <opm/parser/eclipse/EclipseState/Schedule/ScheduleTypes.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp> #include <opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Tuning.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/UDQConfig.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQDefine.hpp> #include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQDefine.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQFunction.hpp> #include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQFunction.hpp>
@ -1103,20 +1102,6 @@ std::size_t packSize(const WListManager& data,
return packSize(data.lists(), comm); return packSize(data.lists(), comm);
} }
std::size_t packSize(const UDQASTNode& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.var_type, comm) +
packSize(data.getType(), comm) +
packSize(data.stringValue(), comm) +
packSize(data.scalarValue(), comm) +
packSize(data.getSelectors(), comm) +
packSize(data.getLeft(), comm) +
packSize(data.getRight(), comm);
}
std::size_t packSize(const UDQDefine& data, std::size_t packSize(const UDQDefine& data,
Dune::MPIHelper::MPICommunicator comm) Dune::MPIHelper::MPICommunicator comm)
{ {
@ -2457,20 +2442,6 @@ void pack(const WListManager& data,
pack(data.lists(), buffer, position, comm); pack(data.lists(), buffer, position, comm);
} }
void pack(const UDQASTNode& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.var_type, buffer, position, comm);
pack(data.getType(), buffer, position, comm);
pack(data.stringValue(), buffer, position, comm);
pack(data.scalarValue(), buffer, position, comm);
pack(data.getSelectors(), buffer, position, comm);
pack(data.getLeft(), buffer, position, comm);
pack(data.getRight(), buffer, position, comm);
}
void pack(const UDQDefine& data, void pack(const UDQDefine& data,
std::vector<char>& buffer, int& position, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm) Dune::MPIHelper::MPICommunicator comm)
@ -4279,29 +4250,6 @@ void unpack(WListManager& data,
data = WListManager(lists); data = WListManager(lists);
} }
void unpack(UDQASTNode& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
UDQVarType var_type;
UDQTokenType type;
std::string stringValue;
double scalarValue;
std::vector<std::string> selectors;
std::shared_ptr<UDQASTNode> left;
std::shared_ptr<UDQASTNode> right;
unpack(var_type, buffer, position, comm);
unpack(type, buffer, position, comm);
unpack(stringValue, buffer, position, comm);
unpack(scalarValue, buffer, position, comm);
unpack(selectors, buffer, position, comm);
unpack(left, buffer, position, comm);
unpack(right, buffer, position, comm);
data = UDQASTNode(var_type, type, stringValue, scalarValue, selectors, left, right);
}
void unpack(UDQDefine& data, void unpack(UDQDefine& data,
std::vector<char>& buffer, int& position, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm) Dune::MPIHelper::MPICommunicator comm)
@ -4948,7 +4896,9 @@ INSTANTIATE_PACK(std::map<FaceDir::DirEnum,std::vector<double>>)
INSTANTIATE_PACK(std::map<std::string,Events>) INSTANTIATE_PACK(std::map<std::string,Events>)
INSTANTIATE_PACK(std::map<std::string,std::vector<int>>) INSTANTIATE_PACK(std::map<std::string,std::vector<int>>)
INSTANTIATE_PACK(std::map<std::string,std::map<std::pair<int,int>,int>>) INSTANTIATE_PACK(std::map<std::string,std::map<std::pair<int,int>,int>>)
INSTANTIATE_PACK(std::map<UDQVarType,std::size_t>)
INSTANTIATE_PACK(std::unordered_map<std::string,size_t>) INSTANTIATE_PACK(std::unordered_map<std::string,size_t>)
INSTANTIATE_PACK(std::unordered_map<std::string,std::string>)
INSTANTIATE_PACK(std::pair<bool,double>) INSTANTIATE_PACK(std::pair<bool,double>)
INSTANTIATE_PACK(DynamicState<int>) INSTANTIATE_PACK(DynamicState<int>)
INSTANTIATE_PACK(DynamicState<OilVaporizationProperties>) INSTANTIATE_PACK(DynamicState<OilVaporizationProperties>)

View File

@ -125,7 +125,6 @@ class TlmixparRecord;
class TlmixparTable; class TlmixparTable;
class Tuning; class Tuning;
class UDAValue; class UDAValue;
class UDQASTNode;
class UDQConfig; class UDQConfig;
class UDQDefine; class UDQDefine;
class UDQIndex; class UDQIndex;
@ -570,7 +569,6 @@ ADD_PACK_PROTOTYPES(UDQActive::InputRecord)
ADD_PACK_PROTOTYPES(UDQActive::Record) ADD_PACK_PROTOTYPES(UDQActive::Record)
ADD_PACK_PROTOTYPES(UDQAssign) ADD_PACK_PROTOTYPES(UDQAssign)
ADD_PACK_PROTOTYPES(UDQAssign::AssignRecord) ADD_PACK_PROTOTYPES(UDQAssign::AssignRecord)
ADD_PACK_PROTOTYPES(UDQASTNode)
ADD_PACK_PROTOTYPES(UDQConfig) ADD_PACK_PROTOTYPES(UDQConfig)
ADD_PACK_PROTOTYPES(UDQDefine) ADD_PACK_PROTOTYPES(UDQDefine)
ADD_PACK_PROTOTYPES(UDQIndex) ADD_PACK_PROTOTYPES(UDQIndex)

View File

@ -1671,7 +1671,7 @@ BOOST_AUTO_TEST_CASE(UDQASTNode)
Opm::UDQASTNode val1(Opm::UDQVarType::NONE, Opm::UDQASTNode val1(Opm::UDQVarType::NONE,
Opm::UDQTokenType::error, Opm::UDQTokenType::error,
"test", 1.0, {"test3"}, n1, n1); "test", 1.0, {"test3"}, n1, n1);
auto val2 = PackUnpack(val1); auto val2 = PackUnpack2(val1);
DO_CHECKS(UDQASTNode) DO_CHECKS(UDQASTNode)
#endif #endif
} }