mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
remove old serialization support for VFPProdTable
This commit is contained in:
parent
58b0ed66fc
commit
777e2f7683
@ -26,7 +26,6 @@
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/MSW/icd.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/RFTConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQEnums.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/VFPProdTable.hpp>
|
||||
#include <dune/common/parallel/mpitraits.hh>
|
||||
|
||||
#define HANDLE_AS_POD(T) \
|
||||
@ -294,23 +293,6 @@ std::size_t packSize(const RestartValue& data, Dune::MPIHelper::MPICommunicator
|
||||
return packSize(data.solution, comm) + packSize(data.wells, comm) + packSize(data.extra, comm);
|
||||
}
|
||||
|
||||
std::size_t packSize(const VFPProdTable& data,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
return packSize(data.getTableNum(), comm) +
|
||||
packSize(data.getDatumDepth(), comm) +
|
||||
packSize(data.getFloType(), comm) +
|
||||
packSize(data.getWFRType(), comm) +
|
||||
packSize(data.getGFRType(), comm) +
|
||||
packSize(data.getALQType(), comm) +
|
||||
packSize(data.getFloAxis(), comm) +
|
||||
packSize(data.getTHPAxis(), comm) +
|
||||
packSize(data.getWFRAxis(), comm) +
|
||||
packSize(data.getGFRAxis(), comm) +
|
||||
packSize(data.getALQAxis(), comm) +
|
||||
packSize(data.getTable(), comm);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
std::size_t packSize(const std::shared_ptr<T>& data,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
@ -580,24 +562,6 @@ void pack(const RestartValue& data, std::vector<char>& buffer, int& position,
|
||||
pack(data.extra, buffer, position, comm);
|
||||
}
|
||||
|
||||
void pack(const VFPProdTable& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
pack(data.getTableNum(), buffer, position, comm);
|
||||
pack(data.getDatumDepth(), buffer, position, comm);
|
||||
pack(data.getFloType(), buffer, position, comm);
|
||||
pack(data.getWFRType(), buffer, position, comm);
|
||||
pack(data.getGFRType(), buffer, position, comm);
|
||||
pack(data.getALQType(), buffer, position, comm);
|
||||
pack(data.getFloAxis(), buffer, position, comm);
|
||||
pack(data.getTHPAxis(), buffer, position, comm);
|
||||
pack(data.getWFRAxis(), buffer, position, comm);
|
||||
pack(data.getGFRAxis(), buffer, position, comm);
|
||||
pack(data.getALQAxis(), buffer, position, comm);
|
||||
pack(data.getTable(), buffer, position, comm);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
void pack(const std::shared_ptr<T>& data, std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
@ -885,37 +849,6 @@ void unpack(RestartValue& data, std::vector<char>& buffer, int& position,
|
||||
unpack(data.extra, buffer, position, comm);
|
||||
}
|
||||
|
||||
void unpack(VFPProdTable& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
int tableNum;
|
||||
double datumDepth;
|
||||
VFPProdTable::FLO_TYPE floType;
|
||||
VFPProdTable::WFR_TYPE wfrType;
|
||||
VFPProdTable::GFR_TYPE gfrType;
|
||||
VFPProdTable::ALQ_TYPE alqType;
|
||||
std::vector<double> floAxis, thpAxis, wfrAxis, gfrAxis, alqAxis;
|
||||
VFPProdTable::array_type table;
|
||||
|
||||
unpack(tableNum, buffer, position, comm);
|
||||
unpack(datumDepth, buffer, position, comm);
|
||||
unpack(floType, buffer, position, comm);
|
||||
unpack(wfrType, buffer, position, comm);
|
||||
unpack(gfrType, buffer, position, comm);
|
||||
unpack(alqType, buffer, position, comm);
|
||||
unpack(floAxis, buffer, position, comm);
|
||||
unpack(thpAxis, buffer, position, comm);
|
||||
unpack(wfrAxis, buffer, position, comm);
|
||||
unpack(gfrAxis, buffer, position, comm);
|
||||
unpack(alqAxis, buffer, position, comm);
|
||||
unpack(table, buffer, position, comm);
|
||||
|
||||
data = VFPProdTable(tableNum, datumDepth, floType, wfrType,
|
||||
gfrType, alqType, floAxis, thpAxis,
|
||||
wfrAxis, gfrAxis, alqAxis, table);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
void unpack(std::shared_ptr<T>& data, std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
@ -959,7 +892,6 @@ INSTANTIATE_PACK_VECTOR(size_t)
|
||||
INSTANTIATE_PACK_VECTOR(std::time_t)
|
||||
INSTANTIATE_PACK_VECTOR(std::array<double, 3>)
|
||||
INSTANTIATE_PACK_VECTOR(std::pair<bool,double>)
|
||||
INSTANTIATE_PACK_VECTOR(std::shared_ptr<VFPProdTable>)
|
||||
INSTANTIATE_PACK_VECTOR(std::map<std::string,int>)
|
||||
INSTANTIATE_PACK_VECTOR(std::pair<std::string,std::vector<size_t>>)
|
||||
INSTANTIATE_PACK_VECTOR(std::pair<int,std::vector<int>>)
|
||||
|
@ -40,8 +40,6 @@
|
||||
namespace Opm
|
||||
{
|
||||
|
||||
class VFPProdTable;
|
||||
|
||||
namespace Mpi
|
||||
{
|
||||
template<class T>
|
||||
@ -350,7 +348,6 @@ ADD_PACK_PROTOTYPES(data::WellRates)
|
||||
ADD_PACK_PROTOTYPES(RestartKey)
|
||||
ADD_PACK_PROTOTYPES(RestartValue)
|
||||
ADD_PACK_PROTOTYPES(std::string)
|
||||
ADD_PACK_PROTOTYPES(VFPProdTable)
|
||||
|
||||
} // end namespace Mpi
|
||||
|
||||
|
@ -1330,7 +1330,7 @@ BOOST_AUTO_TEST_CASE(VFPProdTable)
|
||||
{
|
||||
#ifdef HAVE_MPI
|
||||
Opm::VFPProdTable val1 = getVFPProdTable();
|
||||
auto val2 = PackUnpack(val1);
|
||||
auto val2 = PackUnpack2(val1);
|
||||
DO_CHECKS(VFPProdTable)
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user