mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1288 Added defaultFlowDiagSolution to RimEclipseResultCase
This commit is contained in:
parent
7e4906fced
commit
40a5f8dc02
@ -48,8 +48,8 @@ bool RicShowWellAllocationPlotFeature::isCommandEnabled()
|
||||
activeView->firstAncestorOrThisOfType(eclCase);
|
||||
if (eclCase)
|
||||
{
|
||||
std::vector<RimFlowDiagSolution*> flowSols = eclCase->flowDiagSolutions();
|
||||
if (flowSols.size() > 0)
|
||||
RimFlowDiagSolution* defaultFlowDiagSolution = eclCase->defaultFlowDiagSolution();
|
||||
if (defaultFlowDiagSolution)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -138,8 +138,7 @@ void RimWellAllocationPlot::setFromSimulationWell(RimEclipseWell* simWell)
|
||||
m_flowDiagSolution = eclView->cellResult()->flowDiagSolution();
|
||||
if ( !m_flowDiagSolution )
|
||||
{
|
||||
std::vector<RimFlowDiagSolution*> flowSolutions = m_case->flowDiagSolutions();
|
||||
if ( flowSolutions.size() ) m_flowDiagSolution = flowSolutions.front();
|
||||
m_flowDiagSolution = m_case->defaultFlowDiagSolution();
|
||||
}
|
||||
|
||||
loadDataAndUpdate();
|
||||
|
@ -354,6 +354,19 @@ void RimEclipseResultCase::updateFilePathsFromProjectPath(const QString& newProj
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFlowDiagSolution* RimEclipseResultCase::defaultFlowDiagSolution()
|
||||
{
|
||||
if (m_flowDiagSolutions.size() > 0)
|
||||
{
|
||||
return m_flowDiagSolutions[0];
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -52,6 +52,7 @@ public:
|
||||
virtual QString gridFileName() const { return caseFileName();}
|
||||
virtual void updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath);
|
||||
|
||||
RimFlowDiagSolution* defaultFlowDiagSolution();
|
||||
std::vector<RimFlowDiagSolution*> flowDiagSolutions();
|
||||
RigFlowDiagSolverInterface* flowDiagSolverInterface();
|
||||
|
||||
|
@ -278,10 +278,10 @@ void RimEclipseResultDefinition::assignFlowSolutionFromCase()
|
||||
this->firstAncestorOrThisOfType(eclCase);
|
||||
if (eclCase)
|
||||
{
|
||||
std::vector<RimFlowDiagSolution*> flowSols = eclCase->flowDiagSolutions();
|
||||
if (flowSols.size() > 0)
|
||||
RimFlowDiagSolution* defaultFlowDiagSolution = eclCase->defaultFlowDiagSolution();
|
||||
if (defaultFlowDiagSolution)
|
||||
{
|
||||
this->setFlowSolution(flowSols[0]);
|
||||
this->setFlowSolution(defaultFlowDiagSolution);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -68,6 +68,8 @@ public:
|
||||
void setPorosityModel(RimDefines::PorosityModelType val);
|
||||
QString resultVariable() const { return m_resultVariable(); }
|
||||
virtual void setResultVariable(const QString& val);
|
||||
|
||||
void setFlowSolution(RimFlowDiagSolution* flowSol);
|
||||
RimFlowDiagSolution* flowDiagSolution();
|
||||
RigFlowDiagResultAddress flowDiagResAddress() const;
|
||||
|
||||
@ -125,7 +127,6 @@ protected:
|
||||
caf::PdmPointer<RimEclipseCase> m_eclipseCase;
|
||||
|
||||
private:
|
||||
void setFlowSolution(RimFlowDiagSolution* flowSol);
|
||||
void setSelectedTracers(const std::vector<QString>& selectedTracers);
|
||||
void assignFlowSolutionFromCase();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user