mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Use hash of input do control if calculation is required
Add hash functions Add serial number to SummaryReaderInterface Add hash for RimSummaryCase Use hash based on input parameters to control caching of data in RimEnsembleStatisticsCase::calculate and RimEnsembleCurveSet::appendOptionItemsForSummaryAddresses
This commit is contained in:
@@ -22,6 +22,8 @@
|
||||
|
||||
#include <QDateTime>
|
||||
|
||||
int RifSummaryReaderInterface::m_nextSerialNumber = 0;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -56,6 +58,23 @@ void RifSummaryReaderInterface::buildMetaData()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RifSummaryReaderInterface::serialNumber() const
|
||||
{
|
||||
return m_serialNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifSummaryReaderInterface::RifSummaryReaderInterface()
|
||||
{
|
||||
#pragma omp critical
|
||||
m_serialNumber = m_nextSerialNumber++;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -37,6 +37,8 @@ class QDateTime;
|
||||
class RifSummaryReaderInterface : public cvf::Object
|
||||
{
|
||||
public:
|
||||
RifSummaryReaderInterface();
|
||||
|
||||
bool hasAddress( const RifEclipseSummaryAddress& resultAddress ) const;
|
||||
|
||||
const std::set<RifEclipseSummaryAddress>& allResultAddresses() const;
|
||||
@@ -53,7 +55,13 @@ public:
|
||||
|
||||
virtual void buildMetaData();
|
||||
|
||||
int serialNumber() const;
|
||||
|
||||
protected:
|
||||
std::set<RifEclipseSummaryAddress> m_allResultAddresses; // Result and error addresses
|
||||
std::set<RifEclipseSummaryAddress> m_allErrorAddresses; // Error addresses
|
||||
|
||||
private:
|
||||
static int m_nextSerialNumber;
|
||||
int m_serialNumber;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user