summaryRegressionTest.hpp
1 /*
2  Copyright 2016 Statoil ASA.
3 
4  This file is part of the Open Porous Media project (OPM).
5 
6  OPM is free software: you can redistribute it and/or modify it under
7  the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  OPM is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with OPM. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef SUMMARYREGRESSIONTEST_HPP
21 #define SUMMARYREGRESSIONTEST_HPP
22 
23 #include <opm/test_util/summaryComparator.hpp>
24 
26 class RegressionTest: public SummaryComparator {
27  private:
34  bool checkForKeyword(std::vector<double>& timeVec1, std::vector<double>& timeVec2, const char* keyword);
35 
39  bool startTest(const char* keyword);
40 
48  bool checkDeviation(Deviation deviation, const char* keyword, int refIndex, int checkIndex);
49 
50  bool isRestartFile = false;
51  public:
58  RegressionTest(const char* basename1, const char* basename2, double relativeTol, double absoluteTol):
59  SummaryComparator(basename1, basename2, relativeTol, absoluteTol) {}
60 
62  void getRegressionTest();
63 
65  void getRegressionTest(const char* keyword);
66 
69  void setIsRestartFile(bool boolean){this->isRestartFile = boolean;}
70 };
71 
72 #endif
Deviation struct.
Definition: EclFilesComparator.hpp:39
Definition: summaryComparator.hpp:56
void getRegressionTest()
Definition: summaryRegressionTest.cpp:25
RegressionTest(const char *basename1, const char *basename2, double relativeTol, double absoluteTol)
Constructor, creates an object of RefressionTest class.
Definition: summaryRegressionTest.hpp:58
A class for executing a regression test for two ECLIPSE files.
Definition: EclFilesComparator.hpp:138
void setIsRestartFile(bool boolean)
This function sets the private member variable isRestartFiles.
Definition: summaryRegressionTest.hpp:69