Skip to content

Commit

Permalink
Add well target generator cases to RimProject::allCases.
Browse files Browse the repository at this point in the history
  • Loading branch information
kriben committed Dec 20, 2024
1 parent 2f76412 commit b92109f
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ std::vector<RimEclipseCase*> RimEclipseCaseEnsemble::cases() const
return m_caseCollection->reservoirs.childrenByType();
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RimWellTargetCandidatesGenerator*> RimEclipseCaseEnsemble::wellTargetsGenerators() const
{
return m_wellTargetGenerators.childrenByType();
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion ApplicationLibCode/ProjectDataModel/RimEclipseCaseEnsemble.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ class RimEclipseCaseEnsemble : public RimNamedObject

RimEclipseViewCollection* viewCollection() const;

void addWellTargetsGenerator( RimWellTargetCandidatesGenerator* generator );
void addWellTargetsGenerator( RimWellTargetCandidatesGenerator* generator );
std::vector<RimWellTargetCandidatesGenerator*> wellTargetsGenerators() const;

void addStatisticsContourMap( RimStatisticsContourMap* statisticsContourMap );

Expand Down
6 changes: 6 additions & 0 deletions ApplicationLibCode/ProjectDataModel/RimProject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
#include "RimWellPath.h"
#include "RimWellPathCollection.h"

#include "RimWellTargetCandidatesGenerator.h"
#include "VerticalFlowPerformance/RimVfpDataCollection.h"
#include "VerticalFlowPerformance/RimVfpPlotCollection.h"

Expand Down Expand Up @@ -605,6 +606,11 @@ std::vector<RimCase*> RimProject::allGridCases() const
{
cases.push_back( acase );
}

for ( RimWellTargetCandidatesGenerator* generator : ensemble->wellTargetsGenerators() )
{
if ( auto ensembleStatisticsCase = generator->ensembleStatisticsCase() ) cases.push_back( ensembleStatisticsCase );
}
}

RimGeoMechModels* geomModels = oilField->geoMechModels();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,3 +423,11 @@ void RimWellTargetCandidatesGenerator::updateResultDefinition()
RimEclipseCase* eclipseCase = firstCase();
if ( eclipseCase ) m_resultDefinition->setEclipseCase( eclipseCase );
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimEclipseCase* RimWellTargetCandidatesGenerator::ensembleStatisticsCase() const
{
return m_ensembleStatisticsCase;
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ class RimWellTargetCandidatesGenerator : public caf::PdmObject

void updateResultDefinition();

RimEclipseCase* ensembleStatisticsCase() const;

protected:
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
Expand Down

0 comments on commit b92109f

Please sign in to comment.