Cleaning up test code

This commit is contained in:
Vegard Kippe 2023-06-29 15:22:52 +02:00
parent a80f44a3be
commit 7a0074f0e9

View File

@ -155,52 +155,3 @@ BOOST_AUTO_TEST_CASE(CheckMassBalanceWithinXXXMBE)
}
// int main(int argc, char** argv)
// {
// return boost::unit_test::unit_test_main(&init_unit_test, argc, argv);
// }
// int main(int argc, char** argv) {
// if (argc < 2) {
// std::cout << "Usage: test_tuning_XXXMBE CASE_NAME" << std::endl;
// exit(1);
// }
// std::string case_name(argv[1]);
// std::string file_name = case_name + ".INFOITER";
// ColumnData data(file_name);
// auto rstep = data.get_ivector("ReportStep");
// auto tstep = data.get_ivector("TimeStep");
// auto mbo = data["MB_Oil"];
// auto mbw = data["MB_Water"];
// auto mbg = data["MB_Gas"];
// const int num_reports = 1 + *std::max_element(rstep.begin(), rstep.end());
// std::vector<double> max_mb;
// max_mb.reserve(num_reports);
// // Find the maximum mass balance error at each converged time step for each report step..
// const int nrows = rstep.size();
// int rcur = 0;
// int tcur = 0;
// double max_mb_step = std::numeric_limits<double>::min();
// for (int i=0; i<(nrows-1); ++i) {
// if (tcur != tstep[i+1]) {
// max_mb_step = std::max({mbo[i], mbw[i], mbg[i], max_mb_step});
// tcur = tstep[i+1];
// }
// if (rcur != rstep[i+1]) {
// max_mb.push_back(max_mb_step);
// max_mb_step = std::numeric_limits<double>::min();
// rcur = rstep[i+1];
// }
// }
// max_mb.push_back( std::max({mbo.back(), mbw.back(), mbg.back(), max_mb_step}) );
// for (int i=0; i<num_reports; ++i)
// std::cout << "ReportStep " << i << ": " << max_mb[i] << std::endl;
// return 0;
// }