(#331) Properly shown POR values by checking for element type.

We are calculating and using an elmNode POR result to correctly
respect the element type.
This commit is contained in:
Jacob Støren
2015-09-28 07:39:57 +02:00
parent 56dae7f71a
commit 5677665dba
6 changed files with 73 additions and 5 deletions

View File

@@ -234,16 +234,19 @@ void RivFemPartPartMgr::updateCellResultColor(size_t timeStepIndex, RimGeoMechCe
RigFemResultAddress resVarAddress = cellResultColors->resultAddress();
// Do a "Hack" to show elm nodal and not nodal POR results
if (resVarAddress.resultPosType == RIG_NODAL && resVarAddress.fieldName == "POR-Bar") resVarAddress.resultPosType = RIG_ELEMENT_NODAL;
const std::vector<float>& resultValues = caseData->femPartResults()->resultValues(resVarAddress, m_gridIdx, (int)timeStepIndex);
const std::vector<size_t>* vxToResultMapping = NULL;
if (cellResultColors->resultPositionType() == RIG_NODAL)
if (resVarAddress.resultPosType == RIG_NODAL)
{
vxToResultMapping = &(m_surfaceGenerator.quadVerticesToNodeIdxMapping());
}
else if ( cellResultColors->resultPositionType() == RIG_ELEMENT_NODAL
|| cellResultColors->resultPositionType() == RIG_INTEGRATION_POINT)
else if ( resVarAddress.resultPosType == RIG_ELEMENT_NODAL
|| resVarAddress.resultPosType == RIG_INTEGRATION_POINT)
{
vxToResultMapping = &(m_surfaceGenerator.quadVerticesToGlobalElmNodeIdx());
}