Avoid exposing RigFemScalarResultFrames

Preparations to handle statistics across all parts better
This commit is contained in:
Jacob Støren 2015-06-04 09:59:39 +02:00
parent ac700e0c54
commit 60c9b72671
3 changed files with 14 additions and 4 deletions

View File

@ -347,3 +347,12 @@ void RigGeoMechCaseData::assertResultsLoaded( const RigFemResultAddress& resVarA
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const std::vector<float>& RigGeoMechCaseData::resultValues(const RigFemResultAddress& resVarAddr, int partIndex, int frameIndex)
{
RigFemScalarResultFrames* scalarResults = findOrLoadScalarResult(partIndex, resVarAddr);
return scalarResults->frameData(frameIndex);
}

View File

@ -45,8 +45,7 @@ public:
std::map<std::string, std::vector<std::string> > scalarFieldAndComponentNames(RigFemResultPosEnum resPos);
std::vector<std::string> stepNames();
void assertResultsLoaded(const RigFemResultAddress& resVarAddr);
RigFemScalarResultFrames* findOrLoadScalarResult(int partIndex,
const RigFemResultAddress& resVarAddr);
const std::vector<float>& resultValues(const RigFemResultAddress& resVarAddr, int partIndex, int frameIndex);
int frameCount();
@ -57,6 +56,9 @@ public:
void meanCellScalarValues(const RigFemResultAddress& resVarAddr, double* meanValue);
private:
RigFemScalarResultFrames* findOrLoadScalarResult(int partIndex,
const RigFemResultAddress& resVarAddr);
void minMaxScalarValuesInternal(const RigFemResultAddress& resVarAddr, int frameIndex,
double* overallMin, double* overallMax);
void posNegClosestToZeroInternal(const RigFemResultAddress& resVarAddr, int frameIndex,

View File

@ -236,8 +236,7 @@ void RivFemPartPartMgr::updateCellResultColor(size_t timeStepIndex, RimGeoMechRe
RigFemResultAddress resVarAddress(resPosType, fieldName.toStdString(), compName.toStdString());
RigFemScalarResultFrames* scalarResults = caseData->findOrLoadScalarResult(m_gridIdx, resVarAddress);
std::vector<float>& resultValues = scalarResults->frameData(timeStepIndex);
const std::vector<float>& resultValues = caseData->resultValues(resVarAddress, m_gridIdx, timeStepIndex);
const std::vector<size_t>* vxToResultMapping = NULL;