mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Revert "add mpi serialization for PolymerConfig"
This reverts commit 5d0e9164f3
.
This commit is contained in:
parent
f8a113d7d0
commit
c18beb40f3
@ -31,7 +31,6 @@
|
|||||||
#include <opm/parser/eclipse/EclipseState/InitConfig/Equil.hpp>
|
#include <opm/parser/eclipse/EclipseState/InitConfig/Equil.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/InitConfig/FoamConfig.hpp>
|
#include <opm/parser/eclipse/EclipseState/InitConfig/FoamConfig.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp>
|
#include <opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/InitConfig/PolymerConfig.hpp>
|
|
||||||
#include <opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp>
|
#include <opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/IOConfig/RestartConfig.hpp>
|
#include <opm/parser/eclipse/EclipseState/IOConfig/RestartConfig.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Edit/EDITNNC.hpp>
|
#include <opm/parser/eclipse/EclipseState/Edit/EDITNNC.hpp>
|
||||||
@ -689,16 +688,10 @@ std::size_t packSize(const FoamConfig& data, Dune::MPIHelper::MPICommunicator co
|
|||||||
packSize(data.getMobilityModel(), comm);
|
packSize(data.getMobilityModel(), comm);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::size_t packSize(const PolymerConfig& data, Dune::MPIHelper::MPICommunicator comm)
|
|
||||||
{
|
|
||||||
return packSize(data.shrate(), comm);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::size_t packSize(const InitConfig& data, Dune::MPIHelper::MPICommunicator comm)
|
std::size_t packSize(const InitConfig& data, Dune::MPIHelper::MPICommunicator comm)
|
||||||
{
|
{
|
||||||
return packSize(data.getEquil(), comm) +
|
return packSize(data.getEquil(), comm) +
|
||||||
packSize(data.getFoamConfig(), comm) +
|
packSize(data.getFoamConfig(), comm) +
|
||||||
packSize(data.getPolymerConfig(), comm) +
|
|
||||||
packSize(data.filleps(), comm) +
|
packSize(data.filleps(), comm) +
|
||||||
packSize(data.hasGravity(), comm) +
|
packSize(data.hasGravity(), comm) +
|
||||||
packSize(data.restartRequested(), comm) +
|
packSize(data.restartRequested(), comm) +
|
||||||
@ -2318,18 +2311,11 @@ void pack(const FoamConfig& data, std::vector<char>& buffer, int& position,
|
|||||||
pack(data.getMobilityModel(), buffer, position, comm);
|
pack(data.getMobilityModel(), buffer, position, comm);
|
||||||
}
|
}
|
||||||
|
|
||||||
void pack(const PolymerConfig& data, std::vector<char>& buffer, int& position,
|
|
||||||
Dune::MPIHelper::MPICommunicator comm)
|
|
||||||
{
|
|
||||||
pack(data.shrate(), buffer, position, comm);
|
|
||||||
}
|
|
||||||
|
|
||||||
void pack(const InitConfig& data, std::vector<char>& buffer, int& position,
|
void pack(const InitConfig& data, std::vector<char>& buffer, int& position,
|
||||||
Dune::MPIHelper::MPICommunicator comm)
|
Dune::MPIHelper::MPICommunicator comm)
|
||||||
{
|
{
|
||||||
pack(data.getEquil(), buffer, position, comm);
|
pack(data.getEquil(), buffer, position, comm);
|
||||||
pack(data.getFoamConfig(), buffer, position, comm);
|
pack(data.getFoamConfig(), buffer, position, comm);
|
||||||
pack(data.getPolymerConfig(), buffer, position, comm);
|
|
||||||
pack(data.filleps(), buffer, position, comm);
|
pack(data.filleps(), buffer, position, comm);
|
||||||
pack(data.hasGravity(), buffer, position, comm);
|
pack(data.hasGravity(), buffer, position, comm);
|
||||||
pack(data.restartRequested(), buffer, position, comm);
|
pack(data.restartRequested(), buffer, position, comm);
|
||||||
@ -4187,32 +4173,22 @@ void unpack(FoamConfig& data, std::vector<char>& buffer, int& position,
|
|||||||
data = FoamConfig(records, transport_phase, mobility_model);
|
data = FoamConfig(records, transport_phase, mobility_model);
|
||||||
}
|
}
|
||||||
|
|
||||||
void unpack(PolymerConfig& data, std::vector<char>& buffer, int& position,
|
|
||||||
Dune::MPIHelper::MPICommunicator comm)
|
|
||||||
{
|
|
||||||
bool shrate;
|
|
||||||
unpack(shrate, buffer, position, comm);
|
|
||||||
data = PolymerConfig(shrate);
|
|
||||||
}
|
|
||||||
|
|
||||||
void unpack(InitConfig& data, std::vector<char>& buffer, int& position,
|
void unpack(InitConfig& data, std::vector<char>& buffer, int& position,
|
||||||
Dune::MPIHelper::MPICommunicator comm)
|
Dune::MPIHelper::MPICommunicator comm)
|
||||||
{
|
{
|
||||||
Equil equil;
|
Equil equil;
|
||||||
FoamConfig foam;
|
FoamConfig foam;
|
||||||
PolymerConfig polymer;
|
|
||||||
bool filleps, hasGravity, restartRequested;
|
bool filleps, hasGravity, restartRequested;
|
||||||
int restartStep;
|
int restartStep;
|
||||||
std::string restartRootName;
|
std::string restartRootName;
|
||||||
unpack(equil, buffer, position, comm);
|
unpack(equil, buffer, position, comm);
|
||||||
unpack(foam, buffer, position, comm);
|
unpack(foam, buffer, position, comm);
|
||||||
unpack(polymer, buffer, position, comm);
|
|
||||||
unpack(filleps, buffer, position, comm);
|
unpack(filleps, buffer, position, comm);
|
||||||
unpack(hasGravity, buffer, position, comm);
|
unpack(hasGravity, buffer, position, comm);
|
||||||
unpack(restartRequested, buffer, position, comm);
|
unpack(restartRequested, buffer, position, comm);
|
||||||
unpack(restartStep, buffer, position, comm);
|
unpack(restartStep, buffer, position, comm);
|
||||||
unpack(restartRootName, buffer, position, comm);
|
unpack(restartRootName, buffer, position, comm);
|
||||||
data = InitConfig(equil, foam, polymer, filleps, hasGravity,
|
data = InitConfig(equil, foam, filleps, hasGravity,
|
||||||
restartRequested, restartStep, restartRootName);
|
restartRequested, restartStep, restartRootName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,7 +114,6 @@ class PlyvmhTable;
|
|||||||
class PolyInjTable;
|
class PolyInjTable;
|
||||||
class PVCDORecord;
|
class PVCDORecord;
|
||||||
class PvcdoTable;
|
class PvcdoTable;
|
||||||
class PolymerConfig;
|
|
||||||
class PlmixparRecord;
|
class PlmixparRecord;
|
||||||
class PlmixparTable;
|
class PlmixparTable;
|
||||||
class PvtgTable;
|
class PvtgTable;
|
||||||
@ -573,7 +572,6 @@ ADD_PACK_PROTOTYPES(PlymwinjTable)
|
|||||||
ADD_PACK_PROTOTYPES(PlyvmhRecord)
|
ADD_PACK_PROTOTYPES(PlyvmhRecord)
|
||||||
ADD_PACK_PROTOTYPES(PlyvmhTable)
|
ADD_PACK_PROTOTYPES(PlyvmhTable)
|
||||||
ADD_PACK_PROTOTYPES(PolyInjTable)
|
ADD_PACK_PROTOTYPES(PolyInjTable)
|
||||||
ADD_PACK_PROTOTYPES(PolymerConfig)
|
|
||||||
ADD_PACK_PROTOTYPES(PVCDORecord)
|
ADD_PACK_PROTOTYPES(PVCDORecord)
|
||||||
ADD_PACK_PROTOTYPES(PvcdoTable)
|
ADD_PACK_PROTOTYPES(PvcdoTable)
|
||||||
ADD_PACK_PROTOTYPES(PvtgTable)
|
ADD_PACK_PROTOTYPES(PvtgTable)
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
#include <opm/parser/eclipse/EclipseState/InitConfig/Equil.hpp>
|
#include <opm/parser/eclipse/EclipseState/InitConfig/Equil.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/InitConfig/FoamConfig.hpp>
|
#include <opm/parser/eclipse/EclipseState/InitConfig/FoamConfig.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp>
|
#include <opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/InitConfig/PolymerConfig.hpp>
|
|
||||||
#include <opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp>
|
#include <opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/IOConfig/RestartConfig.hpp>
|
#include <opm/parser/eclipse/EclipseState/IOConfig/RestartConfig.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/Action/ActionAST.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/Action/ActionAST.hpp>
|
||||||
@ -807,21 +806,11 @@ BOOST_AUTO_TEST_CASE(FoamConfig)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(PolymerConfig)
|
|
||||||
{
|
|
||||||
#if HAVE_MPI
|
|
||||||
Opm::PolymerConfig val1(true);
|
|
||||||
auto val2 = PackUnpack(val1);
|
|
||||||
DO_CHECKS(PolymerConfig)
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(InitConfig)
|
BOOST_AUTO_TEST_CASE(InitConfig)
|
||||||
{
|
{
|
||||||
#if HAVE_MPI
|
#if HAVE_MPI
|
||||||
Opm::InitConfig val1(Opm::Equil({getEquilRecord(), getEquilRecord()}),
|
Opm::InitConfig val1(Opm::Equil({getEquilRecord(), getEquilRecord()}),
|
||||||
getFoamConfig(), Opm::PolymerConfig(true),
|
getFoamConfig(),
|
||||||
true, true, true, 20, "test1");
|
true, true, true, 20, "test1");
|
||||||
auto val2 = PackUnpack(val1);
|
auto val2 = PackUnpack(val1);
|
||||||
DO_CHECKS(InitConfig)
|
DO_CHECKS(InitConfig)
|
||||||
@ -2288,7 +2277,7 @@ BOOST_AUTO_TEST_CASE(EclipseConfig)
|
|||||||
Opm::IOConfig io(true, false, true, false, false, true, "test1", true,
|
Opm::IOConfig io(true, false, true, false, false, true, "test1", true,
|
||||||
"test2", true, "test3", false);
|
"test2", true, "test3", false);
|
||||||
Opm::InitConfig init(Opm::Equil({getEquilRecord(), getEquilRecord()}),
|
Opm::InitConfig init(Opm::Equil({getEquilRecord(), getEquilRecord()}),
|
||||||
getFoamConfig(), Opm::PolymerConfig(true),
|
getFoamConfig(),
|
||||||
true, true, true, 20, "test1");
|
true, true, true, 20, "test1");
|
||||||
Opm::EclipseConfig val1{init, io};
|
Opm::EclipseConfig val1{init, io};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user