20 #ifndef ECLREGRESSIONTEST_HPP 21 #define ECLREGRESSIONTEST_HPP 23 #include "EclFilesComparator.hpp" 25 #include <opm/io/eclipse/EclIOdata.hpp> 27 namespace Opm {
namespace EclIO {
50 double absToleranceArg,
double relToleranceArg):
57 this->onlyLastSequence = onlyLastSequenceArg;
60 int countDev() {
return deviations.size(); }
63 void setReportStepOnly(
bool reportStepOnlyArg) {
64 this->reportStepOnly = reportStepOnlyArg;
70 void setAcceptExtraKeywords(
bool acceptExtraKeywordsArg) {
71 this->acceptExtraKeywords = acceptExtraKeywordsArg;
75 void setAcceptExtraKeywordsBoth(
bool acceptExtraKeywordsArg) {
76 this->acceptExtraKeywordsBoth = acceptExtraKeywordsArg;
79 void setIntegrationTest(
bool inregrationTestArg) {
80 this->integrationTest = inregrationTestArg;
83 void setPrintKeywordOnly(
bool printArg) {
84 this->printKeywordOnly = printArg;
87 void compareSpecificKeyword(std::string keyword) {
88 this->specificKeyword = std::move(keyword);
90 void compareSpesificRstReportStepNumber(
int seqn) {
91 this->specificSequence = seqn;
94 void setLoadBaseRunData(
bool loadArg) {
95 this->loadBaseRunData = loadArg;
99 void printDeviationReport();
110 bool checkFileName(
const std::string& rootName,
const std::string& extension, std::string& filename);
113 void printResultsForKeyword(
const std::string& keyword)
const;
114 void printComparisonForKeywordLists(
const std::vector<std::string>& arrayList1,
115 const std::vector<std::string>& arrayList2)
const;
117 void printComparisonForKeywordLists(
const std::vector<std::string>& arrayList1,
118 const std::vector<std::string>& arrayList2,
119 const std::vector<EIOD::eclArrType>& arrayType1,
120 const std::vector<EIOD::eclArrType>& arrayType2)
const;
122 void printMissingKeywords(
const std::vector<std::string>& arrayList1,
123 const std::vector<std::string>& arrayList2)
const;
125 void compareKeywords(
const std::vector<std::string>& keywords1,
126 const std::vector<std::string>& keywords2,
127 const std::string& reference);
129 void checkSpecificKeyword(std::vector<std::string>& keywords1,
130 std::vector<std::string>& keywords2,
131 std::vector<EIOD::eclArrType>& arrayType1,
132 std::vector<EIOD::eclArrType>& arrayType2,
133 const std::string& reference);
135 template <
typename T>
136 void compareVectors(
const std::vector<T>& t1,
const std::vector<T>& t2,
137 const std::string& keyword,
const std::string& reference);
139 template <
typename T>
140 void compareFloatingPointVectors(
const std::vector<T>& t1,
const std::vector<T> &t2,
141 const std::string& keyword,
const std::string& reference);
149 void deviationsForCell(
double val1,
double val2,
const std::string& keyword,
150 const std::string& reference,
size_t kw_size,
size_t cell,
151 bool allowNegativeValues,
bool useStrictTol);
153 template <
typename T>
154 void deviationsForNonFloatingPoints(T val1, T val2,
const std::string& keyword,
155 const std::string& reference,
156 size_t kw_size,
size_t cell);
159 std::vector<double> absDeviation, relDeviation;
162 const std::vector<std::string> keywordDisallowNegatives = {};
164 double strictAbsTol = 1e-6;
165 double strictRelTol = 1e-6;
168 const std::vector<std::string> keywordsStrictTol = {
"COORD",
"ZCORN",
"PORV",
"DEPTH",
"DX",
"DY",
"DZ",
"PERMX",
"PERMY",
"PERMZ",
"NTG",
169 "TRANX",
"TRANY",
"TRANZ",
"TRANNNC",
"SGRP",
"SCON",
"DOUBHEAD" 172 const std::vector<std::string> keywordsBlackList = {
"TCPU",
"ELAPSED",
"TCPUDAY",
"TCPUTS",
"TELAPLIN",
"TCPUH",
"TCPUHT",
"TCPUSCH",
"TCPUTSH",
"TCPUTSHT",
"TELAPDAY",
"TELAPTS"};
173 const std::vector<std::string> keywordsBlackListExtraRestart = {
"MLINEARS",
"MSUMLINS",
"MSUMNEWT",
"NEWTON",
"NLINEARS",
"NLINSMAX",
"NLINSMIN"};
175 bool reportStepOnly =
false;
178 bool onlyLastSequence =
false;
180 bool integrationTest =
false;
182 bool printKeywordOnly =
false;
184 bool loadBaseRunData =
false;
187 std::string specificKeyword;
190 int specificSequence = -1;
193 bool acceptExtraKeywords =
false;
194 bool acceptExtraKeywordsBoth =
false;
A class for executing a regression test for two ECLIPSE files.
Definition: EclRegressionTest.hpp:41
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
ECLRegressionTest(const std::string &basename1, const std::string &basename2, double absToleranceArg, double relToleranceArg)
Sets up the regression test.
Definition: EclRegressionTest.hpp:49
void setOnlyLastReportNumber(bool onlyLastSequenceArg)
Option to only compare last occurrence.
Definition: EclRegressionTest.hpp:56
Definition: EclipseGrid.hpp:43
Definition: EclFilesComparator.hpp:34