Use opm-flowdiagnostics-applications as submodule

* Deletes the copy of the code in ThirdPary folder
* Replace code with opm-flowdiagnostics-applications as submodule
* Refactors ECL data handling for flow diagnostics
Updates flow diagnostics to utilize ECL init data consistently.
This change streamlines the passing and usage of initialization
data within the flow diagnostics routines, enhancing code
clarity and maintainability. Removes redundant passing of grid
data, simplifying function signatures.
This commit is contained in:
Magne Sjaastad authored and GitHub committed 2025-10-27 14:09:57 +01:00
1 parent 73dd0e0667
commit 91192a671c
70 files changed
+54 -35417

No files matched your search

@@ -17,9 +17,8 @@
/////////////////////////////////////////////////////////////////////////////////
#include "RiuRelativePermeabilityPlotUpdater.h"
#include "Riu3dSelectionManager.h"
#include "RiuRelativePermeabilityPlotPanel.h"
#include "RiaLogging.h"
#include "RiaResultNames.h"
#include "RigActiveCellInfo.h"
@@ -38,6 +37,9 @@
#include "RimEclipseView.h"
#include "RimExtrudedCurveIntersection.h"
#include "Riu3dSelectionManager.h"
#include "RiuRelativePermeabilityPlotPanel.h"
#include <cmath>
//==================================================================================================
@@ -104,9 +106,6 @@ bool RiuRelativePermeabilityPlotUpdater::queryDataAndUpdatePlot( const RimEclips
{
// cvf::Trace::show("Updating RelPerm plot for active cell index: %d", static_cast<int>(activeCellIndex));
std::vector<RigFlowDiagDefines::RelPermCurve> relPermCurveArr =
eclipseResultCase->flowDiagSolverInterface()->calculateRelPermCurves( activeCellIndex );
// Make sure we load the results that we'll query below
RigCaseCellResultsData* cellResultsData = eclipseCaseData->results( RiaDefines::PorosityModelType::MATRIX_MODEL );
cellResultsData->ensureKnownResultLoaded(
@@ -137,10 +136,21 @@ bool RiuRelativePermeabilityPlotUpdater::queryDataAndUpdatePlot( const RimEclips
timeStepIndex,
RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE,
"SATNUM" ) );
if ( satnumAccessor.isNull() )
{
QString text = QString( "Could not read SATNUM value, not able to create relative permeability curves." );
RiaLogging::error( text );
return false;
}
const double cellSWAT = swatAccessor.notNull() ? swatAccessor->cellScalar( gridLocalCellIndex ) : HUGE_VAL;
const double cellSGAS = sgasAccessor.notNull() ? sgasAccessor->cellScalar( gridLocalCellIndex ) : HUGE_VAL;
const double cellSATNUM = satnumAccessor.notNull() ? satnumAccessor->cellScalar( gridLocalCellIndex ) : HUGE_VAL;
// cvf::Trace::show("cellSWAT = %f cellSGAS = %f cellSATNUM = %f", cellSWAT, cellSGAS, cellSATNUM);
const int cellSATNUM = satnumAccessor->cellScalar( gridLocalCellIndex );
std::vector<RigFlowDiagDefines::RelPermCurve> relPermCurveArr =
eclipseResultCase->flowDiagSolverInterface()->calculateRelPermCurves( activeCellIndex, cellSATNUM );
QString cellRefText = constructCellReferenceText( eclipseCaseData, gridIndex, gridLocalCellIndex, "SATNUM", cellSATNUM );
QString caseName = eclipseResultCase->caseUserDescription();