mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-20 21:43:20 -06:00
Whitespace
This commit is contained in:
parent
d0a23252ab
commit
77dbd8a25f
@ -30,11 +30,11 @@
|
||||
#include "RimEclipsePropertyFilterCollection.h"
|
||||
#include "RimEclipseResultCase.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimSimWellInViewCollection.h"
|
||||
#include "RimFaultInViewCollection.h"
|
||||
#include "RimFlowDiagSolution.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimSimWellInView.h"
|
||||
#include "RimSimWellInViewCollection.h"
|
||||
#include "RimViewManipulator.h"
|
||||
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
@ -45,7 +45,9 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEclipseView* RicShowContributingWellsFeatureImpl::manipulateSelectedView(RimEclipseResultCase* eclipseResultCase, QString wellName, int timeStep)
|
||||
RimEclipseView* RicShowContributingWellsFeatureImpl::manipulateSelectedView(RimEclipseResultCase* eclipseResultCase,
|
||||
QString wellName,
|
||||
int timeStep)
|
||||
{
|
||||
RimEclipseView* viewToManipulate = RicSelectOrCreateViewFeatureImpl::showViewSelection(
|
||||
eclipseResultCase, "lastUsedWellAllocationView", "ContributingWells_" + wellName, "Show Contributing Wells in View");
|
||||
@ -65,7 +67,9 @@ RimEclipseView* RicShowContributingWellsFeatureImpl::manipulateSelectedView(RimE
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicShowContributingWellsFeatureImpl::modifyViewToShowContributingWells(RimEclipseView* viewToModify, const QString& wellName, int timeStep)
|
||||
void RicShowContributingWellsFeatureImpl::modifyViewToShowContributingWells(RimEclipseView* viewToModify,
|
||||
const QString& wellName,
|
||||
int timeStep)
|
||||
{
|
||||
CVF_ASSERT(viewToModify);
|
||||
|
||||
@ -126,8 +130,8 @@ void RicShowContributingWellsFeatureImpl::modifyViewToShowContributingWells(RimE
|
||||
|
||||
for (RimSimWellInView* w : viewToModify->wellCollection()->wells())
|
||||
{
|
||||
if (std::find(tracerNames.begin(), tracerNames.end(), w->name()) != tracerNames.end()
|
||||
|| selectedWell->name() == w->name())
|
||||
if (std::find(tracerNames.begin(), tracerNames.end(), w->name()) != tracerNames.end() ||
|
||||
selectedWell->name() == w->name())
|
||||
{
|
||||
w->showWell = true;
|
||||
}
|
||||
@ -168,8 +172,7 @@ void RicShowContributingWellsFeatureImpl::modifyViewToShowContributingWells(RimE
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<QString> RicShowContributingWellsFeatureImpl::findContributingTracerNames(
|
||||
const RimFlowDiagSolution* flowDiagSolution,
|
||||
std::vector<QString> RicShowContributingWellsFeatureImpl::findContributingTracerNames(const RimFlowDiagSolution* flowDiagSolution,
|
||||
const RigSimWellData* simWellData,
|
||||
int timeStep)
|
||||
{
|
||||
@ -180,8 +183,7 @@ std::vector<QString> RicShowContributingWellsFeatureImpl::findContributingTracer
|
||||
RimFlowDiagSolution::TracerStatusType requestedTracerType = RimFlowDiagSolution::UNDEFINED;
|
||||
|
||||
const RigWellResultFrame::WellProductionType prodType = simWellData->wellProductionType(timeStep);
|
||||
if ( prodType == RigWellResultFrame::PRODUCER
|
||||
|| prodType == RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE)
|
||||
if (prodType == RigWellResultFrame::PRODUCER || prodType == RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE)
|
||||
{
|
||||
requestedTracerType = RimFlowDiagSolution::INJECTOR;
|
||||
}
|
||||
@ -202,4 +204,3 @@ std::vector<QString> RicShowContributingWellsFeatureImpl::findContributingTracer
|
||||
|
||||
return tracerCellFractionValues;
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,8 @@ CAF_CMD_SOURCE_INIT(RicShowContributingWellsFromPlotFeature, "RicShowContributin
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicShowContributingWellsFromPlotFeature::isCommandEnabled()
|
||||
{
|
||||
RimWellAllocationPlot* wellAllocationPlot = dynamic_cast<RimWellAllocationPlot*>(RiaApplication::instance()->activePlotWindow());
|
||||
RimWellAllocationPlot* wellAllocationPlot =
|
||||
dynamic_cast<RimWellAllocationPlot*>(RiaApplication::instance()->activePlotWindow());
|
||||
|
||||
if (wellAllocationPlot) return true;
|
||||
|
||||
@ -47,7 +48,8 @@ bool RicShowContributingWellsFromPlotFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicShowContributingWellsFromPlotFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
RimWellAllocationPlot* wellAllocationPlot = dynamic_cast<RimWellAllocationPlot*>(RiaApplication::instance()->activePlotWindow());
|
||||
RimWellAllocationPlot* wellAllocationPlot =
|
||||
dynamic_cast<RimWellAllocationPlot*>(RiaApplication::instance()->activePlotWindow());
|
||||
|
||||
if (!wellAllocationPlot) return;
|
||||
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
#include "cafCmdFeature.h"
|
||||
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
@ -29,10 +28,7 @@ class RicShowContributingWellsFromPlotFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
// Overrides
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered(bool isChecked) override;
|
||||
void setupActionLook(QAction* actionToSetup) override;
|
||||
};
|
||||
|
||||
|
||||
|
@ -22,9 +22,9 @@
|
||||
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RimProject.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimEclipseResultCase.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimProject.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
|
||||
@ -73,7 +73,8 @@ RimEclipseView* RicSelectOrCreateViewFeatureImpl::showViewSelection(RimEclipseRe
|
||||
viewToManipulate = featureUi.selectedView();
|
||||
}
|
||||
|
||||
QString refFromProjectToView = caf::PdmReferenceHelper::referenceFromRootToObject(RiaApplication::instance()->project(), viewToManipulate);
|
||||
QString refFromProjectToView =
|
||||
caf::PdmReferenceHelper::referenceFromRootToObject(RiaApplication::instance()->project(), viewToManipulate);
|
||||
RiaApplication::instance()->setCacheDataObject(lastUsedViewKey, refFromProjectToView);
|
||||
|
||||
return viewToManipulate;
|
||||
@ -92,12 +93,14 @@ void RicSelectOrCreateViewFeatureImpl::focusView(RimEclipseView* view)
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
RimEclipseView* RicSelectOrCreateViewFeatureImpl::getDefaultSelectedView(RimEclipseResultCase* resultCase, const QString& lastUsedViewKey)
|
||||
RimEclipseView* RicSelectOrCreateViewFeatureImpl::getDefaultSelectedView(RimEclipseResultCase* resultCase,
|
||||
const QString& lastUsedViewKey)
|
||||
{
|
||||
RimEclipseView* defaultSelectedView = nullptr;
|
||||
|
||||
QString lastUsedViewRef = RiaApplication::instance()->cacheDataObject(lastUsedViewKey).toString();
|
||||
RimEclipseView* lastUsedView = dynamic_cast<RimEclipseView*>(caf::PdmReferenceHelper::objectFromReference(RiaApplication::instance()->project(), lastUsedViewRef));
|
||||
RimEclipseView* lastUsedView = dynamic_cast<RimEclipseView*>(
|
||||
caf::PdmReferenceHelper::objectFromReference(RiaApplication::instance()->project(), lastUsedViewRef));
|
||||
if (lastUsedView)
|
||||
{
|
||||
RimEclipseResultCase* lastUsedViewResultCase = nullptr;
|
||||
|
@ -18,18 +18,18 @@
|
||||
|
||||
#include "RimFlowCharacteristicsPlot.h"
|
||||
|
||||
#include "RigFlowDiagResults.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigActiveCellInfo.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigFlowDiagResults.h"
|
||||
|
||||
#include "RimEclipseResultCase.h"
|
||||
#include "RimFlowDiagSolution.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimEclipseCellColors.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimEclipsePropertyFilter.h"
|
||||
#include "RimEclipsePropertyFilterCollection.h"
|
||||
#include "RimEclipseResultCase.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimFaultInViewCollection.h"
|
||||
#include "RimFlowDiagSolution.h"
|
||||
#include "RimProject.h"
|
||||
|
||||
#include "RicEclipsePropertyFilterFeatureImpl.h"
|
||||
#include "RicSelectOrCreateViewFeatureImpl.h"
|
||||
@ -46,7 +46,6 @@
|
||||
|
||||
#include <cmath> // Needed for HUGE_VAL on Linux
|
||||
|
||||
|
||||
namespace caf
|
||||
{
|
||||
template<>
|
||||
@ -56,11 +55,10 @@ namespace caf
|
||||
addItem(RimFlowCharacteristicsPlot::SELECTED, "SELECTED", "Selected");
|
||||
setDefault(RimFlowCharacteristicsPlot::SELECTED);
|
||||
}
|
||||
}
|
||||
} // namespace caf
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimFlowCharacteristicsPlot, "FlowCharacteristicsPlot");
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -79,8 +77,13 @@ RimFlowCharacteristicsPlot::RimFlowCharacteristicsPlot()
|
||||
CAF_PDM_InitFieldNoDefault(&m_applyTimeSteps, "ApplyTimeSteps", "", "", "", "");
|
||||
caf::PdmUiPushButtonEditor::configureEditorForField(&m_applyTimeSteps);
|
||||
|
||||
CAF_PDM_InitField(&m_maxPvFraction, "CellPVThreshold", 0.1, "Aquifer Cell Threshold", "", "Exclude Aquifer Effects by adding a Cell Pore Volume Threshold as Fraction of Total Pore Volume.", "");
|
||||
|
||||
CAF_PDM_InitField(&m_maxPvFraction,
|
||||
"CellPVThreshold",
|
||||
0.1,
|
||||
"Aquifer Cell Threshold",
|
||||
"",
|
||||
"Exclude Aquifer Effects by adding a Cell Pore Volume Threshold as Fraction of Total Pore Volume.",
|
||||
"");
|
||||
|
||||
CAF_PDM_InitField(&m_showLegend, "ShowLegend", true, "Legend", "", "", "");
|
||||
|
||||
@ -110,7 +113,6 @@ RimFlowCharacteristicsPlot::~RimFlowCharacteristicsPlot()
|
||||
deleteViewWidget();
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -169,7 +171,8 @@ void RimFlowCharacteristicsPlot::updateCurrentTimeStep()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo> RimFlowCharacteristicsPlot::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly)
|
||||
QList<caf::PdmOptionItemInfo> RimFlowCharacteristicsPlot::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly)
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
|
||||
@ -218,7 +221,8 @@ QList<caf::PdmOptionItemInfo> RimFlowCharacteristicsPlot::calculateValueOptions(
|
||||
if (m_flowDiagSolution && m_case)
|
||||
{
|
||||
QStringList timeStepDates = m_case->timeStepStrings();
|
||||
std::vector<int> calculatedTimeSteps = m_flowDiagSolution()->flowDiagResults()->calculatedTimeSteps(RigFlowDiagResultAddress::PHASE_ALL);
|
||||
std::vector<int> calculatedTimeSteps =
|
||||
m_flowDiagSolution()->flowDiagResults()->calculatedTimeSteps(RigFlowDiagResultAddress::PHASE_ALL);
|
||||
for (int tsIdx = 0; tsIdx < timeStepDates.size(); ++tsIdx)
|
||||
{
|
||||
auto it = std::find(calculatedTimeSteps.begin(), calculatedTimeSteps.end(), tsIdx);
|
||||
@ -282,8 +286,7 @@ QList<caf::PdmOptionItemInfo> RimFlowCharacteristicsPlot::calculateValueOptions(
|
||||
|
||||
std::sort(sortedTracerNames.begin(),
|
||||
sortedTracerNames.end(),
|
||||
[](const std::pair<QString, QString>& a, const std::pair<QString, QString>& b) -> bool
|
||||
{
|
||||
[](const std::pair<QString, QString>& a, const std::pair<QString, QString>& b) -> bool {
|
||||
return a.first < b.first;
|
||||
});
|
||||
|
||||
@ -295,7 +298,6 @@ QList<caf::PdmOptionItemInfo> RimFlowCharacteristicsPlot::calculateValueOptions(
|
||||
}
|
||||
|
||||
return options;
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -348,8 +350,7 @@ void RimFlowCharacteristicsPlot::defineUiOrdering(QString uiConfigName, caf::Pdm
|
||||
{
|
||||
caf::PdmUiGroup* regionGroup = uiOrdering.addNewGroup("Region");
|
||||
regionGroup->add(&m_cellFilter);
|
||||
if (m_cellFilter() == RigFlowDiagResults::CELLS_COMMUNICATION ||
|
||||
m_cellFilter() == RigFlowDiagResults::CELLS_DRAINED ||
|
||||
if (m_cellFilter() == RigFlowDiagResults::CELLS_COMMUNICATION || m_cellFilter() == RigFlowDiagResults::CELLS_DRAINED ||
|
||||
m_cellFilter() == RigFlowDiagResults::CELLS_FLOODED)
|
||||
{
|
||||
regionGroup->add(&m_tracerFilter);
|
||||
@ -365,8 +366,7 @@ void RimFlowCharacteristicsPlot::defineUiOrdering(QString uiConfigName, caf::Pdm
|
||||
{
|
||||
regionGroup->add(&m_minCommunication);
|
||||
}
|
||||
else if (m_cellFilter() == RigFlowDiagResults::CELLS_DRAINED ||
|
||||
m_cellFilter() == RigFlowDiagResults::CELLS_FLOODED)
|
||||
else if (m_cellFilter() == RigFlowDiagResults::CELLS_DRAINED || m_cellFilter() == RigFlowDiagResults::CELLS_FLOODED)
|
||||
{
|
||||
regionGroup->add(&m_maxTof);
|
||||
}
|
||||
@ -386,7 +386,9 @@ void RimFlowCharacteristicsPlot::defineUiOrdering(QString uiConfigName, caf::Pdm
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFlowCharacteristicsPlot::defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute)
|
||||
void RimFlowCharacteristicsPlot::defineEditorAttribute(const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute)
|
||||
{
|
||||
if (field == &m_applyTimeSteps)
|
||||
{
|
||||
@ -425,7 +427,9 @@ void RimFlowCharacteristicsPlot::zoomAll()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFlowCharacteristicsPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
void RimFlowCharacteristicsPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue)
|
||||
{
|
||||
RimViewWindow::fieldChangedByUi(changedField, oldValue, newValue);
|
||||
|
||||
@ -481,7 +485,8 @@ void RimFlowCharacteristicsPlot::fieldChangedByUi(const caf::PdmFieldHandle* cha
|
||||
{
|
||||
if (m_flowDiagSolution)
|
||||
{
|
||||
std::vector<int> timeSteps = m_flowDiagSolution()->flowDiagResults()->calculatedTimeSteps(RigFlowDiagResultAddress::PHASE_ALL);
|
||||
std::vector<int> timeSteps =
|
||||
m_flowDiagSolution()->flowDiagResults()->calculatedTimeSteps(RigFlowDiagResultAddress::PHASE_ALL);
|
||||
if (!timeSteps.empty())
|
||||
{
|
||||
timeStep = timeSteps[0];
|
||||
@ -610,12 +615,8 @@ void RimFlowCharacteristicsPlot::onLoadDataAndUpdate()
|
||||
}
|
||||
else
|
||||
{
|
||||
auto flowCharResults = flowResult->flowCharacteristicsResults(timeStepIdx,
|
||||
m_cellFilter(),
|
||||
selectedTracerNames,
|
||||
m_maxPvFraction(),
|
||||
m_minCommunication(),
|
||||
m_maxTof());
|
||||
auto flowCharResults = flowResult->flowCharacteristicsResults(
|
||||
timeStepIdx, m_cellFilter(), selectedTracerNames, m_maxPvFraction(), m_minCommunication(), m_maxTof());
|
||||
timeStepToFlowResultMap[timeStepIdx] = flowCharResults;
|
||||
}
|
||||
lorenzVals[timeStepIdx] = timeStepToFlowResultMap[timeStepIdx].m_lorenzCoefficient;
|
||||
@ -625,7 +626,6 @@ void RimFlowCharacteristicsPlot::onLoadDataAndUpdate()
|
||||
|
||||
for (int timeStepIdx : calculatedTimesteps)
|
||||
{
|
||||
|
||||
const auto& flowCharResults = timeStepToFlowResultMap[timeStepIdx];
|
||||
|
||||
m_flowCharPlotWidget->addFlowCapStorageCapCurve(timeStepDates[timeStepIdx],
|
||||
@ -660,5 +660,3 @@ QWidget* RimFlowCharacteristicsPlot::createViewWidget(QWidget* mainWindowParent)
|
||||
m_flowCharPlotWidget = new RiuFlowCharacteristicsPlot(this, mainWindowParent);
|
||||
return m_flowCharPlotWidget;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user