Skip to content

Commit

Permalink
Add support for increase of serial number when data is assigned to a …
Browse files Browse the repository at this point in the history
…SUMO case
  • Loading branch information
magnesj committed Oct 24, 2024
1 parent 9a7e562 commit 24b711c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ApplicationLibCode/FileInterface/RifSummaryReaderInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,20 @@ int RifSummaryReaderInterface::serialNumber() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RifSummaryReaderInterface::RifSummaryReaderInterface()
void RifSummaryReaderInterface::increaseSerialNumber()
{
#pragma omp critical
m_serialNumber = m_nextSerialNumber++;
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RifSummaryReaderInterface::RifSummaryReaderInterface()
{
increaseSerialNumber();
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions ApplicationLibCode/FileInterface/RifSummaryReaderInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ class RifSummaryReaderInterface : public cvf::Object
int serialNumber() const;

protected:
void increaseSerialNumber();

std::set<RifEclipseSummaryAddress> m_allResultAddresses; // Result and error addresses
std::set<RifEclipseSummaryAddress> m_allErrorAddresses; // Error addresses

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ void RimSummaryCaseSumo::setValues( const std::vector<time_t>& timeSteps,
{
m_timeSteps = timeSteps;
m_values[resultAddress] = values;

increaseSerialNumber();
}

//--------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 24b711c

Please sign in to comment.