remove old serialization support for ColumnSchema

This commit is contained in:
Arne Morten Kvarving 2020-03-17 10:07:46 +01:00
parent dc21682b3e
commit a3398d58d2
3 changed files with 2 additions and 44 deletions

View File

@ -53,7 +53,6 @@
#include <opm/parser/eclipse/EclipseState/Schedule/Well/WList.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Well/WListManager.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/Aqudims.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/ColumnSchema.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/Eqldims.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/FlatTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/JFunc.hpp>
@ -393,18 +392,6 @@ std::size_t packSize(const Rock2dtrTable& data, Dune::MPIHelper::MPICommunicator
packSize(data.pressureValues(), comm);
}
std::size_t packSize(const ColumnSchema& data, Dune::MPIHelper::MPICommunicator comm)
{
std::size_t res = packSize(data.name(), comm) +
packSize(data.order(), comm) +
packSize(data.getDefaultMode(), comm);
if (data.getDefaultMode() == Table::DEFAULT_CONST) {
res += packSize(data.getDefaultValue(), comm);
}
return res;
}
std::size_t packSize(const TableSchema& data, Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.getColumns(), comm);
@ -1577,16 +1564,6 @@ void pack(const Rock2dtrTable& data, std::vector<char>& buffer, int& position,
pack(data.pressureValues(), buffer, position, comm);
}
void pack(const ColumnSchema& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.name(), buffer, position, comm);
pack(data.order(), buffer, position, comm);
pack(data.getDefaultMode(), buffer, position, comm);
if (data.getDefaultMode() == Table::DEFAULT_CONST)
pack(data.getDefaultValue(), buffer, position, comm);
}
void pack(const TableSchema& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
@ -2826,23 +2803,6 @@ void unpack(Rock2dtrTable& data, std::vector<char>& buffer, int& position,
data = Rock2dtrTable(transMultValues, pressureValues);
}
void unpack(ColumnSchema& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
std::string name;
Table::ColumnOrderEnum order;
Table::DefaultAction action;
unpack(name, buffer, position, comm);
unpack(order, buffer, position, comm);
unpack(action, buffer, position, comm);
if (action == Table::DEFAULT_CONST) {
double value;
unpack(value, buffer, position, comm);
data = ColumnSchema(name, order, value);
} else
data = ColumnSchema(name, order, action);
}
void unpack(TableSchema& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{

View File

@ -59,7 +59,6 @@ namespace Action {
}
class Aqudims;
class ColumnSchema;
class Connection;
class DeckItem;
class DeckRecord;
@ -461,7 +460,6 @@ ADD_PACK_PROTOTYPES(Action::ASTNode)
ADD_PACK_PROTOTYPES(Action::Condition)
ADD_PACK_PROTOTYPES(Action::Quantity)
ADD_PACK_PROTOTYPES(Aqudims)
ADD_PACK_PROTOTYPES(ColumnSchema)
ADD_PACK_PROTOTYPES(Connection)
ADD_PACK_PROTOTYPES(data::CellData)
ADD_PACK_PROTOTYPES(data::Connection)

View File

@ -736,10 +736,10 @@ BOOST_AUTO_TEST_CASE(ColumnSchema)
#if HAVE_MPI
Opm::ColumnSchema val1("test1", Opm::Table::INCREASING,
Opm::Table::DEFAULT_LINEAR);
auto val2 = PackUnpack(val1);
auto val2 = PackUnpack2(val1);
DO_CHECKS(ColumnSchema)
val1 = Opm::ColumnSchema("test2", Opm::Table::DECREASING, 1.0);
val2 = PackUnpack(val1);
val2 = PackUnpack2(val1);
DO_CHECKS(ColumnSchema)
#endif
}