mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2715 Geo Mech : Show element type in Result Info
This commit is contained in:
parent
bc26fa697c
commit
9856038524
@ -19,8 +19,9 @@
|
||||
|
||||
#include "RigFemTypes.h"
|
||||
|
||||
#include <QString>
|
||||
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@ -124,3 +125,30 @@ const int* RigFemTypes::localElmNodeToIntegrationPointMapping(RigElementType elm
|
||||
|
||||
return HEX8_Mapping;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RigFemTypes::elementTypeText(RigElementType elemType)
|
||||
{
|
||||
QString txt = "UNKNOWN_ELM_TYPE";
|
||||
|
||||
switch (elemType)
|
||||
{
|
||||
case HEX8:
|
||||
txt = "HEX8";
|
||||
break;
|
||||
case HEX8P:
|
||||
txt = "HEX8P";
|
||||
break;
|
||||
case CAX4:
|
||||
txt = "CAX4";
|
||||
break;
|
||||
case UNKNOWN_ELM_TYPE:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return txt;
|
||||
}
|
||||
|
@ -18,7 +18,8 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
#include <assert.h>
|
||||
|
||||
class QString;
|
||||
|
||||
enum RigElementType
|
||||
{
|
||||
@ -36,4 +37,5 @@ public:
|
||||
static const int* localElmNodeIndicesForFace(RigElementType elmType, int faceIdx, int* faceNodeCount);
|
||||
static int oppositeFace(RigElementType elmType, int faceIdx);
|
||||
static const int* localElmNodeToIntegrationPointMapping(RigElementType elmType);
|
||||
static QString elementTypeText(RigElementType elemType);
|
||||
};
|
||||
|
@ -129,7 +129,9 @@ QString RiuFemResultTextBuilder::geometrySelectionText(QString itemSeparator)
|
||||
|
||||
RigFemPart* femPart = geomData->femParts()->part(m_gridIndex);
|
||||
int elementId = femPart->elmId(m_cellIndex);
|
||||
text += QString("Element : Id[%1]").arg(elementId);
|
||||
auto elementType = femPart->elementType(m_cellIndex);
|
||||
|
||||
text += QString("Element : Id[%1], Type[%2]").arg(elementId).arg(RigFemTypes::elementTypeText(elementType));
|
||||
|
||||
size_t i = 0;
|
||||
size_t j = 0;
|
||||
@ -141,7 +143,7 @@ QString RiuFemResultTextBuilder::geometrySelectionText(QString itemSeparator)
|
||||
j++;
|
||||
k++;
|
||||
|
||||
cvf::Vec3d domainCoord = m_intersectionPoint; // + geomCase->femParts()->displayModelOffset();
|
||||
cvf::Vec3d domainCoord = m_intersectionPoint;
|
||||
|
||||
//cvf::StructGridInterface::FaceEnum faceEnum(m_face);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user