mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
clang-format: Set column width to 140
* Set column width to 140 * Use c++20 * Remove redundant virtual
This commit is contained in:
@@ -62,8 +62,7 @@ void RiuPvtPlotUpdater::updateOnSelectionChanged( const RiuSelectionItem* select
|
||||
Rim3dView* newFollowAnimView = nullptr;
|
||||
RiuEclipseSelectionItem* eclipseSelectionItem = nullptr;
|
||||
|
||||
eclipseSelectionItem =
|
||||
RiuRelativePermeabilityPlotUpdater::extractEclipseSelectionItem( selectionItem, newFollowAnimView );
|
||||
eclipseSelectionItem = RiuRelativePermeabilityPlotUpdater::extractEclipseSelectionItem( selectionItem, newFollowAnimView );
|
||||
|
||||
bool mustClearPlot = true;
|
||||
m_viewToFollowAnimationFrom = nullptr;
|
||||
@@ -112,8 +111,7 @@ void RiuPvtPlotUpdater::updateOnTimeStepChanged( Rim3dView* changedView )
|
||||
Rim3dView* newFollowAnimView = nullptr;
|
||||
RiuEclipseSelectionItem* eclipseSelectionItem = nullptr;
|
||||
|
||||
eclipseSelectionItem =
|
||||
RiuRelativePermeabilityPlotUpdater::extractEclipseSelectionItem( selectionItem, newFollowAnimView );
|
||||
eclipseSelectionItem = RiuRelativePermeabilityPlotUpdater::extractEclipseSelectionItem( selectionItem, newFollowAnimView );
|
||||
|
||||
if ( eclipseSelectionItem && newFollowAnimView == changedView )
|
||||
{
|
||||
@@ -141,9 +139,9 @@ bool RiuPvtPlotUpdater::queryDataAndUpdatePlot( const RimEclipseResultDefinition
|
||||
|
||||
if ( !eclipseResDef ) return false;
|
||||
|
||||
RimEclipseResultCase* eclipseResultCase = dynamic_cast<RimEclipseResultCase*>( eclipseResDef->eclipseCase() );
|
||||
RigEclipseCaseData* eclipseCaseData = eclipseResultCase ? eclipseResultCase->eclipseCaseData() : nullptr;
|
||||
RiaDefines::PorosityModelType porosityModel = eclipseResDef->porosityModel();
|
||||
RimEclipseResultCase* eclipseResultCase = dynamic_cast<RimEclipseResultCase*>( eclipseResDef->eclipseCase() );
|
||||
RigEclipseCaseData* eclipseCaseData = eclipseResultCase ? eclipseResultCase->eclipseCaseData() : nullptr;
|
||||
RiaDefines::PorosityModelType porosityModel = eclipseResDef->porosityModel();
|
||||
|
||||
if ( eclipseResultCase && eclipseCaseData && eclipseResultCase->flowDiagSolverInterface() )
|
||||
{
|
||||
@@ -152,61 +150,49 @@ bool RiuPvtPlotUpdater::queryDataAndUpdatePlot( const RimEclipseResultDefinition
|
||||
// The following calls will read results from file in preparation for the queries below
|
||||
RigCaseCellResultsData* cellResultsData = eclipseCaseData->results( porosityModel );
|
||||
|
||||
cellResultsData->ensureKnownResultLoaded(
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "RS" ) );
|
||||
cellResultsData->ensureKnownResultLoaded(
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "RV" ) );
|
||||
cellResultsData->ensureKnownResultLoaded(
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "PRESSURE" ) );
|
||||
cellResultsData->ensureKnownResultLoaded(
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PVTNUM" ) );
|
||||
cellResultsData->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "RS" ) );
|
||||
cellResultsData->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "RV" ) );
|
||||
cellResultsData->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "PRESSURE" ) );
|
||||
cellResultsData->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PVTNUM" ) );
|
||||
|
||||
cvf::ref<RigResultAccessor> rsAccessor =
|
||||
RigResultAccessorFactory::createFromResultAddress( eclipseCaseData,
|
||||
gridIndex,
|
||||
porosityModel,
|
||||
timeStepIndex,
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
|
||||
"RS" ) );
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "RS" ) );
|
||||
cvf::ref<RigResultAccessor> rvAccessor =
|
||||
RigResultAccessorFactory::createFromResultAddress( eclipseCaseData,
|
||||
gridIndex,
|
||||
porosityModel,
|
||||
timeStepIndex,
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
|
||||
"RV" ) );
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "RV" ) );
|
||||
cvf::ref<RigResultAccessor> pressureAccessor =
|
||||
RigResultAccessorFactory::createFromResultAddress( eclipseCaseData,
|
||||
gridIndex,
|
||||
porosityModel,
|
||||
timeStepIndex,
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
|
||||
"PRESSURE" ) );
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "PRESSURE" ) );
|
||||
cvf::ref<RigResultAccessor> pvtnumAccessor =
|
||||
RigResultAccessorFactory::createFromResultAddress( eclipseCaseData,
|
||||
gridIndex,
|
||||
porosityModel,
|
||||
timeStepIndex,
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE,
|
||||
"PVTNUM" ) );
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PVTNUM" ) );
|
||||
|
||||
RiuPvtPlotPanel::CellValues cellValues;
|
||||
cellValues.rs = rsAccessor.notNull() ? rsAccessor->cellScalar( gridLocalCellIndex ) : HUGE_VAL;
|
||||
cellValues.rv = rvAccessor.notNull() ? rvAccessor->cellScalar( gridLocalCellIndex ) : HUGE_VAL;
|
||||
cellValues.pressure = pressureAccessor.notNull() ? pressureAccessor->cellScalar( gridLocalCellIndex ) : HUGE_VAL;
|
||||
|
||||
const double cellPvtNumDouble = pvtnumAccessor.notNull() ? pvtnumAccessor->cellScalar( gridLocalCellIndex )
|
||||
: HUGE_VAL;
|
||||
const double cellPvtNumDouble = pvtnumAccessor.notNull() ? pvtnumAccessor->cellScalar( gridLocalCellIndex ) : HUGE_VAL;
|
||||
|
||||
const int cellPvtNum = ( cellPvtNumDouble != HUGE_VAL ) ? static_cast<int>( cellPvtNumDouble )
|
||||
: std::numeric_limits<int>::max();
|
||||
const int cellPvtNum = ( cellPvtNumDouble != HUGE_VAL ) ? static_cast<int>( cellPvtNumDouble ) : std::numeric_limits<int>::max();
|
||||
|
||||
std::vector<RigFlowDiagSolverInterface::PvtCurve> fvfCurveArr =
|
||||
eclipseResultCase->flowDiagSolverInterface()->calculatePvtCurves( RigFlowDiagSolverInterface::PVT_CT_FVF,
|
||||
cellPvtNum );
|
||||
eclipseResultCase->flowDiagSolverInterface()->calculatePvtCurves( RigFlowDiagSolverInterface::PVT_CT_FVF, cellPvtNum );
|
||||
std::vector<RigFlowDiagSolverInterface::PvtCurve> viscosityCurveArr =
|
||||
eclipseResultCase->flowDiagSolverInterface()->calculatePvtCurves( RigFlowDiagSolverInterface::PVT_CT_VISCOSITY,
|
||||
cellPvtNum );
|
||||
eclipseResultCase->flowDiagSolverInterface()->calculatePvtCurves( RigFlowDiagSolverInterface::PVT_CT_VISCOSITY, cellPvtNum );
|
||||
|
||||
RiuPvtPlotPanel::FvfDynProps fvfDynProps;
|
||||
eclipseResultCase->flowDiagSolverInterface()->calculatePvtDynamicPropertiesFvf( cellPvtNum,
|
||||
@@ -230,13 +216,7 @@ bool RiuPvtPlotUpdater::queryDataAndUpdatePlot( const RimEclipseResultDefinition
|
||||
"PVTNUM",
|
||||
cellPvtNumDouble );
|
||||
|
||||
plotPanel->setPlotData( eclipseCaseData->unitsType(),
|
||||
fvfCurveArr,
|
||||
viscosityCurveArr,
|
||||
fvfDynProps,
|
||||
viscosityDynProps,
|
||||
cellValues,
|
||||
cellRefText );
|
||||
plotPanel->setPlotData( eclipseCaseData->unitsType(), fvfCurveArr, viscosityCurveArr, fvfDynProps, viscosityDynProps, cellValues, cellRefText );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user