mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-29 04:23:48 -06:00
add mpi serialization for SkprwatTable
This commit is contained in:
parent
81602af103
commit
fab1b9eaf1
@ -44,6 +44,7 @@
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/Rock2dtrTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SimpleTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SkprpolyTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SkprwatTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/TableColumn.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/TableContainer.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/TableSchema.hpp>
|
||||
@ -499,6 +500,11 @@ std::size_t packSize(const SkprpolyTable& data, Dune::MPIHelper::MPICommunicator
|
||||
packSize(data.referenceConcentration(), comm);
|
||||
}
|
||||
|
||||
std::size_t packSize(const SkprwatTable& data, Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
return packSize(static_cast<const PolyInjTable&>(data), comm);
|
||||
}
|
||||
|
||||
////// pack routines
|
||||
|
||||
template<class T>
|
||||
@ -984,6 +990,12 @@ void pack(const SkprpolyTable& data, std::vector<char>& buffer, int& position,
|
||||
pack(data.referenceConcentration(), buffer, position, comm);
|
||||
}
|
||||
|
||||
void pack(const SkprwatTable& data, std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
pack(static_cast<const PolyInjTable&>(data), buffer, position, comm);
|
||||
}
|
||||
|
||||
/// unpack routines
|
||||
|
||||
template<class T>
|
||||
@ -1596,6 +1608,12 @@ void unpack(SkprpolyTable& data, std::vector<char>& buffer, int& position,
|
||||
data.setReferenceConcentration(refConcentration);
|
||||
}
|
||||
|
||||
void unpack(SkprwatTable& data, std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
unpack(static_cast<PolyInjTable&>(data), buffer, position, comm);
|
||||
}
|
||||
|
||||
} // end namespace Mpi
|
||||
RestartValue loadParallelRestart(const EclipseIO* eclIO, SummaryState& summaryState,
|
||||
const std::vector<Opm::RestartKey>& solutionKeys,
|
||||
|
@ -72,6 +72,7 @@ class Runspec;
|
||||
class SimulationConfig;
|
||||
class SimpleTable;
|
||||
class SkprpolyTable;
|
||||
class SkprwatTable;
|
||||
class Tabdims;
|
||||
class TableColumn;
|
||||
class TableContainer;
|
||||
@ -302,6 +303,7 @@ ADD_PACK_PROTOTYPES(std::string)
|
||||
ADD_PACK_PROTOTYPES(SimulationConfig)
|
||||
ADD_PACK_PROTOTYPES(SimpleTable)
|
||||
ADD_PACK_PROTOTYPES(SkprpolyTable)
|
||||
ADD_PACK_PROTOTYPES(SkprwatTable)
|
||||
ADD_PACK_PROTOTYPES(Tabdims)
|
||||
ADD_PACK_PROTOTYPES(TableColumn)
|
||||
ADD_PACK_PROTOTYPES(TableContainer)
|
||||
|
@ -46,6 +46,7 @@
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/Rock2dtrTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SimpleTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SkprpolyTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SkprwatTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/Tabdims.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/TableColumn.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/TableContainer.hpp>
|
||||
@ -851,6 +852,17 @@ BOOST_AUTO_TEST_CASE(SkprpolyTable)
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(SkprwatTable)
|
||||
{
|
||||
#if HAVE_MPI
|
||||
Opm::SkprwatTable 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()
|
||||
{
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user