mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Add serialization for AquiferConfig
This commit is contained in:
parent
ff3c634924
commit
86972dc494
@ -562,6 +562,13 @@ std::size_t packSize(const AquiferCT& data, Dune::MPIHelper::MPICommunicator com
|
|||||||
return packSize(data.data(), comm);
|
return packSize(data.data(), comm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::size_t packSize(const AquiferConfig& data, Dune::MPIHelper::MPICommunicator comm)
|
||||||
|
{
|
||||||
|
return packSize(data.fetp(), comm) +
|
||||||
|
packSize(data.ct(), comm) +
|
||||||
|
packSize(data.connections(), comm);
|
||||||
|
}
|
||||||
|
|
||||||
std::size_t packSize(const Aquancon::AquancCell& data, Dune::MPIHelper::MPICommunicator comm)
|
std::size_t packSize(const Aquancon::AquancCell& data, Dune::MPIHelper::MPICommunicator comm)
|
||||||
{
|
{
|
||||||
return packSize(data.aquiferID, comm) +
|
return packSize(data.aquiferID, comm) +
|
||||||
@ -2354,6 +2361,13 @@ void pack(const Aquifetp& data, std::vector<char>& buffer, int& position,
|
|||||||
pack(data.data(), buffer, position, comm);
|
pack(data.data(), buffer, position, comm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void pack(const AquiferConfig& data, std::vector<char>& buffer, int& position,
|
||||||
|
Dune::MPIHelper::MPICommunicator comm) {
|
||||||
|
pack(data.fetp(), buffer, position, comm);
|
||||||
|
pack(data.ct(), buffer, position, comm);
|
||||||
|
pack(data.connections(), buffer, position, comm);
|
||||||
|
}
|
||||||
|
|
||||||
void pack(const Aquancon::AquancCell& data, std::vector<char>& buffer, int& position,
|
void pack(const Aquancon::AquancCell& data, std::vector<char>& buffer, int& position,
|
||||||
Dune::MPIHelper::MPICommunicator comm) {
|
Dune::MPIHelper::MPICommunicator comm) {
|
||||||
pack(data.aquiferID, buffer, position, comm);
|
pack(data.aquiferID, buffer, position, comm);
|
||||||
@ -4370,6 +4384,17 @@ void unpack(Aquancon::AquancCell& data, std::vector<char>& buffer, int& position
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void unpack(AquiferConfig& data, std::vector<char>& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) {
|
||||||
|
Aquifetp fetp;
|
||||||
|
AquiferCT ct;
|
||||||
|
Aquancon conn;
|
||||||
|
|
||||||
|
unpack(fetp, buffer, position, comm);
|
||||||
|
unpack(ct, buffer, position, comm);
|
||||||
|
unpack(conn, buffer, position, comm);
|
||||||
|
data = AquiferConfig(fetp, ct, conn);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void unpack(Aquancon& data, std::vector<char>& buffer, int& position, Dune::MPIHelper::MPICommunicator comm)
|
void unpack(Aquancon& data, std::vector<char>& buffer, int& position, Dune::MPIHelper::MPICommunicator comm)
|
||||||
{
|
{
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
#include <opm/output/eclipse/RestartValue.hpp>
|
#include <opm/output/eclipse/RestartValue.hpp>
|
||||||
#include <opm/output/eclipse/EclipseIO.hpp>
|
#include <opm/output/eclipse/EclipseIO.hpp>
|
||||||
#include <opm/output/eclipse/Summary.hpp>
|
#include <opm/output/eclipse/Summary.hpp>
|
||||||
|
#include <opm/parser/eclipse/EclipseState/AquiferConfig.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Aquancon.hpp>
|
#include <opm/parser/eclipse/EclipseState/Aquancon.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/AquiferCT.hpp>
|
#include <opm/parser/eclipse/EclipseState/AquiferCT.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Aquifetp.hpp>
|
#include <opm/parser/eclipse/EclipseState/Aquifetp.hpp>
|
||||||
@ -672,6 +673,7 @@ ADD_PACK_PROTOTYPES(Action::ASTNode)
|
|||||||
ADD_PACK_PROTOTYPES(Action::Condition)
|
ADD_PACK_PROTOTYPES(Action::Condition)
|
||||||
ADD_PACK_PROTOTYPES(Action::Quantity)
|
ADD_PACK_PROTOTYPES(Action::Quantity)
|
||||||
ADD_PACK_PROTOTYPES(Aqudims)
|
ADD_PACK_PROTOTYPES(Aqudims)
|
||||||
|
ADD_PACK_PROTOTYPES(AquiferConfig)
|
||||||
ADD_PACK_PROTOTYPES(Aquancon)
|
ADD_PACK_PROTOTYPES(Aquancon)
|
||||||
ADD_PACK_PROTOTYPES(Aquancon::AquancCell)
|
ADD_PACK_PROTOTYPES(Aquancon::AquancCell)
|
||||||
ADD_PACK_PROTOTYPES(AquiferCT)
|
ADD_PACK_PROTOTYPES(AquiferCT)
|
||||||
|
@ -1925,6 +1925,19 @@ BOOST_AUTO_TEST_CASE(Aquancon)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOST_AUTO_TEST_CASE(AquferConfig)
|
||||||
|
{
|
||||||
|
#ifdef HAVE_MPI
|
||||||
|
Opm::Aquifetp fetp = getAquifetp();
|
||||||
|
Opm::AquiferCT ct = getAquiferCT();
|
||||||
|
Opm::Aquancon conn = getAquancon();
|
||||||
|
Opm::AquiferConfig val1(fetp, ct, conn);
|
||||||
|
auto val2 = PackUnpack(val1);
|
||||||
|
DO_CHECKS(AquiferConfig);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(GuideRateModel)
|
BOOST_AUTO_TEST_CASE(GuideRateModel)
|
||||||
|
Loading…
Reference in New Issue
Block a user