mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
add mpi serialization for Tuning
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/OilVaporizationProperties.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/RFTConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Tuning.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQActive.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQAssign.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQASTNode.hpp>
|
||||
@@ -352,7 +353,6 @@ Opm::GuideRateModel getGuideRateModel()
|
||||
Opm::UDAValue(10.0),
|
||||
Opm::UDAValue(11.0)});
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Opm::GuideRateConfig::GroupTarget getGuideRateConfigGroup()
|
||||
@@ -387,6 +387,49 @@ Opm::DeckRecord getDeckRecord()
|
||||
}
|
||||
|
||||
|
||||
Opm::Tuning getTuning()
|
||||
{
|
||||
return Opm::Tuning(Opm::DynamicState<double>(std::vector<double>{1.0}, 1), //TSINIT
|
||||
Opm::DynamicState<double>(std::vector<double>{2.0}, 1), //TSMAXZ
|
||||
Opm::DynamicState<double>(std::vector<double>{3.0}, 1), //TSMINZ
|
||||
Opm::DynamicState<double>(std::vector<double>{4.0}, 1), //TSMCHP
|
||||
Opm::DynamicState<double>(std::vector<double>{5.0}, 1), //TSFMAX
|
||||
Opm::DynamicState<double>(std::vector<double>{6.0}, 1), //TSFMIN
|
||||
Opm::DynamicState<double>(std::vector<double>{7.0}, 1), //TSFCNV
|
||||
Opm::DynamicState<double>(std::vector<double>{8.0}, 1), //TFDIFF
|
||||
Opm::DynamicState<double>(std::vector<double>{9.0}, 1), //THRUPT
|
||||
Opm::DynamicState<double>(std::vector<double>{10.0}, 1), //TMAXWC
|
||||
Opm::DynamicState<int>(std::vector<int>{1}, 1), //TMAXWC_has_value
|
||||
Opm::DynamicState<double>(std::vector<double>{11.0}, 1), //TRGTTE
|
||||
Opm::DynamicState<double>(std::vector<double>{12.0}, 1), //TRGCNV
|
||||
Opm::DynamicState<double>(std::vector<double>{13.0}, 1), //TRGMBE
|
||||
Opm::DynamicState<double>(std::vector<double>{14.0}, 1), //TRGLCV
|
||||
Opm::DynamicState<double>(std::vector<double>{15.0}, 1), //XXXTTE
|
||||
Opm::DynamicState<double>(std::vector<double>{16.0}, 1), //XXXCNV
|
||||
Opm::DynamicState<double>(std::vector<double>{17.0}, 1), //XXXMBE
|
||||
Opm::DynamicState<double>(std::vector<double>{18.0}, 1), //XXXLCV
|
||||
Opm::DynamicState<double>(std::vector<double>{19.0}, 1), //XXXWFL
|
||||
Opm::DynamicState<double>(std::vector<double>{20.0}, 1), ///TRGFIP
|
||||
Opm::DynamicState<double>(std::vector<double>{21.0}, 1), //TRGSFT
|
||||
Opm::DynamicState<int>(std::vector<int>{2}, 1), //TRGSFT_has_value
|
||||
Opm::DynamicState<double>(std::vector<double>{22.0}, 1), // THIONX
|
||||
Opm::DynamicState<int>(std::vector<int>{3}, 1), //TRWGHT
|
||||
Opm::DynamicState<int>(std::vector<int>{4}, 1), //NEWTMX
|
||||
Opm::DynamicState<int>(std::vector<int>{5}, 1), //NEWTMN
|
||||
Opm::DynamicState<int>(std::vector<int>{6}, 1), //LITMAX
|
||||
Opm::DynamicState<int>(std::vector<int>{7}, 1), //LITMIN
|
||||
Opm::DynamicState<int>(std::vector<int>{8}, 1), //MXWSIT
|
||||
Opm::DynamicState<int>(std::vector<int>{9}, 1), //MXWPIT
|
||||
Opm::DynamicState<double>(std::vector<double>{23.0}, 1), //DDPLIM
|
||||
Opm::DynamicState<double>(std::vector<double>{24.0}, 1), //DDSLIM
|
||||
Opm::DynamicState<double>(std::vector<double>{25.0}, 1), //TGRDPR
|
||||
Opm::DynamicState<double>(std::vector<double>{26.0}, 1), //XXXDPR
|
||||
Opm::DynamicState<int>(std::vector<int>{10}, 1), //XXDPR_has_value
|
||||
std::map<std::string,bool>{{"test", false}}); // resetValue
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -2069,6 +2112,17 @@ BOOST_AUTO_TEST_CASE(Deck)
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(Tuning)
|
||||
{
|
||||
#ifdef HAVE_MPI
|
||||
Opm::Tuning val1 = getTuning();
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user