20 #include <opm/test_util/summaryComparator.hpp>
40 bool allowSpikes =
false;
41 bool findVolumeError =
false;
42 bool allowDifferentAmountOfKeywords =
true;
43 bool findVectorWithGreatestErrorRatio =
false;
44 bool oneOfTheMainVariables =
false;
45 bool throwExceptionForTooGreatErrorRatio =
true;
46 std::string mainVariable;
47 int spikeLimit = 13370;
60 void checkForKeyword(
const std::vector<double>& timeVec1,
61 const std::vector<double>& timeVec2,
const char* keyword);
66 void volumeErrorCheck(
const char* keyword);
75 const std::vector<double>& timeVec2,
81 void checkWithSpikes(
const char* keyword);
87 int checkDeviation(
const Deviation& deviation);
96 void evaluateWellProductionVolume();
101 void updateVolumeError(
const char* keyword);
110 double &greatestRatio,
111 const char* currentKeyword,
112 std::string &greatestErrorRatio);
115 bool checkUnits(
const char* keyword);
128 double atol,
double rtol) :
194 static double integrate(
const std::vector<double>& timeVec,
195 const std::vector<double>& dataVec);
213 const std::vector<double>& dataVec1,
214 const std::vector<double>& timeVec2,
215 const std::vector<double>& dataVec2);
Struct for storing the total area under a graph.
Definition: summaryIntegrationTest.hpp:24
IntegrationTest(const char *basename1, const char *basename2, double atol, double rtol)
Constructor, creates an object of IntegrationTest class.
Definition: summaryIntegrationTest.hpp:127
void setSpikeLimit(int lim)
This function sets the private member variable spikeLimit.
Definition: summaryIntegrationTest.hpp:152
void setOneOfTheMainVariables(bool oneOfTheMainVariablesArg)
This function sets the private member variable oneOfTheMainVariables.
Definition: summaryIntegrationTest.hpp:144
Deviation struct.
Definition: EclFilesComparator.hpp:39
double total
The total area under the graph when plotting the summary vector against time.
Definition: summaryIntegrationTest.hpp:25
static double integrate(const std::vector< double > &timeVec, const std::vector< double > &dataVec)
This function calculates the area under a graph by doing a Riemann sum.
Definition: summaryIntegrationTest.cpp:320
void setMainVariable(std::string mainVar)
This function sets the member variable string #mainVariable.
Definition: summaryIntegrationTest.hpp:148
Definition: summaryComparator.hpp:56
void setAllowSpikes(bool allowSpikesArg)
This function sets the private member variable allowSpikes.
Definition: summaryIntegrationTest.hpp:134
void setFindVolumeError(bool findVolumeErrorArg)
This function sets the private member variable findVolumeError.
Definition: summaryIntegrationTest.hpp:139
void getIntegrationTest()
This function executes a integration test for all the keywords. If the two files do not match in amou...
Definition: summaryIntegrationTest.cpp:27
double error
The total area under the graph when plotting the deviation vector against time.
Definition: summaryIntegrationTest.hpp:26
void setThrowExceptionForTooGreatErrorRatio(bool boolean)
This function sets the private member variable throwExceptionForTooGreatErrorRatio.
Definition: summaryIntegrationTest.hpp:167
A class for executing a integration test for two ECLIPSE files.
Definition: EclFilesComparator.hpp:199
static double integrateError(const std::vector< double > &timeVec1, const std::vector< double > &dataVec1, const std::vector< double > &timeVec2, const std::vector< double > &dataVec2)
This function calculates the Riemann sum of the error between two graphs.
Definition: summaryIntegrationTest.cpp:335
WellProductionVolume & operator+=(const WellProductionVolume &rhs)
Overloaded operator.
Definition: summaryIntegrationTest.hpp:30
void setAllowDifferentAmountOfKeywords(bool boolean)
This function sets the private member variable allowDifferentAmountsOfKeywords.
Definition: summaryIntegrationTest.hpp:162
static double getRectangleArea(double height, double width)
This function calculates the area of an rectangle of height height and width time-timePrev.
Definition: summaryIntegrationTest.hpp:180
void setFindVectorWithGreatestErrorRatio(bool boolean)
This function sets the private member variable findVectorWithGreatestErrorRatio.
Definition: summaryIntegrationTest.hpp:157