mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
add mpi serialization for Stone1exTable
This commit is contained in:
parent
f9a21100fe
commit
ce8036918b
@ -466,8 +466,9 @@ HANDLE_AS_POD(Regdims)
|
|||||||
HANDLE_AS_POD(RockConfig::RockComp)
|
HANDLE_AS_POD(RockConfig::RockComp)
|
||||||
HANDLE_AS_POD(ROCKRecord)
|
HANDLE_AS_POD(ROCKRecord)
|
||||||
HANDLE_AS_POD(SatFuncControls)
|
HANDLE_AS_POD(SatFuncControls)
|
||||||
HANDLE_AS_POD(StandardCond)
|
|
||||||
HANDLE_AS_POD(ShrateRecord)
|
HANDLE_AS_POD(ShrateRecord)
|
||||||
|
HANDLE_AS_POD(StandardCond)
|
||||||
|
HANDLE_AS_POD(Stone1exRecord)
|
||||||
HANDLE_AS_POD(Tabdims)
|
HANDLE_AS_POD(Tabdims)
|
||||||
HANDLE_AS_POD(TimeStampUTC::YMD)
|
HANDLE_AS_POD(TimeStampUTC::YMD)
|
||||||
HANDLE_AS_POD(TlmixparRecord)
|
HANDLE_AS_POD(TlmixparRecord)
|
||||||
@ -862,6 +863,7 @@ std::size_t packSize(const TableManager& data, Dune::MPIHelper::MPICommunicator
|
|||||||
packSize(data.getRockTable(), comm) +
|
packSize(data.getRockTable(), comm) +
|
||||||
packSize(data.getPlmixparTable(), comm) +
|
packSize(data.getPlmixparTable(), comm) +
|
||||||
packSize(data.getShrateTable(), comm) +
|
packSize(data.getShrateTable(), comm) +
|
||||||
|
packSize(data.getStone1exTable(), comm) +
|
||||||
packSize(data.getTlmixparTable(), comm) +
|
packSize(data.getTlmixparTable(), comm) +
|
||||||
packSize(data.getViscrefTable(), comm) +
|
packSize(data.getViscrefTable(), comm) +
|
||||||
packSize(data.getWatdentTable(), comm) +
|
packSize(data.getWatdentTable(), comm) +
|
||||||
@ -1841,6 +1843,11 @@ std::size_t packSize(const PlyvmhTable& data, Dune::MPIHelper::MPICommunicator c
|
|||||||
return packSize(static_cast<const std::vector<PlyvmhRecord>&>(data), comm);
|
return packSize(static_cast<const std::vector<PlyvmhRecord>&>(data), comm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::size_t packSize(const Stone1exTable& data, Dune::MPIHelper::MPICommunicator comm)
|
||||||
|
{
|
||||||
|
return packSize(static_cast<const std::vector<Stone1exRecord>&>(data), comm);
|
||||||
|
}
|
||||||
|
|
||||||
////// pack routines
|
////// pack routines
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
@ -2515,6 +2522,7 @@ void pack(const TableManager& data, std::vector<char>& buffer, int& position,
|
|||||||
pack(data.getRockTable(), buffer, position, comm);
|
pack(data.getRockTable(), buffer, position, comm);
|
||||||
pack(data.getPlmixparTable(), buffer, position, comm);
|
pack(data.getPlmixparTable(), buffer, position, comm);
|
||||||
pack(data.getShrateTable(), buffer, position, comm);
|
pack(data.getShrateTable(), buffer, position, comm);
|
||||||
|
pack(data.getStone1exTable(), buffer, position, comm);
|
||||||
pack(data.getTlmixparTable(), buffer, position, comm);
|
pack(data.getTlmixparTable(), buffer, position, comm);
|
||||||
pack(data.getViscrefTable(), buffer, position, comm);
|
pack(data.getViscrefTable(), buffer, position, comm);
|
||||||
pack(data.getWatdentTable(), buffer, position, comm);
|
pack(data.getWatdentTable(), buffer, position, comm);
|
||||||
@ -3564,6 +3572,12 @@ void pack(const PlyvmhTable& data, std::vector<char>& buffer, int& position,
|
|||||||
pack(static_cast<const std::vector<PlyvmhRecord>&>(data), buffer, position, comm);
|
pack(static_cast<const std::vector<PlyvmhRecord>&>(data), buffer, position, comm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void pack(const Stone1exTable& data, std::vector<char>& buffer, int& position,
|
||||||
|
Dune::MPIHelper::MPICommunicator comm)
|
||||||
|
{
|
||||||
|
pack(static_cast<const std::vector<Stone1exRecord>&>(data), buffer, position, comm);
|
||||||
|
}
|
||||||
|
|
||||||
/// unpack routines
|
/// unpack routines
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
@ -4462,6 +4476,7 @@ void unpack(TableManager& data, std::vector<char>& buffer, int& position,
|
|||||||
ViscrefTable viscrefTable;
|
ViscrefTable viscrefTable;
|
||||||
PlmixparTable plmixparTable;
|
PlmixparTable plmixparTable;
|
||||||
ShrateTable shrateTable;
|
ShrateTable shrateTable;
|
||||||
|
Stone1exTable stone1exTable;
|
||||||
TlmixparTable tlmixparTable;
|
TlmixparTable tlmixparTable;
|
||||||
WatdentTable watdentTable;
|
WatdentTable watdentTable;
|
||||||
std::vector<PvtwsaltTable> pvtwsaltTables;
|
std::vector<PvtwsaltTable> pvtwsaltTables;
|
||||||
@ -4495,6 +4510,7 @@ void unpack(TableManager& data, std::vector<char>& buffer, int& position,
|
|||||||
unpack(rockTable, buffer, position, comm);
|
unpack(rockTable, buffer, position, comm);
|
||||||
unpack(plmixparTable, buffer, position, comm);
|
unpack(plmixparTable, buffer, position, comm);
|
||||||
unpack(shrateTable, buffer, position, comm);
|
unpack(shrateTable, buffer, position, comm);
|
||||||
|
unpack(stone1exTable, buffer, position, comm);
|
||||||
unpack(tlmixparTable, buffer, position, comm);
|
unpack(tlmixparTable, buffer, position, comm);
|
||||||
unpack(viscrefTable, buffer, position, comm);
|
unpack(viscrefTable, buffer, position, comm);
|
||||||
unpack(watdentTable, buffer, position, comm);
|
unpack(watdentTable, buffer, position, comm);
|
||||||
@ -4527,7 +4543,7 @@ void unpack(TableManager& data, std::vector<char>& buffer, int& position,
|
|||||||
|
|
||||||
data = TableManager(simpleTables, pvtgTables, pvtoTables, rock2dTables,
|
data = TableManager(simpleTables, pvtgTables, pvtoTables, rock2dTables,
|
||||||
rock2dtrTables, pvtwTable, pvcdoTable, densityTable,
|
rock2dtrTables, pvtwTable, pvcdoTable, densityTable,
|
||||||
plyvmhTable, rockTable, plmixparTable, shrateTable,
|
plyvmhTable, rockTable, plmixparTable, shrateTable, stone1exTable,
|
||||||
tlmixparTable, viscrefTable, watdentTable, pvtwsaltTables,
|
tlmixparTable, viscrefTable, watdentTable, pvtwsaltTables,
|
||||||
bdensityTables, sdensityTables, plymwinjTables, skprwatTables,
|
bdensityTables, sdensityTables, plymwinjTables, skprwatTables,
|
||||||
skprpolyTables, tabdims, regdims, eqldims, aqudims, hasImptvd,
|
skprpolyTables, tabdims, regdims, eqldims, aqudims, hasImptvd,
|
||||||
@ -6007,6 +6023,14 @@ void unpack(PlyvmhTable& data, std::vector<char>& buffer, int& position,
|
|||||||
data = PlyvmhTable(pdata);
|
data = PlyvmhTable(pdata);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void unpack(Stone1exTable& data, std::vector<char>& buffer, int& position,
|
||||||
|
Dune::MPIHelper::MPICommunicator comm)
|
||||||
|
{
|
||||||
|
std::vector<Stone1exRecord> pdata;
|
||||||
|
unpack(pdata, buffer, position, comm);
|
||||||
|
data = Stone1exTable(pdata);
|
||||||
|
}
|
||||||
|
|
||||||
#define INSTANTIATE_PACK_VECTOR(...) \
|
#define INSTANTIATE_PACK_VECTOR(...) \
|
||||||
template std::size_t packSize(const std::vector<__VA_ARGS__>& data, \
|
template std::size_t packSize(const std::vector<__VA_ARGS__>& data, \
|
||||||
Dune::MPIHelper::MPICommunicator comm); \
|
Dune::MPIHelper::MPICommunicator comm); \
|
||||||
|
@ -141,6 +141,8 @@ class SkprwatTable;
|
|||||||
class SolventDensityTable;
|
class SolventDensityTable;
|
||||||
class SpiralICD;
|
class SpiralICD;
|
||||||
class StandardCond;
|
class StandardCond;
|
||||||
|
class Stone1exRecord;
|
||||||
|
class Stone1exTable;
|
||||||
class SummaryConfig;
|
class SummaryConfig;
|
||||||
class SummaryNode;
|
class SummaryNode;
|
||||||
class Tabdims;
|
class Tabdims;
|
||||||
@ -605,6 +607,8 @@ ADD_PACK_PROTOTYPES(SkprwatTable)
|
|||||||
ADD_PACK_PROTOTYPES(SolventDensityTable)
|
ADD_PACK_PROTOTYPES(SolventDensityTable)
|
||||||
ADD_PACK_PROTOTYPES(SpiralICD)
|
ADD_PACK_PROTOTYPES(SpiralICD)
|
||||||
ADD_PACK_PROTOTYPES(std::string)
|
ADD_PACK_PROTOTYPES(std::string)
|
||||||
|
ADD_PACK_PROTOTYPES(Stone1exRecord)
|
||||||
|
ADD_PACK_PROTOTYPES(Stone1exTable)
|
||||||
ADD_PACK_PROTOTYPES(SummaryConfig)
|
ADD_PACK_PROTOTYPES(SummaryConfig)
|
||||||
ADD_PACK_PROTOTYPES(SummaryNode)
|
ADD_PACK_PROTOTYPES(SummaryNode)
|
||||||
ADD_PACK_PROTOTYPES(Tabdims)
|
ADD_PACK_PROTOTYPES(Tabdims)
|
||||||
|
@ -1212,6 +1212,7 @@ BOOST_AUTO_TEST_CASE(TableManager)
|
|||||||
Opm::RockTable({Opm::ROCKRecord{1.0,2.0}}),
|
Opm::RockTable({Opm::ROCKRecord{1.0,2.0}}),
|
||||||
Opm::PlmixparTable({Opm::PlmixparRecord{1.0}}),
|
Opm::PlmixparTable({Opm::PlmixparRecord{1.0}}),
|
||||||
Opm::ShrateTable({Opm::ShrateRecord{1.0}}),
|
Opm::ShrateTable({Opm::ShrateRecord{1.0}}),
|
||||||
|
Opm::Stone1exTable({Opm::Stone1exRecord{1.0}}),
|
||||||
Opm::TlmixparTable({Opm::TlmixparRecord{1.0, 2.0}}),
|
Opm::TlmixparTable({Opm::TlmixparRecord{1.0, 2.0}}),
|
||||||
Opm::ViscrefTable({Opm::VISCREFRecord{1.0, 2.0}}),
|
Opm::ViscrefTable({Opm::VISCREFRecord{1.0, 2.0}}),
|
||||||
Opm::WatdentTable({Opm::WATDENTRecord{1.0, 2.0, 3.0}}),
|
Opm::WatdentTable({Opm::WATDENTRecord{1.0, 2.0, 3.0}}),
|
||||||
|
Loading…
Reference in New Issue
Block a user