Fem-results caching now up and running

Still work in progress. Statistics not complete
This commit is contained in:
Jacob Støren
2015-05-07 10:11:55 +02:00
parent 41b0847041
commit d405643d60
4 changed files with 172 additions and 2 deletions

View File

@@ -34,3 +34,41 @@ RigFemPartResults::~RigFemPartResults()
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigFemPartResults::initResultStages(const std::vector<std::string>& stageNames)
{
m_femAnalysisStages.clear();
m_femAnalysisStages.resize(stageNames.size());
for (size_t sIdx = 0; sIdx < stageNames.size(); ++sIdx)
{
m_femAnalysisStages[sIdx].stageName = stageNames[sIdx];
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigFemScalarResultFrames* RigFemPartResults::createScalarResult(size_t stageIndex,
RigFemResultPosEnum resultPosType,
const std::string& fieldName,
const std::string& componentName,
const std::vector<double>& frameTimes)
{
RigFemScalarResultFrames * resFrames = new RigFemScalarResultFrames(frameTimes);
m_femAnalysisStages[stageIndex].resultSets[resultPosType][fieldName][componentName] = resFrames;
return resFrames;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigFemScalarResultFrames* RigFemPartResults::findScalarResult(size_t stageIndex,
RigFemResultPosEnum resultPosType,
const std::string& fieldName,
const std::string& componentName)
{
return m_femAnalysisStages[stageIndex].resultSets[resultPosType][fieldName][componentName].p();
}