mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2528 Tensor Vectors: Make tensor vectors for result "E"
This commit is contained in:
@@ -2146,7 +2146,7 @@ std::vector<caf::Ten3f> RigFemPartResultsCollection::tensors(const RigFemResultA
|
||||
address13.componentName = "S13";
|
||||
address23.componentName = "S23";
|
||||
}
|
||||
else if (resVarAddr.fieldName == "E")
|
||||
else if (resVarAddr.fieldName == "NE")
|
||||
{
|
||||
address11.componentName = "E11";
|
||||
address22.componentName = "E22";
|
||||
@@ -2312,7 +2312,7 @@ std::vector<RigFemResultAddress> RigFemPartResultsCollection::tensorPrincipalCom
|
||||
addresses[1].componentName = "S2";
|
||||
addresses[2].componentName = "S3";
|
||||
}
|
||||
else if (resVarAddr.fieldName == "E")
|
||||
else if (resVarAddr.fieldName == "NE")
|
||||
{
|
||||
addresses[0].componentName = "E1";
|
||||
addresses[1].componentName = "E2";
|
||||
|
||||
@@ -340,7 +340,6 @@ cvf::ref<cvf::Part> RivTensorResultPartMgr::createPart(const std::vector<TensorV
|
||||
auto vectorColors = m_rimReservoirView->tensorResults()->vectorColors();
|
||||
if (vectorColors == RimTensorResults::MAGENTA_BROWN_BLACK || vectorColors == RimTensorResults::WHITE_GRAY_BLACK)
|
||||
{
|
||||
|
||||
activeScalerMapper = discreteScalarMapper.p();
|
||||
|
||||
createOneColorPerPrincipalScalarMapper(vectorColors, discreteScalarMapper.p());
|
||||
@@ -453,7 +452,7 @@ bool RivTensorResultPartMgr::isTensorAddress(RigFemResultAddress address)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!(address.fieldName == "SE" || address.fieldName == "ST" || address.fieldName == "E"))
|
||||
if (!(address.fieldName == "SE" || address.fieldName == "ST" || address.fieldName == "NE"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ void RimTensorResults::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||
std::vector<std::string> fieldCompNames = getResultMetaDataForUIFieldSetting();
|
||||
if (m_resultPositionTypeUiField() == m_resultPositionType())
|
||||
{
|
||||
m_resultFieldNameUiField = m_resultFieldName();
|
||||
m_resultFieldNameUiField = uiFieldName(m_resultFieldName());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -237,7 +237,7 @@ void RimTensorResults::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||
if (changedField == &m_resultFieldNameUiField)
|
||||
{
|
||||
m_resultPositionType = m_resultPositionTypeUiField;
|
||||
m_resultFieldName = m_resultFieldNameUiField;
|
||||
m_resultFieldName = fieldNameFromUi(m_resultFieldNameUiField);
|
||||
}
|
||||
if (changedField == &m_showTensors)
|
||||
{
|
||||
@@ -319,7 +319,7 @@ void RimTensorResults::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering
|
||||
void RimTensorResults::initAfterRead()
|
||||
{
|
||||
m_resultPositionTypeUiField = m_resultPositionType;
|
||||
m_resultFieldNameUiField = m_resultFieldName();
|
||||
m_resultFieldNameUiField = uiFieldName(m_resultFieldName());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -336,3 +336,29 @@ void RimTensorResults::defineEditorAttribute(const caf::PdmFieldHandle* field, Q
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimTensorResults::uiFieldName(const QString& fieldName)
|
||||
{
|
||||
if (fieldName == "NE")
|
||||
{
|
||||
return QString("E");
|
||||
}
|
||||
|
||||
return fieldName;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimTensorResults::fieldNameFromUi(const QString& uiFieldName)
|
||||
{
|
||||
if (uiFieldName == "E")
|
||||
{
|
||||
return QString("NE");
|
||||
}
|
||||
|
||||
return uiFieldName;
|
||||
}
|
||||
|
||||
@@ -82,6 +82,9 @@ private:
|
||||
virtual void initAfterRead() override;
|
||||
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override;
|
||||
|
||||
static QString uiFieldName(const QString& fieldName);
|
||||
static QString fieldNameFromUi(const QString& uiFieldName);
|
||||
|
||||
private:
|
||||
caf::PdmField<bool> m_showTensors;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user