(#335) Showing progress bar when loading geo mech results

This commit is contained in:
Pål Hagen 2015-06-26 15:43:43 +02:00
parent 24a84184d8
commit e5bb58b269

View File

@ -37,6 +37,7 @@
#include <stdlib.h>
#include "RigFemNativeStatCalc.h"
#include "cafTensor3.h"
#include "cafProgressInfo.h"
//--------------------------------------------------------------------------------------------------
@ -97,6 +98,8 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::findOrLoadScalarResult(in
int frameCount = this->frameCount();
caf::ProgressInfo progress(frameCount, "Loading Results");
for (int stepIndex = 0; stepIndex < frameCount; ++stepIndex)
{
std::vector<double > frameTimes = m_readerInterface->frameTimes(stepIndex);
@ -122,6 +125,8 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::findOrLoadScalarResult(in
break;
}
}
progress.incrementProgress();
}
// Now fetch the particular component requested, which should now exist and be read.
@ -244,6 +249,7 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateDerivedResult(in
}else if (resVarAddr.fieldName == "NS"){
srcDataFrames = this->findOrLoadScalarResult(partIndex, RigFemResultAddress(resVarAddr.resultPosType, "S", resVarAddr.componentName));
}
RigFemScalarResultFrames * dstDataFrames = m_femPartResults[partIndex]->createScalarResult(resVarAddr);
int frameCount = srcDataFrames->frameCount();
for (int fIdx = 0; fIdx < frameCount; ++fIdx)
@ -257,6 +263,7 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateDerivedResult(in
dstFrameData[vIdx] = -srcFrameData[vIdx];
}
}
return dstDataFrames;
}