mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2534 Mohr circle: Always use SE as result
This commit is contained in:
parent
f4d4a8aa46
commit
4f8c585be7
@ -27,6 +27,7 @@
|
|||||||
#include "RigFemPartCollection.h"
|
#include "RigFemPartCollection.h"
|
||||||
#include "RigFemPartGrid.h"
|
#include "RigFemPartGrid.h"
|
||||||
#include "RigFemPartResultsCollection.h"
|
#include "RigFemPartResultsCollection.h"
|
||||||
|
#include "RigFemResultPosEnum.h"
|
||||||
#include "RigGeoMechCaseData.h"
|
#include "RigGeoMechCaseData.h"
|
||||||
|
|
||||||
#include "RimGeoMechCase.h"
|
#include "RimGeoMechCase.h"
|
||||||
@ -334,15 +335,10 @@ void RiuMohrsCirclePlot::queryDataAndUpdatePlot(RimGeoMechView* geoMechView, siz
|
|||||||
RigFemPartResultsCollection* resultCollection = geoMechView->geoMechCase()->geoMechData()->femPartResults();
|
RigFemPartResultsCollection* resultCollection = geoMechView->geoMechCase()->geoMechData()->femPartResults();
|
||||||
|
|
||||||
int frameIdx = geoMechView->currentTimeStep();
|
int frameIdx = geoMechView->currentTimeStep();
|
||||||
|
RigFemResultAddress address(RigFemResultPosEnum::RIG_ELEMENT_NODAL, "SE", "");
|
||||||
|
|
||||||
RigFemResultAddress currentAddress = geoMechView->cellResult->resultAddress();
|
|
||||||
if (!(currentAddress.fieldName == "SE" || currentAddress.fieldName == "ST" || currentAddress.fieldName == "NE"))
|
|
||||||
{
|
|
||||||
clearPlot();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// TODO: All tensors are calculated every time this function is called. FIX
|
// TODO: All tensors are calculated every time this function is called. FIX
|
||||||
std::vector<caf::Ten3f> vertexTensors = resultCollection->tensors(currentAddress, 0, frameIdx);
|
std::vector<caf::Ten3f> vertexTensors = resultCollection->tensors(address, 0, frameIdx);
|
||||||
if (vertexTensors.empty())
|
if (vertexTensors.empty())
|
||||||
{
|
{
|
||||||
clearPlot();
|
clearPlot();
|
||||||
@ -356,14 +352,7 @@ void RiuMohrsCirclePlot::queryDataAndUpdatePlot(RimGeoMechView* geoMechView, siz
|
|||||||
size_t i, j, k;
|
size_t i, j, k;
|
||||||
femPart->structGrid()->ijkFromCellIndex(cellIndex, &i, &j, &k);
|
femPart->structGrid()->ijkFromCellIndex(cellIndex, &i, &j, &k);
|
||||||
|
|
||||||
int elmId = femPart->elmId(cellIndex);
|
QString title = QString("SE, Element Id[%1], ijk[%2,%3,%4]").arg(femPart->elmId(cellIndex)).arg(i).arg(j).arg(k);
|
||||||
|
|
||||||
QString title;
|
|
||||||
QString fieldName = geoMechView->cellResultResultDefinition()->resultFieldUiName();
|
|
||||||
|
|
||||||
title += QString("%1").arg(fieldName);
|
|
||||||
|
|
||||||
title += QString(", Element Id[%1], ijk[%2,%3,%4]").arg(elmId).arg(i).arg(j).arg(k);
|
|
||||||
this->setTitle(title);
|
this->setTitle(title);
|
||||||
|
|
||||||
caf::Ten3f tensorSumOfElmNodes = vertexTensors[femPart->elementNodeResultIdx((int)cellIndex, 0)];
|
caf::Ten3f tensorSumOfElmNodes = vertexTensors[femPart->elementNodeResultIdx((int)cellIndex, 0)];
|
||||||
|
Loading…
Reference in New Issue
Block a user