mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2360 Elm props: Use element index in closest result intex calc
This commit is contained in:
@@ -175,7 +175,9 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::findOrLoadScalarResult(in
|
||||
std::vector<RigFemScalarResultFrames*> resultsForEachComponent;
|
||||
for (auto elem : elementProperties)
|
||||
{
|
||||
RigFemScalarResultFrames* currentFrames = m_femPartResults[partIndex]->createScalarResult(resVarAddr);
|
||||
RigFemResultAddress addressForElement(RIG_ELEMENT, elem.first, "");
|
||||
RigFemScalarResultFrames* currentFrames = m_femPartResults[partIndex]->createScalarResult(addressForElement);
|
||||
currentFrames->enableAsSingleFrameResult();
|
||||
currentFrames->frameData(0).swap(elem.second);
|
||||
}
|
||||
|
||||
@@ -2175,6 +2177,10 @@ RigFemClosestResultIndexCalculator::RigFemClosestResultIndexCalculator(RigFemPar
|
||||
{
|
||||
m_resultIndexToClosestResult = -1;
|
||||
}
|
||||
else if (resultPosition == RIG_ELEMENT)
|
||||
{
|
||||
m_resultIndexToClosestResult = elementIndex;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_resultIndexToClosestResult = m_closestElementNodeResIdx;
|
||||
|
||||
Reference in New Issue
Block a user