opm-common
ECLRegressionTest Class Reference

A class for executing a regression test for two ECLIPSE files. More...

#include <EclRegressionTest.hpp>

Inheritance diagram for ECLRegressionTest:
ECLFilesComparator

Public Member Functions

 ECLRegressionTest (const std::string &basename1, const std::string &basename2, double absToleranceArg, double relToleranceArg)
 Sets up the regression test. More...
 
void setOnlyLastReportNumber (bool onlyLastSequenceArg)
 Option to only compare last occurrence.
 
int countDev ()
 
void setReportStepOnly (bool reportStepOnlyArg)
 
void setAcceptExtraKeywords (bool acceptExtraKeywordsArg)
 
void setAcceptExtraKeywordsBoth (bool acceptExtraKeywordsArg)
 
void setIntegrationTest (bool inregrationTestArg)
 
void setPrintKeywordOnly (bool printArg)
 
void compareSpecificKeyword (std::string keyword)
 
void compareSpesificRstReportStepNumber (int seqn)
 
void setLoadBaseRunData (bool loadArg)
 
void loadGrids ()
 
void printDeviationReport ()
 
void gridCompare ()
 
void results_rst ()
 
void results_init ()
 
void results_smry ()
 
void results_rsm ()
 
void results_rft ()
 
- Public Member Functions inherited from ECLFilesComparator
 ECLFilesComparator (const std::string &basename1, const std::string &basename2, double absTolerance, double relTolerance)
 
void throwOnErrors (bool dothrow)
 
void doAnalysis (bool analize)
 
size_t getNoErrors () const
 
double getAbsTolerance () const
 Returns the absolute tolerance stored as a private member variable in the class.
 
double getRelTolerance () const
 Returns the relative tolerance stored as a private member variable in the class.
 

Additional Inherited Members

- Static Public Member Functions inherited from ECLFilesComparator
static Deviation calculateDeviations (double val1, double val2)
 Calculate deviations for two values. More...
 
static double median (std::vector< double > vec)
 Calculate median of a vector. More...
 
static double average (const std::vector< double > &vec)
 Calculate average of a vector. More...
 
- Protected Member Functions inherited from ECLFilesComparator
template<typename T >
void printValuesForCell (const std::string &keyword, const std::string &reference, size_t kw_size, size_t cell, const Opm::EclIO::EGrid *grid, const T &value1, const T &value2) const
 
- Protected Attributes inherited from ECLFilesComparator
bool throwOnError = true
 Throw on first error.
 
bool analysis = false
 Perform full error analysis.
 
std::map< std::string, std::vector< Deviation > > deviations
 
size_t num_errors = 0
 
std::string rootName1
 
std::string rootName2
 

Detailed Description

A class for executing a regression test for two ECLIPSE files.

This class inherits from ECLFilesComparator, which opens and closes the input cases and stores keywordnames. The three public functions gridCompare(), results() and resultsForKeyword() can be invoked to compare griddata or keyworddata for all keywords or a given keyword (resultsForKeyword()).

Constructor & Destructor Documentation

◆ ECLRegressionTest()

ECLRegressionTest::ECLRegressionTest ( const std::string &  basename1,
const std::string &  basename2,
double  absToleranceArg,
double  relToleranceArg 
)
inline

Sets up the regression test.

Parameters
[in]basename1Full path without file extension to the first case.
[in]basename2Full path without file extension to the second case.
[in]absToleranceArgTolerance for absolute deviation.
[in]relToleranceArgTolerance for relative deviation.

This constructor only calls the constructor of the superclass, see the docs for ECLFilesComparator for more information.


The documentation for this class was generated from the following files: