mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
fixing indent
This commit is contained in:
@@ -15,38 +15,34 @@ inline bool is_close(double a, double b, double tol = TOLERANCE) {
|
|||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(CheckTSINITAndNEXTSTEP)
|
BOOST_AUTO_TEST_CASE(CheckTSINITAndNEXTSTEP)
|
||||||
{
|
{
|
||||||
//std::string case_name(boost::unit_test::framework::master_test_suite().argv[1]);
|
//std::string case_name(boost::unit_test::framework::master_test_suite().argv[1]); std::string case_name("02_TUNING_TSINIT_NEXTSTEP");
|
||||||
std::string case_name("02_TUNING_TSINIT_NEXTSTEP");
|
BOOST_TEST_MESSAGE("---------------------------------------------------------------------------");
|
||||||
|
BOOST_TEST_MESSAGE("Checking TSINIT and NEXTSTEP, see file " + case_name + ".DATA");
|
||||||
BOOST_TEST_MESSAGE("---------------------------------------------------------------------------");
|
BOOST_TEST_MESSAGE("---------------------------------------------------------------------------");
|
||||||
BOOST_TEST_MESSAGE("Checking TSINIT and NEXTSTEP, see file " + case_name + ".DATA");
|
Opm::EclIO::ESmry smry(case_name, false);
|
||||||
BOOST_TEST_MESSAGE("---------------------------------------------------------------------------");
|
smry.loadData({"TIME"});
|
||||||
|
const auto& time = smry.get("TIME");
|
||||||
|
|
||||||
Opm::EclIO::ESmry smry(case_name, false);
|
|
||||||
smry.loadData({"TIME"});
|
|
||||||
const auto& time = smry.get("TIME");
|
|
||||||
|
|
||||||
// First time step 1 day
|
|
||||||
BOOST_CHECK_CLOSE(time[0], 1.0, TOLERANCE);
|
|
||||||
|
|
||||||
for (size_t i=0; i<time.size(); ++i) {
|
// First time step 1 day
|
||||||
std::cout << "######################################" << std::endl;
|
BOOST_CHECK_CLOSE(time[0], 1.0, TOLERANCE);
|
||||||
std::cout << time[i] << std::endl;
|
|
||||||
|
for (size_t i=0; i<time.size(); ++i) {
|
||||||
// Max time step 3 days initially
|
std::cout << "######################################" << std::endl;
|
||||||
if (time[i] < 14.0) BOOST_CHECK(time[i+1] <= (time[i]+3.0));
|
std::cout << time[i] << std::endl;
|
||||||
// No short next step
|
|
||||||
if (is_close(time[i], 14.0)) BOOST_CHECK(time[i+1] > 15.1);
|
// Max time step 3 days initially
|
||||||
// Persistent NEXTSTEP=0.5
|
if (time[i] < 14.0) BOOST_CHECK(time[i+1] <= (time[i]+3.0));
|
||||||
if (is_close(time[i], 31.0)) BOOST_CHECK_CLOSE(time[i+1], 31.5, TOLERANCE);
|
// No short next step
|
||||||
if (is_close(time[i], 45.0)) BOOST_CHECK_CLOSE(time[i+1], 45.5, TOLERANCE);
|
if (is_close(time[i], 14.0)) BOOST_CHECK(time[i+1] > 15.1);
|
||||||
// Non-persistent NEXTSTEP=1.0
|
// Persistent NEXTSTEP=0.5
|
||||||
if (is_close(time[i], 60.0)) BOOST_CHECK_CLOSE(time[i+1], 61.0, TOLERANCE);
|
if (is_close(time[i], 31.0)) BOOST_CHECK_CLOSE(time[i+1], 31.5, TOLERANCE);
|
||||||
if (is_close(time[i], 74.0)) BOOST_CHECK(time[i+1] > 75.1);
|
if (is_close(time[i], 45.0)) BOOST_CHECK_CLOSE(time[i+1], 45.5, TOLERANCE);
|
||||||
// TSINIT=0.5
|
// Non-persistent NEXTSTEP=1.0
|
||||||
if (is_close(time[i], 91.0)) BOOST_CHECK_CLOSE(time[i+1], 91.5, TOLERANCE);
|
if (is_close(time[i], 60.0)) BOOST_CHECK_CLOSE(time[i+1], 61.0, TOLERANCE);
|
||||||
if (is_close(time[i], 105.0)) BOOST_CHECK(time[i+1] > 105.6);
|
if (is_close(time[i], 74.0)) BOOST_CHECK(time[i+1] > 75.1);
|
||||||
}
|
// TSINIT=0.5
|
||||||
|
if (is_close(time[i], 91.0)) BOOST_CHECK_CLOSE(time[i+1], 91.5, TOLERANCE);
|
||||||
|
if (is_close(time[i], 105.0)) BOOST_CHECK(time[i+1] > 105.6);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user