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);
|
activeView->firstAncestorOrThisOfType(eclCase);
|
||||||
if (eclCase)
|
if (eclCase)
|
||||||
{
|
{
|
||||||
std::vector<RimFlowDiagSolution*> flowSols = eclCase->flowDiagSolutions();
|
RimFlowDiagSolution* defaultFlowDiagSolution = eclCase->defaultFlowDiagSolution();
|
||||||
if (flowSols.size() > 0)
|
if (defaultFlowDiagSolution)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -138,8 +138,7 @@ void RimWellAllocationPlot::setFromSimulationWell(RimEclipseWell* simWell)
|
|||||||
m_flowDiagSolution = eclView->cellResult()->flowDiagSolution();
|
m_flowDiagSolution = eclView->cellResult()->flowDiagSolution();
|
||||||
if ( !m_flowDiagSolution )
|
if ( !m_flowDiagSolution )
|
||||||
{
|
{
|
||||||
std::vector<RimFlowDiagSolution*> flowSolutions = m_case->flowDiagSolutions();
|
m_flowDiagSolution = m_case->defaultFlowDiagSolution();
|
||||||
if ( flowSolutions.size() ) m_flowDiagSolution = flowSolutions.front();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
loadDataAndUpdate();
|
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 QString gridFileName() const { return caseFileName();}
|
||||||
virtual void updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath);
|
virtual void updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath);
|
||||||
|
|
||||||
|
RimFlowDiagSolution* defaultFlowDiagSolution();
|
||||||
std::vector<RimFlowDiagSolution*> flowDiagSolutions();
|
std::vector<RimFlowDiagSolution*> flowDiagSolutions();
|
||||||
RigFlowDiagSolverInterface* flowDiagSolverInterface();
|
RigFlowDiagSolverInterface* flowDiagSolverInterface();
|
||||||
|
|
||||||
|
@ -278,10 +278,10 @@ void RimEclipseResultDefinition::assignFlowSolutionFromCase()
|
|||||||
this->firstAncestorOrThisOfType(eclCase);
|
this->firstAncestorOrThisOfType(eclCase);
|
||||||
if (eclCase)
|
if (eclCase)
|
||||||
{
|
{
|
||||||
std::vector<RimFlowDiagSolution*> flowSols = eclCase->flowDiagSolutions();
|
RimFlowDiagSolution* defaultFlowDiagSolution = eclCase->defaultFlowDiagSolution();
|
||||||
if (flowSols.size() > 0)
|
if (defaultFlowDiagSolution)
|
||||||
{
|
{
|
||||||
this->setFlowSolution(flowSols[0]);
|
this->setFlowSolution(defaultFlowDiagSolution);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -68,6 +68,8 @@ public:
|
|||||||
void setPorosityModel(RimDefines::PorosityModelType val);
|
void setPorosityModel(RimDefines::PorosityModelType val);
|
||||||
QString resultVariable() const { return m_resultVariable(); }
|
QString resultVariable() const { return m_resultVariable(); }
|
||||||
virtual void setResultVariable(const QString& val);
|
virtual void setResultVariable(const QString& val);
|
||||||
|
|
||||||
|
void setFlowSolution(RimFlowDiagSolution* flowSol);
|
||||||
RimFlowDiagSolution* flowDiagSolution();
|
RimFlowDiagSolution* flowDiagSolution();
|
||||||
RigFlowDiagResultAddress flowDiagResAddress() const;
|
RigFlowDiagResultAddress flowDiagResAddress() const;
|
||||||
|
|
||||||
@ -125,7 +127,6 @@ protected:
|
|||||||
caf::PdmPointer<RimEclipseCase> m_eclipseCase;
|
caf::PdmPointer<RimEclipseCase> m_eclipseCase;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setFlowSolution(RimFlowDiagSolution* flowSol);
|
|
||||||
void setSelectedTracers(const std::vector<QString>& selectedTracers);
|
void setSelectedTracers(const std::vector<QString>& selectedTracers);
|
||||||
void assignFlowSolutionFromCase();
|
void assignFlowSolutionFromCase();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user