mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1606 Add option to export completions for all wells or only checked wells
This commit is contained in:
@@ -28,6 +28,14 @@ namespace caf
|
|||||||
addItem(RicExportCompletionDataSettingsUi::SPLIT_ON_WELL_AND_COMPLETION_TYPE, "SPLIT_ON_WELL_AND_COMPLETION_TYPE", "Split on Well and Completion Type");
|
addItem(RicExportCompletionDataSettingsUi::SPLIT_ON_WELL_AND_COMPLETION_TYPE, "SPLIT_ON_WELL_AND_COMPLETION_TYPE", "Split on Well and Completion Type");
|
||||||
setDefault(RicExportCompletionDataSettingsUi::UNIFIED_FILE);
|
setDefault(RicExportCompletionDataSettingsUi::UNIFIED_FILE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<>
|
||||||
|
void RicExportCompletionDataSettingsUi::WellSelectionType::setUp()
|
||||||
|
{
|
||||||
|
addItem(RicExportCompletionDataSettingsUi::ALL_WELLS, "ALL_WELLS", "All Wells");
|
||||||
|
addItem(RicExportCompletionDataSettingsUi::CHECKED_WELLS, "CHECKED_WELLS", "Checked Wells");
|
||||||
|
setDefault(RicExportCompletionDataSettingsUi::ALL_WELLS);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -41,6 +49,7 @@ RicExportCompletionDataSettingsUi::RicExportCompletionDataSettingsUi()
|
|||||||
CAF_PDM_InitObject("RimExportCompletionDataSettings", "", "", "");
|
CAF_PDM_InitObject("RimExportCompletionDataSettings", "", "", "");
|
||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault(&fileSplit, "FileSplit", "File Split", "", "", "");
|
CAF_PDM_InitFieldNoDefault(&fileSplit, "FileSplit", "File Split", "", "", "");
|
||||||
|
CAF_PDM_InitFieldNoDefault(&wellSelection, "WellSelection", "Well Selection", "", "", "");
|
||||||
|
|
||||||
CAF_PDM_InitField(&timeStep, "TimeStepIndex", 0, "Time Step", "", "", "");
|
CAF_PDM_InitField(&timeStep, "TimeStepIndex", 0, "Time Step", "", "", "");
|
||||||
|
|
||||||
|
|||||||
@@ -36,14 +36,20 @@ public:
|
|||||||
SPLIT_ON_WELL,
|
SPLIT_ON_WELL,
|
||||||
SPLIT_ON_WELL_AND_COMPLETION_TYPE,
|
SPLIT_ON_WELL_AND_COMPLETION_TYPE,
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef caf::AppEnum<ExportSplit> ExportSplitType;
|
typedef caf::AppEnum<ExportSplit> ExportSplitType;
|
||||||
|
|
||||||
|
enum WellSelection {
|
||||||
|
ALL_WELLS,
|
||||||
|
CHECKED_WELLS,
|
||||||
|
};
|
||||||
|
typedef caf::AppEnum<WellSelection> WellSelectionType;
|
||||||
|
|
||||||
|
|
||||||
RicExportCompletionDataSettingsUi();
|
RicExportCompletionDataSettingsUi();
|
||||||
|
|
||||||
|
|
||||||
caf::PdmField<ExportSplitType> fileSplit;
|
caf::PdmField<ExportSplitType> fileSplit;
|
||||||
|
caf::PdmField<WellSelectionType> wellSelection;
|
||||||
|
|
||||||
caf::PdmField<bool> computeTransmissibility;
|
caf::PdmField<bool> computeTransmissibility;
|
||||||
caf::PdmField<bool> includePerforations;
|
caf::PdmField<bool> includePerforations;
|
||||||
|
|||||||
@@ -147,9 +147,25 @@ void RicWellPathExportCompletionDataFeature::exportCompletions(const std::vector
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<RimWellPath*> usedWellPaths;
|
||||||
|
if (exportSettings.wellSelection == RicExportCompletionDataSettingsUi::ALL_WELLS)
|
||||||
|
{
|
||||||
|
usedWellPaths = wellPaths;
|
||||||
|
}
|
||||||
|
else if (exportSettings.wellSelection == RicExportCompletionDataSettingsUi::CHECKED_WELLS)
|
||||||
|
{
|
||||||
|
for (auto wellPath : wellPaths)
|
||||||
|
{
|
||||||
|
if (wellPath->showWellPath)
|
||||||
|
{
|
||||||
|
usedWellPaths.push_back(wellPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
bool unitSystemMismatch = false;
|
bool unitSystemMismatch = false;
|
||||||
for (const RimWellPath* wellPath : wellPaths)
|
for (const RimWellPath* wellPath : usedWellPaths)
|
||||||
{
|
{
|
||||||
if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_FIELD && exportSettings.caseToApply->eclipseCaseData()->unitsType() != RigEclipseCaseData::UNITS_FIELD)
|
if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_FIELD && exportSettings.caseToApply->eclipseCaseData()->unitsType() != RigEclipseCaseData::UNITS_FIELD)
|
||||||
{
|
{
|
||||||
@@ -172,7 +188,7 @@ void RicWellPathExportCompletionDataFeature::exportCompletions(const std::vector
|
|||||||
|
|
||||||
std::map<IJKCellIndex, std::vector<RigCompletionData> > completionData;
|
std::map<IJKCellIndex, std::vector<RigCompletionData> > completionData;
|
||||||
|
|
||||||
for (auto wellPath : wellPaths)
|
for (auto wellPath : usedWellPaths)
|
||||||
{
|
{
|
||||||
// Generate completion data
|
// Generate completion data
|
||||||
|
|
||||||
@@ -210,7 +226,7 @@ void RicWellPathExportCompletionDataFeature::exportCompletions(const std::vector
|
|||||||
}
|
}
|
||||||
else if (exportSettings.fileSplit == RicExportCompletionDataSettingsUi::SPLIT_ON_WELL)
|
else if (exportSettings.fileSplit == RicExportCompletionDataSettingsUi::SPLIT_ON_WELL)
|
||||||
{
|
{
|
||||||
for (auto wellPath : wellPaths)
|
for (auto wellPath : usedWellPaths)
|
||||||
{
|
{
|
||||||
std::vector<RigCompletionData> wellCompletions;
|
std::vector<RigCompletionData> wellCompletions;
|
||||||
for (auto completion : completions)
|
for (auto completion : completions)
|
||||||
@@ -227,7 +243,7 @@ void RicWellPathExportCompletionDataFeature::exportCompletions(const std::vector
|
|||||||
}
|
}
|
||||||
else if (exportSettings.fileSplit == RicExportCompletionDataSettingsUi::SPLIT_ON_WELL_AND_COMPLETION_TYPE)
|
else if (exportSettings.fileSplit == RicExportCompletionDataSettingsUi::SPLIT_ON_WELL_AND_COMPLETION_TYPE)
|
||||||
{
|
{
|
||||||
for (auto wellPath : wellPaths)
|
for (auto wellPath : usedWellPaths)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
std::vector<RigCompletionData> fishbonesCompletions = getCompletionsForWellAndCompletionType(completions, wellPath->completions()->wellNameForExport(), RigCompletionData::FISHBONES);
|
std::vector<RigCompletionData> fishbonesCompletions = getCompletionsForWellAndCompletionType(completions, wellPath->completions()->wellNameForExport(), RigCompletionData::FISHBONES);
|
||||||
|
|||||||
Reference in New Issue
Block a user