mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2025 Formations : Use imported formation names by default when sensible
This commit is contained in:
parent
3f90e8a632
commit
3eaeba8f67
@ -20,10 +20,18 @@
|
|||||||
|
|
||||||
#include "RiaApplication.h"
|
#include "RiaApplication.h"
|
||||||
|
|
||||||
|
#include "RimCase.h"
|
||||||
|
#include "RimEclipseCase.h"
|
||||||
#include "RimFormationNames.h"
|
#include "RimFormationNames.h"
|
||||||
#include "RimFormationNamesCollection.h"
|
#include "RimFormationNamesCollection.h"
|
||||||
|
#include "RimGeoMechCase.h"
|
||||||
#include "RimOilField.h"
|
#include "RimOilField.h"
|
||||||
#include "RimProject.h"
|
#include "RimProject.h"
|
||||||
|
|
||||||
|
#include "RigEclipseCaseData.h"
|
||||||
|
#include "RigFemPartResultsCollection.h"
|
||||||
|
#include "RigGeoMechCaseData.h"
|
||||||
|
|
||||||
#include "RiuMainWindow.h"
|
#include "RiuMainWindow.h"
|
||||||
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
@ -66,6 +74,28 @@ void RicImportFormationNamesFeature::onActionTriggered(bool isChecked)
|
|||||||
// For each file, find existing Formation names item, or create new
|
// For each file, find existing Formation names item, or create new
|
||||||
|
|
||||||
RimFormationNames* formationName = fomNameColl->importFiles(fileNames);
|
RimFormationNames* formationName = fomNameColl->importFiles(fileNames);
|
||||||
|
|
||||||
|
std::vector<RimCase*> cases;
|
||||||
|
proj->allCases(cases);
|
||||||
|
|
||||||
|
if (cases.size() == 1)
|
||||||
|
{
|
||||||
|
std::vector<RimEclipseCase*> eclCases = proj->eclipseCases();
|
||||||
|
if (eclCases.size() == 1)
|
||||||
|
{
|
||||||
|
eclCases[0]->activeFormationNames = formationName;
|
||||||
|
eclCases[0]->eclipseCaseData()->setActiveFormationNames(formationName->formationNamesData());
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<RimGeoMechCase*> geoMechCases = proj->geoMechCases();
|
||||||
|
|
||||||
|
if (geoMechCases.size() == 1)
|
||||||
|
{
|
||||||
|
geoMechCases[0]->activeFormationNames = formationName;
|
||||||
|
geoMechCases[0]->geoMechData()->femPartResults()->setActiveFormationNames(formationName->formationNamesData());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
proj->updateConnectedEditors();
|
proj->updateConnectedEditors();
|
||||||
|
|
||||||
if (formationName)
|
if (formationName)
|
||||||
|
@ -919,6 +919,30 @@ RimWellPath* RimProject::wellPathFromSimulationWell(const QString& simWellName,
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
std::vector<RimGeoMechCase*> RimProject::geoMechCases() const
|
||||||
|
{
|
||||||
|
std::vector<RimGeoMechCase*> cases;
|
||||||
|
|
||||||
|
for (size_t oilFieldIdx = 0; oilFieldIdx < oilFields().size(); oilFieldIdx++)
|
||||||
|
{
|
||||||
|
RimOilField* oilField = oilFields[oilFieldIdx];
|
||||||
|
if (!oilField) continue;
|
||||||
|
|
||||||
|
RimGeoMechModels* geomModels = oilField->geoMechModels();
|
||||||
|
if (geomModels)
|
||||||
|
{
|
||||||
|
for (size_t caseIdx = 0; caseIdx < geomModels->cases.size(); caseIdx++)
|
||||||
|
{
|
||||||
|
cases.push_back(geomModels->cases[caseIdx]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return cases;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -34,10 +34,12 @@ class RigGridManager;
|
|||||||
class RigMainGrid;
|
class RigMainGrid;
|
||||||
class RigWellPath;
|
class RigWellPath;
|
||||||
|
|
||||||
|
class RimCalculationCollection;
|
||||||
class RimCase;
|
class RimCase;
|
||||||
class RimCommandObject;
|
class RimCommandObject;
|
||||||
class RimDialogData;
|
class RimDialogData;
|
||||||
class RimEclipseCase;
|
class RimEclipseCase;
|
||||||
|
class RimGeoMechCase;
|
||||||
class RimIdenticalGridCaseGroup;
|
class RimIdenticalGridCaseGroup;
|
||||||
class RimMainPlotCollection;
|
class RimMainPlotCollection;
|
||||||
class RimMultiSnapshotDefinition;
|
class RimMultiSnapshotDefinition;
|
||||||
@ -48,9 +50,8 @@ class RimSummaryCase;
|
|||||||
class RimView;
|
class RimView;
|
||||||
class RimViewLinker;
|
class RimViewLinker;
|
||||||
class RimViewLinkerCollection;
|
class RimViewLinkerCollection;
|
||||||
class RimWellPathImport;
|
|
||||||
class RimCalculationCollection;
|
|
||||||
class RimWellPath;
|
class RimWellPath;
|
||||||
|
class RimWellPathImport;
|
||||||
|
|
||||||
namespace caf
|
namespace caf
|
||||||
{
|
{
|
||||||
@ -127,6 +128,8 @@ public:
|
|||||||
std::vector<const RigWellPath*> simulationWellBranches(const QString& simWellName);
|
std::vector<const RigWellPath*> simulationWellBranches(const QString& simWellName);
|
||||||
RimWellPath* wellPathFromSimulationWell(const QString& simWellName, int branchIndex = -1);
|
RimWellPath* wellPathFromSimulationWell(const QString& simWellName, int branchIndex = -1);
|
||||||
|
|
||||||
|
std::vector<RimGeoMechCase*> geoMechCases() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Overridden methods
|
// Overridden methods
|
||||||
void initScriptDirectories();
|
void initScriptDirectories();
|
||||||
|
Loading…
Reference in New Issue
Block a user