#2347 Elm props: Traverse result type ELEMENT in stat calc

This commit is contained in:
Rebecca Cox 2018-01-11 10:58:24 +01:00
parent cede66c8c0
commit de95ee0a9a

View File

@ -93,6 +93,22 @@ private:
}
}
}
else if (m_resVarAddr.resultPosType == RIG_ELEMENT)
{
for (int pIdx = 0; pIdx < partCount; ++pIdx)
{
RigFemPart* part = m_caseData->femParts()->part(pIdx);
const std::vector<float>& values = m_resultsData->resultValues(m_resVarAddr, pIdx, (int)timeStepIndex);
int elmCount = part->elementCount();
for (int elmIdx = 0; elmIdx < elmCount; ++elmIdx)
{
if (!(*m_cellVisibilities)[elmIdx]) continue;
accumulator.addValue(values[elmIdx]);
}
}
}
else
{
for (int pIdx = 0; pIdx < partCount; ++pIdx)