adding new file type RSM to compareECL
When using -t SMRY the RSM file is not checked When using -t RSM the SMRY files is not checked when running without -t option both RSM and SMRY files are checked together with restart, grid, init and rft file.
This commit is contained in:
parent
16af572080
commit
cc6769c1a2
@ -889,7 +889,7 @@ void ECLRegressionTest::results_smry()
|
||||
|
||||
ESmry smry2(fileName2, loadBaseRunData);
|
||||
smry2.loadData();
|
||||
std::cout << "\nLoading summary file " << fileName2 << " .... done" << std::endl;
|
||||
std::cout << "Loading summary file " << fileName2 << " .... done" << std::endl;
|
||||
|
||||
deviations.clear();
|
||||
|
||||
@ -999,6 +999,24 @@ void ECLRegressionTest::results_smry()
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
std::cout << "\n!Warning, summary files not found, hence not compared. \n" << std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ECLRegressionTest::results_rsm()
|
||||
{
|
||||
std::string fileName1,fileName2;
|
||||
bool foundRsm2 = checkFileName(rootName2, "RSM", fileName2);
|
||||
bool foundSmspec1 = checkFileName(rootName1, "SMSPEC", fileName1);
|
||||
|
||||
if ((foundRsm2) && (foundSmspec1)) {
|
||||
|
||||
ESmry smry2(fileName1, loadBaseRunData);
|
||||
smry2.loadData();
|
||||
std::cout << "\nLoading summary file " << fileName1 << " .... done" << std::endl;
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
std::string rsm_file = rootName2 + ".RSM";
|
||||
if (fs::is_regular_file(fs::path(rsm_file))) {
|
||||
@ -1015,9 +1033,8 @@ void ECLRegressionTest::results_smry()
|
||||
}
|
||||
|
||||
} else {
|
||||
std::cout << "\n!Warning, summary files not found, hence not compared. \n" << std::endl;
|
||||
std::cout << "\n!Warning, summary and/or RSM - file not found, hence not compared. \n" << std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -98,6 +98,7 @@ public:
|
||||
void results_rst();
|
||||
void results_init();
|
||||
void results_smry();
|
||||
void results_rsm();
|
||||
void results_rft();
|
||||
|
||||
private:
|
||||
|
@ -49,6 +49,7 @@ static void printHelp() {
|
||||
<< " -t INIT \t Compare two initial files (.INIT).\n"
|
||||
<< " -t RFT \t Compare two RFT files (.RFT).\n"
|
||||
<< " -t SMRY \t Compare two cases consistent of (unified) summary files.\n"
|
||||
<< " -t RSM \t Compare RSM file agaist a summary file.\n"
|
||||
<< "-x Allow extra keywords in case number 2. These additional keywords (not found in case number1) will be ignored in the comparison.\n"
|
||||
<< "\nExample usage of the program: \n\n"
|
||||
<< "compareECL -k PRESSURE <path to first casefile> <path to second casefile> 1e-3 1e-5\n"
|
||||
@ -229,6 +230,8 @@ int main(int argc, char** argv) {
|
||||
comparator.results_rst();
|
||||
} else if (fileTypeString == "SMRY") {
|
||||
comparator.results_smry();
|
||||
} else if (fileTypeString == "RSM") {
|
||||
comparator.results_rsm();
|
||||
} else if (fileTypeString == "RFT") {
|
||||
comparator.results_rft();
|
||||
} else {
|
||||
@ -244,6 +247,7 @@ int main(int argc, char** argv) {
|
||||
comparator.results_init();
|
||||
comparator.results_rst();
|
||||
comparator.results_smry();
|
||||
comparator.results_rsm();
|
||||
comparator.results_rft();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user