mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Moved loading of dependent datasets
This commit is contained in:
parent
4d1d2215c2
commit
8dc2eed3c0
@ -230,7 +230,6 @@ size_t RimReservoirCellResultsStorage::findOrLoadScalarResultForTimeStep(RimDefi
|
||||
if (type == RimDefines::DYNAMIC_NATIVE && resultName.toUpper() == "SOIL")
|
||||
{
|
||||
size_t soilScalarResultIndex = m_cellResults->findScalarResultIndex(type, resultName);
|
||||
if (!isDataPresent(soilScalarResultIndex))
|
||||
{
|
||||
computeSOILForTimeStep(timeStepIndex);
|
||||
}
|
||||
@ -297,7 +296,28 @@ size_t RimReservoirCellResultsStorage::findOrLoadScalarResult(RimDefines::Result
|
||||
size_t scalarResultIndex = m_cellResults->findScalarResultIndex(type, resultName);
|
||||
if (scalarResultIndex == cvf::UNDEFINED_SIZE_T) return cvf::UNDEFINED_SIZE_T;
|
||||
|
||||
|
||||
// Load dependency data sets
|
||||
|
||||
if (type == RimDefines::STATIC_NATIVE)
|
||||
{
|
||||
if (resultName == RimDefines::combinedTransmissibilityResultName())
|
||||
{
|
||||
this->findOrLoadScalarResult(type, "TRANX");
|
||||
this->findOrLoadScalarResult(type, "TRANY");
|
||||
this->findOrLoadScalarResult(type, "TRANZ");
|
||||
}
|
||||
else if (resultName == RimDefines::combinedMultResultName())
|
||||
{
|
||||
this->findOrLoadScalarResult(type, "MULTX");
|
||||
this->findOrLoadScalarResult(type, "MULTX-");
|
||||
this->findOrLoadScalarResult(type, "MULTY");
|
||||
this->findOrLoadScalarResult(type, "MULTY-");
|
||||
this->findOrLoadScalarResult(type, "MULTZ");
|
||||
this->findOrLoadScalarResult(type, "MULTZ-");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (isDataPresent(scalarResultIndex))
|
||||
{
|
||||
return scalarResultIndex;
|
||||
@ -424,6 +444,13 @@ void RimReservoirCellResultsStorage::computeSOILForTimeStep(size_t timeStepIndex
|
||||
|
||||
size_t soilResultScalarIndex = m_cellResults->findScalarResultIndex(RimDefines::DYNAMIC_NATIVE, "SOIL");
|
||||
m_cellResults->cellScalarResults(soilResultScalarIndex).resize(soilTimeStepCount);
|
||||
|
||||
if (m_cellResults->cellScalarResults(soilResultScalarIndex, timeStepIndex).size() > 0)
|
||||
{
|
||||
// Data is computed and allocated, nothing more to do
|
||||
return;
|
||||
}
|
||||
|
||||
m_cellResults->cellScalarResults(soilResultScalarIndex, timeStepIndex).resize(soilResultValueCount);
|
||||
|
||||
|
||||
|
@ -196,32 +196,7 @@ void RimResultDefinition::loadResult()
|
||||
RimReservoirCellResultsStorage* gridCellResults = this->currentGridCellResults();
|
||||
if (gridCellResults)
|
||||
{
|
||||
if (m_resultType() == RimDefines::STATIC_NATIVE)
|
||||
{
|
||||
if (m_resultVariable().compare(RimDefines::combinedTransmissibilityResultName(), Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
gridCellResults->findOrLoadScalarResult(m_resultType(), "TRANX");
|
||||
gridCellResults->findOrLoadScalarResult(m_resultType(), "TRANY");
|
||||
gridCellResults->findOrLoadScalarResult(m_resultType(), "TRANZ");
|
||||
}
|
||||
else if (m_resultVariable().compare(RimDefines::combinedMultResultName(), Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
gridCellResults->findOrLoadScalarResult(m_resultType(), "MULTX");
|
||||
gridCellResults->findOrLoadScalarResult(m_resultType(), "MULTX-");
|
||||
gridCellResults->findOrLoadScalarResult(m_resultType(), "MULTY");
|
||||
gridCellResults->findOrLoadScalarResult(m_resultType(), "MULTY-");
|
||||
gridCellResults->findOrLoadScalarResult(m_resultType(), "MULTZ");
|
||||
gridCellResults->findOrLoadScalarResult(m_resultType(), "MULTZ-");
|
||||
}
|
||||
else
|
||||
{
|
||||
gridCellResults->findOrLoadScalarResult(m_resultType(), m_resultVariable);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gridCellResults->findOrLoadScalarResult(m_resultType(), m_resultVariable);
|
||||
}
|
||||
gridCellResults->findOrLoadScalarResult(m_resultType(), m_resultVariable);
|
||||
}
|
||||
|
||||
updateFieldVisibility();
|
||||
|
Loading…
Reference in New Issue
Block a user