mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-31 17:17:50 -05:00
#14772 Python: Add Reservoir.export_completions as object method and forward exportWellPathCompletions to it
RimEclipseCase_exportCompletions takes WellPath objects (empty list means all visible well paths) and an explicit export folder, and exposes all completion export settings. The existing enums ExportSplit, CompdatExport and PressureDepletionWBHPSource are registered as Python StrEnums CompletionExportSplit, CompdatExportType and TransScalingWbhpSource. RicfExportWellPathCompletions resolves well path names to objects and the export folder from the command file executor, then forwards to the object method. Case.export_well_path_completions() in Python is kept and emits a DeprecationWarning.
This commit is contained in:
1 parent
001a515c68
commit
afe8f39f6b
6 files changed
+437
-70
No files matched your search
+18
@@ -26,6 +26,8 @@
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathCompletions.h"
|
||||
|
||||
#include "cafPdmScriptEnumNameRegistry.h"
|
||||
|
||||
namespace caf
|
||||
{
|
||||
template <>
|
||||
@@ -56,6 +58,22 @@ void RicExportCompletionDataSettingsUi::TransScalingWBHPSource::setUp()
|
||||
}
|
||||
} // namespace caf
|
||||
|
||||
namespace
|
||||
{
|
||||
// Pin the Python StrEnum class names for the export settings used by RimEclipseCase_exportCompletions
|
||||
struct RegisterScriptEnumNames
|
||||
{
|
||||
RegisterScriptEnumNames()
|
||||
{
|
||||
caf::PdmScriptEnumNameRegistry::registerName<RicExportCompletionDataSettingsUi::ExportSplit>( "CompletionExportSplit" );
|
||||
caf::PdmScriptEnumNameRegistry::registerName<RicExportCompletionDataSettingsUi::CompdatExport>( "CompdatExportType" );
|
||||
caf::PdmScriptEnumNameRegistry::registerName<RicExportFractureCompletionsImpl::PressureDepletionWBHPSource>(
|
||||
"TransScalingWbhpSource" );
|
||||
}
|
||||
};
|
||||
const RegisterScriptEnumNames s_registerScriptEnumNames;
|
||||
} // namespace
|
||||
|
||||
CAF_PDM_SOURCE_INIT( RicExportCompletionDataSettingsUi, "RicExportCompletionDataSettingsUi" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user