2019-01-11 13:03:46 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2018- Equinor ASA
|
|
|
|
|
//
|
|
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
// (at your option) any later version.
|
|
|
|
|
//
|
|
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
//
|
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
|
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#include "RimEclipseContourMapProjection.h"
|
2018-10-16 09:53:30 +02:00
|
|
|
|
2024-10-25 15:11:42 +02:00
|
|
|
#include "RiaPorosityModel.h"
|
2018-11-05 14:31:07 +01:00
|
|
|
#include "RigCaseCellResultsData.h"
|
2024-10-17 14:29:59 +02:00
|
|
|
#include "RigContourMapCalculator.h"
|
2024-10-16 14:59:24 +02:00
|
|
|
#include "RigContourMapGrid.h"
|
2018-10-16 09:53:30 +02:00
|
|
|
#include "RigEclipseCaseData.h"
|
2024-10-25 15:11:42 +02:00
|
|
|
#include "RigEclipseContourMapProjection.h"
|
2023-05-11 08:37:58 +02:00
|
|
|
#include "RigEclipseResultAddress.h"
|
2018-10-16 09:53:30 +02:00
|
|
|
#include "RigMainGrid.h"
|
|
|
|
|
|
2024-03-15 09:32:45 +01:00
|
|
|
#include "Rim3dView.h"
|
2019-04-25 07:42:38 +02:00
|
|
|
#include "RimEclipseCase.h"
|
2018-10-16 09:53:30 +02:00
|
|
|
#include "RimEclipseCellColors.h"
|
2019-04-25 07:42:38 +02:00
|
|
|
#include "RimEclipseContourMapView.h"
|
2018-11-09 15:25:35 +01:00
|
|
|
#include "RimEclipseResultDefinition.h"
|
2019-04-25 07:42:38 +02:00
|
|
|
#include "RimEclipseView.h"
|
2018-10-30 11:43:50 +01:00
|
|
|
#include "RimRegularLegendConfig.h"
|
2018-10-17 13:26:15 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
CAF_PDM_SOURCE_INIT( RimEclipseContourMapProjection, "RimEclipseContourMapProjection" );
|
2018-10-16 09:53:30 +02:00
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-01-11 13:03:46 +01:00
|
|
|
RimEclipseContourMapProjection::RimEclipseContourMapProjection()
|
2019-01-11 15:11:38 +01:00
|
|
|
: RimContourMapProjection()
|
2018-10-16 09:53:30 +02:00
|
|
|
{
|
2022-01-07 08:31:52 +01:00
|
|
|
CAF_PDM_InitObject( "RimEclipseContourMapProjection", ":/2DMapProjection16x16.png" );
|
2018-11-05 16:19:04 +01:00
|
|
|
|
2021-11-14 14:15:12 +01:00
|
|
|
CAF_PDM_InitField( &m_weightByParameter, "WeightByParameter", false, "Weight by Result Parameter" );
|
|
|
|
|
CAF_PDM_InitFieldNoDefault( &m_weightingResult, "WeightingResult", "" );
|
2019-09-06 10:40:57 +02:00
|
|
|
m_weightingResult.uiCapability()->setUiTreeChildrenHidden( true );
|
2018-11-09 15:25:35 +01:00
|
|
|
m_weightingResult = new RimEclipseResultDefinition;
|
2019-09-06 10:40:57 +02:00
|
|
|
m_weightingResult->findField( "MResultType" )->uiCapability()->setUiName( "Result Type" );
|
2018-12-20 10:38:20 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
setName( "Map Projection" );
|
|
|
|
|
nameField()->uiCapability()->setUiReadOnly( true );
|
2018-10-16 09:53:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2020-02-12 11:13:38 +01:00
|
|
|
RimEclipseContourMapProjection::~RimEclipseContourMapProjection()
|
|
|
|
|
{
|
|
|
|
|
}
|
2018-11-21 09:32:04 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-01-11 13:03:46 +01:00
|
|
|
QString RimEclipseContourMapProjection::resultDescriptionText() const
|
2018-11-21 09:32:04 +01:00
|
|
|
{
|
|
|
|
|
QString resultText = resultAggregationText();
|
2019-09-06 10:40:57 +02:00
|
|
|
if ( !isColumnResult() )
|
2018-11-21 09:32:04 +01:00
|
|
|
{
|
2019-09-06 10:40:57 +02:00
|
|
|
resultText += QString( ", %1" ).arg( view()->cellResult()->resultVariable() );
|
2018-11-21 09:32:04 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return resultText;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-01-11 13:03:46 +01:00
|
|
|
QString RimEclipseContourMapProjection::weightingParameter() const
|
2018-11-21 09:32:04 +01:00
|
|
|
{
|
|
|
|
|
QString parameter = "None";
|
2019-09-06 10:40:57 +02:00
|
|
|
if ( m_weightByParameter() && !m_weightingResult->isTernarySaturationSelected() )
|
2018-11-21 09:32:04 +01:00
|
|
|
{
|
|
|
|
|
parameter = m_weightingResult->resultVariableUiShortName();
|
|
|
|
|
}
|
|
|
|
|
return parameter;
|
|
|
|
|
}
|
|
|
|
|
|
2018-10-30 11:43:50 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-01-11 13:03:46 +01:00
|
|
|
RimRegularLegendConfig* RimEclipseContourMapProjection::legendConfig() const
|
2018-10-30 11:43:50 +01:00
|
|
|
{
|
2018-11-21 09:32:04 +01:00
|
|
|
return view()->cellResult()->legendConfig();
|
2018-10-30 11:43:50 +01:00
|
|
|
}
|
|
|
|
|
|
2018-11-09 15:25:35 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-01-11 13:03:46 +01:00
|
|
|
void RimEclipseContourMapProjection::updateLegend()
|
2019-09-06 10:40:57 +02:00
|
|
|
{
|
2018-11-21 09:32:04 +01:00
|
|
|
RimEclipseCellColors* cellColors = view()->cellResult();
|
|
|
|
|
|
2024-10-25 15:11:42 +02:00
|
|
|
double minVal = minValue();
|
|
|
|
|
double maxVal = maxValue();
|
2019-01-11 16:06:08 +01:00
|
|
|
|
2020-09-24 15:51:59 +02:00
|
|
|
auto [minValAllTimeSteps, maxValAllTimeSteps] = minmaxValuesAllTimeSteps();
|
2018-11-21 09:32:04 +01:00
|
|
|
|
2020-09-24 15:51:59 +02:00
|
|
|
legendConfig()->setAutomaticRanges( minValAllTimeSteps, maxValAllTimeSteps, minVal, maxVal );
|
2018-11-21 09:32:04 +01:00
|
|
|
|
2024-10-17 14:29:59 +02:00
|
|
|
if ( isColumnResult() )
|
2018-11-21 09:32:04 +01:00
|
|
|
{
|
2019-09-06 10:40:57 +02:00
|
|
|
legendConfig()->setTitle( QString( "Map Projection\n%1" ).arg( m_resultAggregation().uiText() ) );
|
2018-11-21 09:32:04 +01:00
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2019-09-06 10:40:57 +02:00
|
|
|
QString projectionLegendText = QString( "Map Projection\n%1" ).arg( m_resultAggregation().uiText() );
|
|
|
|
|
if ( weightingParameter() != "None" )
|
2018-11-21 09:32:04 +01:00
|
|
|
{
|
2019-09-06 10:40:57 +02:00
|
|
|
projectionLegendText += QString( "(W: %1)" ).arg( weightingParameter() );
|
2018-11-21 09:32:04 +01:00
|
|
|
}
|
2019-09-06 10:40:57 +02:00
|
|
|
projectionLegendText += QString( "\nResult: %1" ).arg( cellColors->resultVariableUiShortName() );
|
2018-11-21 09:32:04 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
legendConfig()->setTitle( projectionLegendText );
|
2018-11-09 15:25:35 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-09-25 11:48:41 +02:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
double RimEclipseContourMapProjection::sampleSpacing() const
|
|
|
|
|
{
|
2024-10-25 15:11:42 +02:00
|
|
|
if ( auto ec = eclipseCase() )
|
2020-09-25 11:48:41 +02:00
|
|
|
{
|
2024-10-25 15:11:42 +02:00
|
|
|
if ( auto mainGrid = ec->mainGrid() )
|
|
|
|
|
{
|
|
|
|
|
return m_relativeSampleSpacing * mainGrid->characteristicIJCellSize();
|
|
|
|
|
}
|
2020-09-25 11:48:41 +02:00
|
|
|
}
|
2024-10-25 15:11:42 +02:00
|
|
|
|
2020-09-25 11:48:41 +02:00
|
|
|
return 0.0;
|
|
|
|
|
}
|
2018-11-15 21:40:10 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2022-12-14 11:29:14 +01:00
|
|
|
void RimEclipseContourMapProjection::clearGridMappingAndRedraw()
|
2018-11-15 21:40:10 +01:00
|
|
|
{
|
2023-08-04 09:04:14 +02:00
|
|
|
clearGridMapping();
|
|
|
|
|
updateConnectedEditors();
|
|
|
|
|
generateResultsIfNecessary( view()->currentTimeStep() );
|
|
|
|
|
updateLegend();
|
2018-11-21 09:32:04 +01:00
|
|
|
|
2023-05-12 21:41:34 +02:00
|
|
|
RimEclipseView* parentView = firstAncestorOrThisOfTypeAsserted<RimEclipseView>();
|
2022-12-14 11:29:14 +01:00
|
|
|
parentView->scheduleCreateDisplayModelAndRedraw();
|
2018-11-06 13:23:24 +01:00
|
|
|
}
|
|
|
|
|
|
2018-11-21 09:32:04 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2024-10-25 15:11:42 +02:00
|
|
|
std::vector<double> RimEclipseContourMapProjection::generateResults( int timeStep ) const
|
2018-11-21 09:32:04 +01:00
|
|
|
{
|
2019-01-11 15:11:38 +01:00
|
|
|
m_weightingResult->loadResult();
|
|
|
|
|
|
2024-10-25 15:11:42 +02:00
|
|
|
if ( m_contourMapProjection )
|
2019-01-10 20:55:58 +01:00
|
|
|
{
|
2024-10-25 15:11:42 +02:00
|
|
|
RimEclipseCellColors* cellColors = view()->cellResult();
|
|
|
|
|
RigEclipseResultAddress resAddr( cellColors->resultType(),
|
|
|
|
|
cellColors->resultVariable(),
|
|
|
|
|
cellColors->timeLapseBaseTimeStep(),
|
|
|
|
|
cellColors->caseDiffIndex() );
|
|
|
|
|
|
|
|
|
|
return dynamic_cast<RigEclipseContourMapProjection*>( m_contourMapProjection.get() )
|
|
|
|
|
->generateResults( resAddr, m_resultAggregation(), timeStep );
|
|
|
|
|
}
|
2021-06-01 14:14:05 +02:00
|
|
|
|
2024-10-25 15:11:42 +02:00
|
|
|
return {};
|
|
|
|
|
}
|
2019-01-11 15:11:38 +01:00
|
|
|
|
2024-10-25 15:11:42 +02:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
void RimEclipseContourMapProjection::generateAndSaveResults( int timeStep )
|
|
|
|
|
{
|
|
|
|
|
m_weightingResult->loadResult();
|
|
|
|
|
|
|
|
|
|
if ( m_contourMapProjection )
|
|
|
|
|
{
|
|
|
|
|
RimEclipseCellColors* cellColors = view()->cellResult();
|
|
|
|
|
RigEclipseResultAddress resAddr( cellColors->resultType(),
|
|
|
|
|
cellColors->resultVariable(),
|
|
|
|
|
cellColors->timeLapseBaseTimeStep(),
|
|
|
|
|
cellColors->caseDiffIndex() );
|
|
|
|
|
|
|
|
|
|
dynamic_cast<RigEclipseContourMapProjection*>( m_contourMapProjection.get() )
|
|
|
|
|
->generateAndSaveResults( resAddr, m_resultAggregation(), timeStep );
|
2018-11-21 09:32:04 +01:00
|
|
|
}
|
2018-11-15 21:40:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-01-16 10:51:43 +01:00
|
|
|
bool RimEclipseContourMapProjection::resultVariableChanged() const
|
2019-09-06 10:40:57 +02:00
|
|
|
{
|
|
|
|
|
if ( !m_currentResultName.isEmpty() )
|
2019-01-11 12:32:46 +01:00
|
|
|
{
|
|
|
|
|
RimEclipseCellColors* cellColors = view()->cellResult();
|
2019-09-06 10:40:57 +02:00
|
|
|
if ( cellColors->resultVariable() != m_currentResultName )
|
2019-01-11 12:32:46 +01:00
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-01-11 16:06:08 +01:00
|
|
|
return false;
|
2018-10-16 09:53:30 +02:00
|
|
|
}
|
|
|
|
|
|
2019-01-10 20:55:58 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-01-16 10:51:43 +01:00
|
|
|
void RimEclipseContourMapProjection::clearResultVariable()
|
2019-01-10 20:55:58 +01:00
|
|
|
{
|
2019-01-11 15:11:38 +01:00
|
|
|
m_currentResultName = "";
|
2018-10-16 09:53:30 +02:00
|
|
|
}
|
|
|
|
|
|
2018-10-17 13:26:15 +02:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-01-16 10:51:43 +01:00
|
|
|
void RimEclipseContourMapProjection::updateGridInformation()
|
2018-11-21 09:32:04 +01:00
|
|
|
{
|
2024-10-25 15:11:42 +02:00
|
|
|
auto eclipseCase = this->eclipseCase();
|
|
|
|
|
auto eclipseCaseData = eclipseCase->eclipseCaseData();
|
|
|
|
|
auto resultData = eclipseCaseData->results( RiaDefines::PorosityModelType::MATRIX_MODEL );
|
2020-09-25 11:48:41 +02:00
|
|
|
|
2024-10-16 14:59:24 +02:00
|
|
|
cvf::BoundingBox gridBoundingBox = eclipseCase->activeCellsBoundingBox();
|
|
|
|
|
m_contourMapGrid = std::make_unique<RigContourMapGrid>( gridBoundingBox, sampleSpacing() );
|
2024-10-25 15:11:42 +02:00
|
|
|
m_contourMapProjection = std::make_unique<RigEclipseContourMapProjection>( *m_contourMapGrid, *eclipseCaseData, *resultData );
|
2019-01-16 10:51:43 +01:00
|
|
|
}
|
2018-10-17 15:46:47 +02:00
|
|
|
|
2019-01-16 10:51:43 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
std::vector<double> RimEclipseContourMapProjection::retrieveParameterWeights()
|
|
|
|
|
{
|
|
|
|
|
std::vector<double> weights;
|
2019-09-06 10:40:57 +02:00
|
|
|
if ( m_weightByParameter() )
|
2018-10-17 13:26:15 +02:00
|
|
|
{
|
2019-01-23 14:24:12 +01:00
|
|
|
RigEclipseResultAddress gridScalarResultIdx = m_weightingResult->eclipseResultAddress();
|
2019-09-06 10:40:57 +02:00
|
|
|
if ( gridScalarResultIdx.isValid() )
|
2018-10-17 13:26:15 +02:00
|
|
|
{
|
2019-01-16 10:51:43 +01:00
|
|
|
m_weightingResult->loadResult();
|
|
|
|
|
int timeStep = 0;
|
2019-09-06 10:40:57 +02:00
|
|
|
if ( m_weightingResult->hasDynamicResult() )
|
2018-11-09 15:25:35 +01:00
|
|
|
{
|
2019-01-16 10:51:43 +01:00
|
|
|
timeStep = view()->currentTimeStep();
|
2018-10-17 13:26:15 +02:00
|
|
|
}
|
2019-09-06 10:40:57 +02:00
|
|
|
weights = m_weightingResult->currentGridCellResults()->cellScalarResults( gridScalarResultIdx, timeStep );
|
2018-10-17 13:26:15 +02:00
|
|
|
}
|
|
|
|
|
}
|
2019-01-16 10:51:43 +01:00
|
|
|
return weights;
|
2018-11-13 14:22:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-04-25 07:42:38 +02:00
|
|
|
RimEclipseCase* RimEclipseContourMapProjection::eclipseCase() const
|
2018-11-13 14:22:34 +01:00
|
|
|
{
|
2024-03-15 09:32:45 +01:00
|
|
|
auto view = firstAncestorOrThisOfType<Rim3dView>();
|
|
|
|
|
if ( !view ) return nullptr;
|
|
|
|
|
|
|
|
|
|
return dynamic_cast<RimEclipseCase*>( view->ownerCase() );
|
2019-01-16 10:51:43 +01:00
|
|
|
}
|
2018-11-13 14:22:34 +01:00
|
|
|
|
2019-01-16 10:51:43 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
RimGridView* RimEclipseContourMapProjection::baseView() const
|
|
|
|
|
{
|
|
|
|
|
return view();
|
|
|
|
|
}
|
2018-11-13 14:22:34 +01:00
|
|
|
|
2019-01-02 15:53:13 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-01-11 15:11:38 +01:00
|
|
|
RimEclipseContourMapView* RimEclipseContourMapProjection::view() const
|
2019-01-02 15:53:13 +01:00
|
|
|
{
|
2023-05-12 21:41:34 +02:00
|
|
|
return firstAncestorOrThisOfTypeAsserted<RimEclipseContourMapView>();
|
2019-01-02 15:53:13 +01:00
|
|
|
}
|
2019-01-11 16:14:54 +01:00
|
|
|
|
2020-12-07 09:30:09 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
void RimEclipseContourMapProjection::updateAfterResultGeneration( int timeStep )
|
|
|
|
|
{
|
|
|
|
|
m_currentResultTimestep = timeStep;
|
|
|
|
|
|
|
|
|
|
RimEclipseCellColors* cellColors = view()->cellResult();
|
|
|
|
|
m_currentResultName = cellColors->resultVariable();
|
|
|
|
|
}
|
|
|
|
|
|
2019-01-11 16:14:54 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2023-02-26 10:48:40 +01:00
|
|
|
void RimEclipseContourMapProjection::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
2019-01-11 16:14:54 +01:00
|
|
|
{
|
2019-09-06 10:40:57 +02:00
|
|
|
RimContourMapProjection::fieldChangedByUi( changedField, oldValue, newValue );
|
|
|
|
|
if ( changedField == &m_weightByParameter || changedField == &m_weightingResult )
|
2019-01-11 16:14:54 +01:00
|
|
|
{
|
|
|
|
|
clearGridMapping();
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-01-16 10:51:43 +01:00
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
void RimEclipseContourMapProjection::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
2019-01-16 10:51:43 +01:00
|
|
|
{
|
2019-09-06 10:40:57 +02:00
|
|
|
RimContourMapProjection::defineUiOrdering( uiConfigName, uiOrdering );
|
2019-01-16 10:51:43 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
caf::PdmUiGroup* weightingGroup = uiOrdering.addNewGroup( "Mean Weighting Options" );
|
|
|
|
|
weightingGroup->add( &m_weightByParameter );
|
2022-08-19 05:18:36 -07:00
|
|
|
weightingGroup->setCollapsedByDefault();
|
2019-01-16 10:51:43 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
m_weightByParameter.uiCapability()->setUiReadOnly( !isMeanResult() );
|
|
|
|
|
if ( !isMeanResult() )
|
2019-01-16 10:51:43 +01:00
|
|
|
{
|
|
|
|
|
m_weightByParameter = false;
|
|
|
|
|
}
|
|
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
if ( m_weightByParameter() )
|
2019-01-16 10:51:43 +01:00
|
|
|
{
|
2019-09-06 10:40:57 +02:00
|
|
|
m_weightingResult->uiOrdering( uiConfigName, *weightingGroup );
|
2019-01-16 10:51:43 +01:00
|
|
|
}
|
|
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
uiOrdering.skipRemainingFields( true );
|
2019-01-16 10:51:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
void RimEclipseContourMapProjection::initAfterRead()
|
|
|
|
|
{
|
|
|
|
|
RimContourMapProjection::initAfterRead();
|
2019-09-06 10:40:57 +02:00
|
|
|
if ( eclipseCase() )
|
2019-01-16 10:51:43 +01:00
|
|
|
{
|
2019-09-06 10:40:57 +02:00
|
|
|
m_weightingResult->setEclipseCase( eclipseCase() );
|
2019-01-16 10:51:43 +01:00
|
|
|
}
|
|
|
|
|
}
|
2024-10-25 15:11:42 +02:00
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
std::pair<double, double> RimEclipseContourMapProjection::minmaxValuesAllTimeSteps()
|
|
|
|
|
{
|
|
|
|
|
if ( !resultRangeIsValid() )
|
|
|
|
|
{
|
|
|
|
|
clearTimeStepRange();
|
|
|
|
|
|
|
|
|
|
int timeStepCount = static_cast<int>( eclipseCase()->timeStepStrings().size() );
|
|
|
|
|
for ( int i = 0; i < (int)timeStepCount; ++i )
|
|
|
|
|
{
|
|
|
|
|
std::vector<double> aggregatedResults = generateResults( i );
|
|
|
|
|
m_minResultAllTimeSteps = std::min( m_minResultAllTimeSteps, RigContourMapProjection::minValue( aggregatedResults ) );
|
|
|
|
|
m_maxResultAllTimeSteps = std::max( m_maxResultAllTimeSteps, RigContourMapProjection::maxValue( aggregatedResults ) );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return std::make_pair( m_minResultAllTimeSteps, m_maxResultAllTimeSteps );
|
|
|
|
|
}
|