mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-30 09:00:20 -05:00
#14667 Completions: Move MSW settings to segments
This commit is contained in:
1 parent
cfb9e5765e
commit
63bcc22485
46 files changed
+1635
-1008
No files matched your search
@@ -39,10 +39,10 @@
|
||||
#include "RimFishbonesCollection.h"
|
||||
#include "RimImportedWellLog.h"
|
||||
#include "RimMainPlotCollection.h"
|
||||
#include "RimMswCompletionParameters.h"
|
||||
#include "RimOsduWellLog.h"
|
||||
#include "RimPerforationCollection.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimSegmentCollection.h"
|
||||
#include "RimStimPlanModelCollection.h"
|
||||
#include "RimValveCollection.h"
|
||||
#include "RimWellEventTimeline.h"
|
||||
@@ -334,35 +334,27 @@ RimWellPathCompletionSettings* RimWellPath::completionSettings()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimMswCompletionParameters* RimWellPath::mswCompletionParameters()
|
||||
RimSegmentCollection* RimWellPath::segmentCollection()
|
||||
{
|
||||
auto params = m_completionSettings->mswCompletionParameters();
|
||||
if ( !isTopLevelWellPath() )
|
||||
auto* collection = m_completions->segmentCollection();
|
||||
if ( const auto* topLevelWell = topLevelWellPath(); topLevelWell && topLevelWell != this )
|
||||
{
|
||||
auto topMsw = topLevelWellPath()->mswCompletionParameters();
|
||||
|
||||
// Propagate most settings from top level well into lateral parameters
|
||||
params->updateFromTopLevelWell( topMsw );
|
||||
collection->updateFromTopLevelWell( topLevelWell->segmentCollection() );
|
||||
}
|
||||
|
||||
return params;
|
||||
return collection;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RimMswCompletionParameters* RimWellPath::mswCompletionParameters() const
|
||||
const RimSegmentCollection* RimWellPath::segmentCollection() const
|
||||
{
|
||||
auto params = m_completionSettings->mswCompletionParameters();
|
||||
if ( !isTopLevelWellPath() )
|
||||
auto* collection = m_completions->segmentCollection();
|
||||
if ( const auto* topLevelWell = topLevelWellPath(); topLevelWell && topLevelWell != this )
|
||||
{
|
||||
auto topMsw = topLevelWellPath()->mswCompletionParameters();
|
||||
|
||||
// Propagate most settings from top level well into lateral parameters
|
||||
params->updateFromTopLevelWell( topMsw );
|
||||
collection->updateFromTopLevelWell( topLevelWell->segmentCollection() );
|
||||
}
|
||||
|
||||
return params;
|
||||
return collection;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -557,6 +549,8 @@ void RimWellPath::initAfterRead()
|
||||
m_completionSettings->setWellNameForExport( name() );
|
||||
}
|
||||
}
|
||||
|
||||
m_completions->segmentCollection()->importLegacyData( m_completionSettings->mswCompletionParameters() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -785,9 +779,10 @@ void RimWellPath::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering,
|
||||
uiTreeOrdering.add( m_wellIASettingsCollection() );
|
||||
}
|
||||
|
||||
if ( m_completionSettings() && !allCompletionsRecursively().empty() )
|
||||
if ( m_completionSettings() && ( !allCompletionsRecursively().empty() || m_completions->segmentCollection()->hasIntervals() ) )
|
||||
{
|
||||
uiTreeOrdering.add( m_completionSettings() );
|
||||
uiTreeOrdering.add( m_completions->segmentCollection() );
|
||||
}
|
||||
if ( m_completions->valveCollection()->hasValves() )
|
||||
{
|
||||
@@ -886,10 +881,10 @@ void RimWellPath::setUnitSystem( RiaDefines::EclipseUnitSystem unitSystem )
|
||||
|
||||
m_completions->setUnitSystemSpecificDefaults();
|
||||
|
||||
std::vector<RimMswCompletionParameters*> mswParameters = descendantsOfType<RimMswCompletionParameters>();
|
||||
for ( auto mswParams : mswParameters )
|
||||
std::vector<RimSegmentCollection*> segmentCollections = descendantsOfType<RimSegmentCollection>();
|
||||
for ( auto* segmentCollection : segmentCollections )
|
||||
{
|
||||
mswParams->setUnitSystemSpecificDefaults();
|
||||
segmentCollection->setUnitSystemSpecificDefaults();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ class RimWellPathFractureCollection;
|
||||
class Rim3dWellLogCurve;
|
||||
class Rim3dWellLogCurveCollection;
|
||||
class RimWellPathTieIn;
|
||||
class RimMswCompletionParameters;
|
||||
class RimSegmentCollection;
|
||||
class RimWellIASettingsCollection;
|
||||
class RimWellLogFile;
|
||||
class RimWellLog;
|
||||
@@ -128,8 +128,8 @@ public:
|
||||
const RimWellPathCompletions* completions() const;
|
||||
const RimWellPathCompletionSettings* completionSettings() const;
|
||||
RimWellPathCompletionSettings* completionSettings();
|
||||
RimMswCompletionParameters* mswCompletionParameters();
|
||||
const RimMswCompletionParameters* mswCompletionParameters() const;
|
||||
RimSegmentCollection* segmentCollection();
|
||||
const RimSegmentCollection* segmentCollection() const;
|
||||
|
||||
RimFishbonesCollection* fishbonesCollection();
|
||||
const RimFishbonesCollection* fishbonesCollection() const;
|
||||
|
||||
Reference in new issue
Block a user