(#563) Added integration point number in result info text for Geom Cases.

Also added node coordinates of associated nodes.
This commit is contained in:
Jacob Støren
2015-11-02 07:57:33 +01:00
parent f7ebf80e0d
commit 765c659c7f
4 changed files with 41 additions and 2 deletions

View File

@@ -99,3 +99,28 @@ int RigFemTypes::oppositeFace(RigElementType elmType, int faceIdx)
return faceIdx;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const int* RigFemTypes::localElmNodeToIntegrationPointMapping(RigElementType elmType)
{
static const int HEX8_Mapping[8] ={ 0, 1, 3, 2, 4, 5, 7, 6 };
switch (elmType)
{
case HEX8:
case HEX8P:
return HEX8_Mapping;
break;
case CAX4:
return HEX8_Mapping; // First four is identical to HEX8
break;
default:
assert(false); // Element type not supported
break;
}
return HEX8_Mapping;
}

View File

@@ -35,4 +35,5 @@ public:
static int elmentFaceCount(RigElementType elmType);
static const int* localElmNodeIndicesForFace(RigElementType elmType, int faceIdx, int* faceNodeCount);
static int oppositeFace(RigElementType elmType, int faceIdx);
static const int* localElmNodeToIntegrationPointMapping(RigElementType elmType);
};

View File

@@ -924,7 +924,7 @@ void RifOdbReader::readIntegrationPointField(const std::string& fieldName, int p
float* data = bulkDataGetter.data();
RigElementType eType = toRigElementType(bulkData.baseElementType());
const int* elmNodeToIpResultMapping = localElmNodeToIntegrationPointMapping(eType);
const int* elmNodeToIpResultMapping = localElmNodeToIntegrationPointMapping(eType); // Todo: Use the one in RigFemTypes.h, but we need to guard against unknown element types first.
if (!elmNodeToIpResultMapping) continue;
for (int elem = 0; elem < elemCount; elem++)