mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
add mpi serialization for FoamData
This commit is contained in:
parent
f989b004e0
commit
1f313d6b04
@ -24,6 +24,7 @@
|
|||||||
#include "ParallelRestart.hpp"
|
#include "ParallelRestart.hpp"
|
||||||
#include <opm/parser/eclipse/EclipseState/Grid/NNC.hpp>
|
#include <opm/parser/eclipse/EclipseState/Grid/NNC.hpp>
|
||||||
#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/Edit/EDITNNC.hpp>
|
#include <opm/parser/eclipse/EclipseState/Edit/EDITNNC.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/SimulationConfig/ThresholdPressure.hpp>
|
#include <opm/parser/eclipse/EclipseState/SimulationConfig/ThresholdPressure.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Tables/ColumnSchema.hpp>
|
#include <opm/parser/eclipse/EclipseState/Tables/ColumnSchema.hpp>
|
||||||
@ -192,6 +193,7 @@ HANDLE_AS_POD(data::Connection)
|
|||||||
HANDLE_AS_POD(data::Rates)
|
HANDLE_AS_POD(data::Rates)
|
||||||
HANDLE_AS_POD(data::Segment)
|
HANDLE_AS_POD(data::Segment)
|
||||||
HANDLE_AS_POD(EquilRecord)
|
HANDLE_AS_POD(EquilRecord)
|
||||||
|
HANDLE_AS_POD(FoamData)
|
||||||
|
|
||||||
std::size_t packSize(const data::Well& data, Dune::MPIHelper::MPICommunicator comm)
|
std::size_t packSize(const data::Well& data, Dune::MPIHelper::MPICommunicator comm)
|
||||||
{
|
{
|
||||||
|
@ -41,6 +41,7 @@ class ColumnSchema;
|
|||||||
class EDITNNC;
|
class EDITNNC;
|
||||||
class Equil;
|
class Equil;
|
||||||
class EquilRecord;
|
class EquilRecord;
|
||||||
|
class FoamData;
|
||||||
class NNC;
|
class NNC;
|
||||||
struct NNCdata;
|
struct NNCdata;
|
||||||
class Rock2dTable;
|
class Rock2dTable;
|
||||||
@ -225,6 +226,7 @@ ADD_PACK_PROTOTYPES(data::WellRates)
|
|||||||
ADD_PACK_PROTOTYPES(EDITNNC)
|
ADD_PACK_PROTOTYPES(EDITNNC)
|
||||||
ADD_PACK_PROTOTYPES(Equil)
|
ADD_PACK_PROTOTYPES(Equil)
|
||||||
ADD_PACK_PROTOTYPES(EquilRecord)
|
ADD_PACK_PROTOTYPES(EquilRecord)
|
||||||
|
ADD_PACK_PROTOTYPES(FoamData)
|
||||||
ADD_PACK_PROTOTYPES(NNC)
|
ADD_PACK_PROTOTYPES(NNC)
|
||||||
ADD_PACK_PROTOTYPES(NNCdata)
|
ADD_PACK_PROTOTYPES(NNCdata)
|
||||||
ADD_PACK_PROTOTYPES(RestartKey)
|
ADD_PACK_PROTOTYPES(RestartKey)
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include <opm/parser/eclipse/EclipseState/Edit/EDITNNC.hpp>
|
#include <opm/parser/eclipse/EclipseState/Edit/EDITNNC.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Grid/NNC.hpp>
|
#include <opm/parser/eclipse/EclipseState/Grid/NNC.hpp>
|
||||||
#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/SimulationConfig/ThresholdPressure.hpp>
|
#include <opm/parser/eclipse/EclipseState/SimulationConfig/ThresholdPressure.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Tables/ColumnSchema.hpp>
|
#include <opm/parser/eclipse/EclipseState/Tables/ColumnSchema.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Tables/Rock2dTable.hpp>
|
#include <opm/parser/eclipse/EclipseState/Tables/Rock2dTable.hpp>
|
||||||
@ -114,7 +115,6 @@ Opm::data::Well getWell()
|
|||||||
well1.segments.insert({0, getSegment()});
|
well1.segments.insert({0, getSegment()});
|
||||||
return well1;
|
return well1;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Opm::ThresholdPressure getThresholdPressure()
|
Opm::ThresholdPressure getThresholdPressure()
|
||||||
@ -156,6 +156,14 @@ Opm::EquilRecord getEquilRecord()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Opm::FoamData getFoamData()
|
||||||
|
{
|
||||||
|
return Opm::FoamData(1.0, 2.0, 3.0, true, 4.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -422,6 +430,17 @@ BOOST_AUTO_TEST_CASE(Equil)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BOOST_AUTO_TEST_CASE(FoamData)
|
||||||
|
{
|
||||||
|
#if HAVE_MPI
|
||||||
|
Opm::FoamData val1 = getFoamData();
|
||||||
|
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