mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
add mpi serialization for PlymwinjTable
This commit is contained in:
parent
0cadc377ac
commit
cda78cee94
@ -36,6 +36,7 @@
|
|||||||
#include <opm/parser/eclipse/EclipseState/Tables/ColumnSchema.hpp>
|
#include <opm/parser/eclipse/EclipseState/Tables/ColumnSchema.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Tables/FlatTable.hpp>
|
#include <opm/parser/eclipse/EclipseState/Tables/FlatTable.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Tables/JFunc.hpp>
|
#include <opm/parser/eclipse/EclipseState/Tables/JFunc.hpp>
|
||||||
|
#include <opm/parser/eclipse/EclipseState/Tables/PlymwinjTable.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Tables/PolyInjTable.hpp>
|
#include <opm/parser/eclipse/EclipseState/Tables/PolyInjTable.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Tables/PvtgTable.hpp>
|
#include <opm/parser/eclipse/EclipseState/Tables/PvtgTable.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Tables/PvtoTable.hpp>
|
#include <opm/parser/eclipse/EclipseState/Tables/PvtoTable.hpp>
|
||||||
@ -486,6 +487,11 @@ std::size_t packSize(const PolyInjTable& data, Dune::MPIHelper::MPICommunicator
|
|||||||
packSize(data.getTableData(), comm);
|
packSize(data.getTableData(), comm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::size_t packSize(const PlymwinjTable& data, Dune::MPIHelper::MPICommunicator comm)
|
||||||
|
{
|
||||||
|
return packSize(static_cast<const PolyInjTable&>(data), comm);
|
||||||
|
}
|
||||||
|
|
||||||
////// pack routines
|
////// pack routines
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
@ -958,6 +964,12 @@ void pack(const PolyInjTable& data, std::vector<char>& buffer, int& position,
|
|||||||
pack(data.getTableData(), buffer, position, comm);
|
pack(data.getTableData(), buffer, position, comm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void pack(const PlymwinjTable& data, std::vector<char>& buffer, int& position,
|
||||||
|
Dune::MPIHelper::MPICommunicator comm)
|
||||||
|
{
|
||||||
|
pack(static_cast<const PolyInjTable&>(data), buffer, position, comm);
|
||||||
|
}
|
||||||
|
|
||||||
/// unpack routines
|
/// unpack routines
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
@ -1555,6 +1567,12 @@ void unpack(PolyInjTable& data, std::vector<char>& buffer, int& position,
|
|||||||
data = PolyInjTable(throughputs, velocities, tableNumber, tableData);
|
data = PolyInjTable(throughputs, velocities, tableNumber, tableData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void unpack(PlymwinjTable& data, std::vector<char>& buffer, int& position,
|
||||||
|
Dune::MPIHelper::MPICommunicator comm)
|
||||||
|
{
|
||||||
|
unpack(static_cast<PolyInjTable&>(data), buffer, position, comm);
|
||||||
|
}
|
||||||
|
|
||||||
} // end namespace Mpi
|
} // end namespace Mpi
|
||||||
RestartValue loadParallelRestart(const EclipseIO* eclIO, SummaryState& summaryState,
|
RestartValue loadParallelRestart(const EclipseIO* eclIO, SummaryState& summaryState,
|
||||||
const std::vector<Opm::RestartKey>& solutionKeys,
|
const std::vector<Opm::RestartKey>& solutionKeys,
|
||||||
|
@ -56,6 +56,7 @@ class JFunc;
|
|||||||
class NNC;
|
class NNC;
|
||||||
struct NNCdata;
|
struct NNCdata;
|
||||||
class Phases;
|
class Phases;
|
||||||
|
class PlymwinjTable;
|
||||||
class PolyInjTable;
|
class PolyInjTable;
|
||||||
class PVCDORecord;
|
class PVCDORecord;
|
||||||
class PvcdoTable;
|
class PvcdoTable;
|
||||||
@ -281,6 +282,7 @@ ADD_PACK_PROTOTYPES(JFunc)
|
|||||||
ADD_PACK_PROTOTYPES(NNC)
|
ADD_PACK_PROTOTYPES(NNC)
|
||||||
ADD_PACK_PROTOTYPES(NNCdata)
|
ADD_PACK_PROTOTYPES(NNCdata)
|
||||||
ADD_PACK_PROTOTYPES(Phases)
|
ADD_PACK_PROTOTYPES(Phases)
|
||||||
|
ADD_PACK_PROTOTYPES(PlymwinjTable)
|
||||||
ADD_PACK_PROTOTYPES(PolyInjTable)
|
ADD_PACK_PROTOTYPES(PolyInjTable)
|
||||||
ADD_PACK_PROTOTYPES(PVCDORecord)
|
ADD_PACK_PROTOTYPES(PVCDORecord)
|
||||||
ADD_PACK_PROTOTYPES(PvcdoTable)
|
ADD_PACK_PROTOTYPES(PvcdoTable)
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
#include <opm/parser/eclipse/EclipseState/Tables/ColumnSchema.hpp>
|
#include <opm/parser/eclipse/EclipseState/Tables/ColumnSchema.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Tables/FlatTable.hpp>
|
#include <opm/parser/eclipse/EclipseState/Tables/FlatTable.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Tables/JFunc.hpp>
|
#include <opm/parser/eclipse/EclipseState/Tables/JFunc.hpp>
|
||||||
|
#include <opm/parser/eclipse/EclipseState/Tables/PlymwinjTable.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Tables/PvtgTable.hpp>
|
#include <opm/parser/eclipse/EclipseState/Tables/PvtgTable.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Tables/PvtoTable.hpp>
|
#include <opm/parser/eclipse/EclipseState/Tables/PvtoTable.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Tables/Rock2dTable.hpp>
|
#include <opm/parser/eclipse/EclipseState/Tables/Rock2dTable.hpp>
|
||||||
@ -827,6 +828,17 @@ BOOST_AUTO_TEST_CASE(WatdentTable)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BOOST_AUTO_TEST_CASE(PlymwinjTable)
|
||||||
|
{
|
||||||
|
#if HAVE_MPI
|
||||||
|
Opm::PlymwinjTable val1({1.0}, {2.0}, 1, {{1.0}, {2.0}});
|
||||||
|
auto val2 = PackUnpack(val1);
|
||||||
|
BOOST_CHECK(std::get<1>(val2) == std::get<2>(val2));
|
||||||
|
BOOST_CHECK(val1 == std::get<0>(val2));
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool init_unit_test_func()
|
bool init_unit_test_func()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user