mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Use correct name for timestep
This commit is contained in:
@@ -176,23 +176,23 @@ RigFemScalarResultFrames*
|
||||
RigFemResultAddress( resVarAddr.resultPosType,
|
||||
resVarAddr.fieldName,
|
||||
"SA12",
|
||||
resVarAddr.timeLapseBaseFrameIdx ) );
|
||||
resVarAddr.timeLapseBaseStepIdx ) );
|
||||
RigFemScalarResultFrames* s13Frames =
|
||||
m_resultCollection->createScalarResult( partIndex,
|
||||
RigFemResultAddress( resVarAddr.resultPosType,
|
||||
resVarAddr.fieldName,
|
||||
"SA13",
|
||||
resVarAddr.timeLapseBaseFrameIdx ) );
|
||||
resVarAddr.timeLapseBaseStepIdx ) );
|
||||
RigFemScalarResultFrames* s23Frames =
|
||||
m_resultCollection->createScalarResult( partIndex,
|
||||
RigFemResultAddress( resVarAddr.resultPosType,
|
||||
resVarAddr.fieldName,
|
||||
"SA23",
|
||||
resVarAddr.timeLapseBaseFrameIdx ) );
|
||||
resVarAddr.timeLapseBaseStepIdx ) );
|
||||
|
||||
float inf = std::numeric_limits<float>::infinity();
|
||||
int frameCount = s1Frames->frameCount();
|
||||
int baseTimeStep = resVarAddr.timeLapseBaseFrameIdx;
|
||||
int baseTimeStep = resVarAddr.timeLapseBaseStepIdx;
|
||||
|
||||
for ( int fIdx = 0; fIdx < frameCount; ++fIdx )
|
||||
{
|
||||
|
@@ -112,7 +112,7 @@ RigFemScalarResultFrames*
|
||||
frameCountProgress.incrementProgress();
|
||||
|
||||
int frameCount = srcDataFrames->frameCount();
|
||||
int baseFrameIdx = resVarAddr.timeLapseBaseFrameIdx;
|
||||
int baseFrameIdx = resVarAddr.timeLapseBaseStepIdx;
|
||||
if ( baseFrameIdx >= frameCount ) return dstDataFrames;
|
||||
const std::vector<float>& baseFrameData = srcDataFrames->frameData( baseFrameIdx );
|
||||
if ( baseFrameData.empty() ) return dstDataFrames;
|
||||
@@ -152,7 +152,7 @@ RigFemScalarResultFrames*
|
||||
"Calculating " + QString::fromStdString( resVarAddr.fieldName + ": " + resVarAddr.componentName ) );
|
||||
frameCountProgress.setNextProgressIncrement( m_resultCollection->frameCount() );
|
||||
|
||||
RigFemResultAddress totStressCompAddr( resVarAddr.resultPosType, "ST", "", resVarAddr.timeLapseBaseFrameIdx );
|
||||
RigFemResultAddress totStressCompAddr( resVarAddr.resultPosType, "ST", "", resVarAddr.timeLapseBaseStepIdx );
|
||||
{
|
||||
std::string scomp;
|
||||
std::string gcomp = resVarAddr.componentName;
|
||||
@@ -175,11 +175,9 @@ RigFemScalarResultFrames*
|
||||
frameCountProgress.incrementProgress();
|
||||
frameCountProgress.setNextProgressIncrement( m_resultCollection->frameCount() );
|
||||
RigFemScalarResultFrames* srcPORDataFrames =
|
||||
m_resultCollection->findOrLoadScalarResult( partIndex,
|
||||
RigFemResultAddress( RIG_NODAL,
|
||||
"POR-Bar",
|
||||
"",
|
||||
resVarAddr.timeLapseBaseFrameIdx ) );
|
||||
m_resultCollection
|
||||
->findOrLoadScalarResult( partIndex,
|
||||
RigFemResultAddress( RIG_NODAL, "POR-Bar", "", resVarAddr.timeLapseBaseStepIdx ) );
|
||||
RigFemScalarResultFrames* dstDataFrames = m_resultCollection->createScalarResult( partIndex, resVarAddr );
|
||||
|
||||
frameCountProgress.incrementProgress();
|
||||
|
@@ -1029,7 +1029,7 @@ void RigFemPartResultsCollection::deleteResultForAllTimeSteps( const std::vector
|
||||
{
|
||||
auto resToDelete = res;
|
||||
|
||||
resToDelete.timeLapseBaseFrameIdx = RigFemResultAddress::allTimeLapsesValue();
|
||||
resToDelete.timeLapseBaseStepIdx = RigFemResultAddress::allTimeLapsesValue();
|
||||
|
||||
deleteResult( resToDelete );
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@ public:
|
||||
: resultPosType( RIG_NODAL )
|
||||
, fieldName( "" )
|
||||
, componentName( "" )
|
||||
, timeLapseBaseFrameIdx( NO_TIME_LAPSE )
|
||||
, timeLapseBaseStepIdx( NO_TIME_LAPSE )
|
||||
, refKLayerIndex( NO_COMPACTION )
|
||||
, normalizedByHydrostaticPressure( false )
|
||||
{
|
||||
@@ -42,13 +42,13 @@ public:
|
||||
RigFemResultAddress( RigFemResultPosEnum resPosType,
|
||||
const std::string& aFieldName,
|
||||
const std::string& aComponentName,
|
||||
int timeLapseBaseFrameIdx = NO_TIME_LAPSE,
|
||||
int timeLapseBaseStepIdx = NO_TIME_LAPSE,
|
||||
int refKLayerIndex = NO_COMPACTION,
|
||||
bool normalizedByHydrostaticPressure = false )
|
||||
: resultPosType( resPosType )
|
||||
, fieldName( aFieldName )
|
||||
, componentName( aComponentName )
|
||||
, timeLapseBaseFrameIdx( timeLapseBaseFrameIdx )
|
||||
, timeLapseBaseStepIdx( timeLapseBaseStepIdx )
|
||||
, refKLayerIndex( refKLayerIndex )
|
||||
, normalizedByHydrostaticPressure( normalizedByHydrostaticPressure )
|
||||
{
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
: resultPosType( rhs.resultPosType )
|
||||
, fieldName( rhs.fieldName )
|
||||
, componentName( rhs.componentName )
|
||||
, timeLapseBaseFrameIdx( rhs.timeLapseBaseFrameIdx )
|
||||
, timeLapseBaseStepIdx( rhs.timeLapseBaseStepIdx )
|
||||
, refKLayerIndex( rhs.refKLayerIndex )
|
||||
, normalizedByHydrostaticPressure( rhs.normalizedByHydrostaticPressure )
|
||||
{
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
resultPosType = rhs.resultPosType;
|
||||
fieldName = rhs.fieldName;
|
||||
componentName = rhs.componentName;
|
||||
timeLapseBaseFrameIdx = rhs.timeLapseBaseFrameIdx;
|
||||
timeLapseBaseStepIdx = rhs.timeLapseBaseStepIdx;
|
||||
refKLayerIndex = rhs.refKLayerIndex;
|
||||
normalizedByHydrostaticPressure = rhs.normalizedByHydrostaticPressure;
|
||||
return *this;
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
RigFemResultPosEnum resultPosType;
|
||||
std::string fieldName;
|
||||
std::string componentName;
|
||||
int timeLapseBaseFrameIdx;
|
||||
int timeLapseBaseStepIdx;
|
||||
int refKLayerIndex;
|
||||
bool normalizedByHydrostaticPressure;
|
||||
|
||||
@@ -93,8 +93,8 @@ public:
|
||||
static constexpr int noTimeLapseValue() { return NO_TIME_LAPSE; }
|
||||
static constexpr int noCompactionValue() { return NO_COMPACTION; }
|
||||
|
||||
bool isTimeLapse() const { return timeLapseBaseFrameIdx > NO_TIME_LAPSE; }
|
||||
bool representsAllTimeLapses() const { return timeLapseBaseFrameIdx == ALL_TIME_LAPSES; }
|
||||
bool isTimeLapse() const { return timeLapseBaseStepIdx > NO_TIME_LAPSE; }
|
||||
bool representsAllTimeLapses() const { return timeLapseBaseStepIdx == ALL_TIME_LAPSES; }
|
||||
bool normalizeByHydrostaticPressure() const { return normalizedByHydrostaticPressure; }
|
||||
|
||||
bool isValid() const
|
||||
@@ -115,9 +115,9 @@ public:
|
||||
return ( normalizedByHydrostaticPressure < other.normalizedByHydrostaticPressure );
|
||||
}
|
||||
|
||||
if ( timeLapseBaseFrameIdx != other.timeLapseBaseFrameIdx )
|
||||
if ( timeLapseBaseStepIdx != other.timeLapseBaseStepIdx )
|
||||
{
|
||||
return ( timeLapseBaseFrameIdx < other.timeLapseBaseFrameIdx );
|
||||
return ( timeLapseBaseStepIdx < other.timeLapseBaseStepIdx );
|
||||
}
|
||||
|
||||
if ( resultPosType != other.resultPosType )
|
||||
@@ -141,7 +141,7 @@ public:
|
||||
bool operator==( const RigFemResultAddress& other ) const
|
||||
{
|
||||
if ( resultPosType != other.resultPosType || fieldName != other.fieldName ||
|
||||
componentName != other.componentName || timeLapseBaseFrameIdx != other.timeLapseBaseFrameIdx ||
|
||||
componentName != other.componentName || timeLapseBaseStepIdx != other.timeLapseBaseStepIdx ||
|
||||
normalizedByHydrostaticPressure != other.normalizedByHydrostaticPressure )
|
||||
{
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user