mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7727 Performance : Reduce amount of work
Use objectsWithReferringPtrFields to find tieIn wells Avoid using descendantsOfType
This commit is contained in:
@@ -84,7 +84,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::vector<RimWellPath*>& topLevelWellPaths,
|
||||
void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::vector<RimWellPath*>& wellPaths,
|
||||
const std::vector<RimSimWellInView*>& simWells,
|
||||
const RicExportCompletionDataSettingsUi& exportSettings )
|
||||
{
|
||||
@@ -142,21 +142,21 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
|
||||
std::vector<RigCompletionData> completions;
|
||||
|
||||
{
|
||||
caf::ProgressInfo progress( topLevelWellPaths.size(), "Extracting Completion Data For Well Paths" );
|
||||
caf::ProgressInfo progress( wellPaths.size(), "Extracting Completion Data For Well Paths" );
|
||||
|
||||
for ( RimWellPath* topLevelWellPath : topLevelWellPaths )
|
||||
for ( RimWellPath* wellPath : wellPaths )
|
||||
{
|
||||
std::vector<RimWellPath*> allWellPathLaterals;
|
||||
if ( topLevelWellPath->unitSystem() == exportSettings.caseToApply->eclipseCaseData()->unitsType() )
|
||||
if ( wellPath->unitSystem() == exportSettings.caseToApply->eclipseCaseData()->unitsType() )
|
||||
{
|
||||
allWellPathLaterals = topLevelWellPath->wellPathLateralsRecursively();
|
||||
allWellPathLaterals = wellPath->allWellPathLaterals();
|
||||
}
|
||||
else
|
||||
{
|
||||
int caseId = exportSettings.caseToApply->caseId();
|
||||
QString format = QString(
|
||||
"Unit systems for well path \"%1\" must match unit system of chosen eclipse case \"%2\"" );
|
||||
QString errMsg = format.arg( topLevelWellPath->name() ).arg( caseId );
|
||||
QString errMsg = format.arg( wellPath->name() ).arg( caseId );
|
||||
RiaLogging::error( errMsg );
|
||||
}
|
||||
|
||||
@@ -165,15 +165,15 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
|
||||
std::map<size_t, std::vector<RigCompletionData>> completionsPerEclipseCellFracture;
|
||||
std::map<size_t, std::vector<RigCompletionData>> completionsPerEclipseCellPerforations;
|
||||
|
||||
for ( auto wellPath : allWellPathLaterals )
|
||||
for ( auto wellPathLateral : allWellPathLaterals )
|
||||
{
|
||||
// Generate completion data
|
||||
|
||||
if ( exportSettings.includePerforations )
|
||||
{
|
||||
std::vector<RigCompletionData> perforationCompletionData =
|
||||
generatePerforationsCompdatValues( wellPath,
|
||||
wellPath->perforationIntervalCollection()->perforations(),
|
||||
generatePerforationsCompdatValues( wellPathLateral,
|
||||
wellPathLateral->perforationIntervalCollection()->perforations(),
|
||||
exportSettings );
|
||||
|
||||
appendCompletionData( &completionsPerEclipseCellAllCompletionTypes, perforationCompletionData );
|
||||
@@ -184,7 +184,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
|
||||
{
|
||||
std::vector<RigCompletionData> fishbonesCompletionData =
|
||||
RicFishbonesTransmissibilityCalculationFeatureImp::
|
||||
generateFishboneCompdatValuesUsingAdjustedCellVolume( wellPath, exportSettings );
|
||||
generateFishboneCompdatValuesUsingAdjustedCellVolume( wellPathLateral, exportSettings );
|
||||
|
||||
appendCompletionData( &completionsPerEclipseCellAllCompletionTypes, fishbonesCompletionData );
|
||||
appendCompletionData( &completionsPerEclipseCellFishbones, fishbonesCompletionData );
|
||||
@@ -196,7 +196,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
|
||||
std::vector<RicWellPathFractureReportItem>* reportItems = &fractureDataReportItems;
|
||||
|
||||
std::vector<RigCompletionData> fractureCompletionData = RicExportFractureCompletionsImpl::
|
||||
generateCompdatValuesForWellPath( wellPath,
|
||||
generateCompdatValuesForWellPath( wellPathLateral,
|
||||
exportSettings.caseToApply(),
|
||||
reportItems,
|
||||
fractureTransmissibilityExportInformationStream.get(),
|
||||
@@ -281,7 +281,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
|
||||
}
|
||||
else if ( exportSettings.fileSplit == RicExportCompletionDataSettingsUi::ExportSplit::SPLIT_ON_WELL )
|
||||
{
|
||||
for ( auto wellPath : topLevelWellPaths )
|
||||
for ( auto wellPath : wellPaths )
|
||||
{
|
||||
std::vector<RigCompletionData> completionsForWell;
|
||||
for ( const auto& completion : completions )
|
||||
@@ -324,7 +324,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
|
||||
|
||||
for ( const auto& completionType : completionTypes )
|
||||
{
|
||||
for ( auto wellPath : topLevelWellPaths )
|
||||
for ( auto wellPath : wellPaths )
|
||||
{
|
||||
std::vector<RigCompletionData> completionsForWell;
|
||||
for ( const auto& completion : completions )
|
||||
@@ -408,7 +408,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
|
||||
|
||||
if ( exportSettings.includeMsw )
|
||||
{
|
||||
RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions( exportSettings, topLevelWellPaths );
|
||||
RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions( exportSettings, wellPaths );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user