mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
remove old serialization support for ASTNode
This commit is contained in:
parent
195bb87712
commit
d9ab0e7522
@ -56,6 +56,7 @@
|
|||||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/checkDeck.hpp>
|
#include <opm/parser/eclipse/EclipseState/checkDeck.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||||
|
#include <opm/parser/eclipse/EclipseState/Schedule/Action/ASTNode.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQAssign.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQAssign.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQActive.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQActive.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQASTNode.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQASTNode.hpp>
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/checkDeck.hpp>
|
#include <opm/parser/eclipse/EclipseState/checkDeck.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/ArrayDimChecker.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/ArrayDimChecker.hpp>
|
||||||
|
#include <opm/parser/eclipse/EclipseState/Schedule/Action/ASTNode.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQActive.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/UDQAssign.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQASTNode.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQASTNode.hpp>
|
||||||
|
@ -27,7 +27,6 @@
|
|||||||
#include <opm/parser/eclipse/EclipseState/Schedule/Action/ActionAST.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/Actions.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/Action/ActionX.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/Action/Condition.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/MSW/icd.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/SpiralICD.hpp>
|
||||||
@ -691,17 +690,6 @@ std::size_t packSize(const Deck& data,
|
|||||||
packSize(data.unitSystemAccessCount(), comm);
|
packSize(data.unitSystemAccessCount(), 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,
|
std::size_t packSize(const Action::AST& data,
|
||||||
Dune::MPIHelper::MPICommunicator comm)
|
Dune::MPIHelper::MPICommunicator comm)
|
||||||
{
|
{
|
||||||
@ -1411,18 +1399,6 @@ void pack(const Deck& data,
|
|||||||
pack(data.unitSystemAccessCount(), buffer, position, comm);
|
pack(data.unitSystemAccessCount(), 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,
|
void pack(const Action::AST& data,
|
||||||
std::vector<char>& buffer, int& position,
|
std::vector<char>& buffer, int& position,
|
||||||
Dune::MPIHelper::MPICommunicator comm)
|
Dune::MPIHelper::MPICommunicator comm)
|
||||||
@ -2384,25 +2360,6 @@ void unpack(Deck& data, std::vector<char>& buffer, int& position,
|
|||||||
activeUnitSystem.get(), dataFile, inputPath, accessCount);
|
activeUnitSystem.get(), dataFile, inputPath, accessCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
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,
|
void unpack(Action::AST& data, std::vector<char>& buffer, int& position,
|
||||||
Dune::MPIHelper::MPICommunicator comm)
|
Dune::MPIHelper::MPICommunicator comm)
|
||||||
{
|
{
|
||||||
|
@ -47,7 +47,6 @@ namespace Action {
|
|||||||
class Actions;
|
class Actions;
|
||||||
class ActionX;
|
class ActionX;
|
||||||
class AST;
|
class AST;
|
||||||
class ASTNode;
|
|
||||||
class Condition;
|
class Condition;
|
||||||
class Quantity;
|
class Quantity;
|
||||||
}
|
}
|
||||||
@ -393,7 +392,6 @@ void unpack(char* str, std::size_t length, std::vector<char>& buffer, int& posit
|
|||||||
ADD_PACK_PROTOTYPES(Action::Actions)
|
ADD_PACK_PROTOTYPES(Action::Actions)
|
||||||
ADD_PACK_PROTOTYPES(Action::ActionX)
|
ADD_PACK_PROTOTYPES(Action::ActionX)
|
||||||
ADD_PACK_PROTOTYPES(Action::AST)
|
ADD_PACK_PROTOTYPES(Action::AST)
|
||||||
ADD_PACK_PROTOTYPES(Action::ASTNode)
|
|
||||||
ADD_PACK_PROTOTYPES(Action::Condition)
|
ADD_PACK_PROTOTYPES(Action::Condition)
|
||||||
ADD_PACK_PROTOTYPES(Action::Quantity)
|
ADD_PACK_PROTOTYPES(Action::Quantity)
|
||||||
ADD_PACK_PROTOTYPES(Connection)
|
ADD_PACK_PROTOTYPES(Connection)
|
||||||
|
@ -1995,7 +1995,7 @@ BOOST_AUTO_TEST_CASE(ASTNode)
|
|||||||
#ifdef HAVE_MPI
|
#ifdef HAVE_MPI
|
||||||
Opm::Action::ASTNode child(number, FuncType::field, "test3", {"test2"}, 2.0, {});
|
Opm::Action::ASTNode child(number, FuncType::field, "test3", {"test2"}, 2.0, {});
|
||||||
Opm::Action::ASTNode val1(number, FuncType::field, "test1", {"test2"}, 1.0, {child});
|
Opm::Action::ASTNode val1(number, FuncType::field, "test1", {"test2"}, 1.0, {child});
|
||||||
auto val2 = PackUnpack(val1);
|
auto val2 = PackUnpack2(val1);
|
||||||
DO_CHECKS(Action::ASTNode)
|
DO_CHECKS(Action::ASTNode)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user