mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#335) Showing progress bar when loading geo mech results
This commit is contained in:
parent
24a84184d8
commit
e5bb58b269
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user