#14241 MSW: Drop redundant FromGeometry suffix from branch builders

With the legacy tree-based path removed there is only one MSW branch construction approach, so the FromGeometry suffix is no longer needed. Rename buildMainBoreBranchFromGeometry, buildValveBranchesFromGeometry, buildFractureBranchesFromGeometry and buildFishbonesBranchesFromGeometry accordingly, and update the architecture diagrams.
This commit is contained in:
Magne Sjaastad committed 2026-06-19 12:50:14 +02:00
1 parent 3e0d2e22ff
commit 3c5c160b93
5 files changed
+197 -202

No files matched your search

@@ -134,24 +134,24 @@ int findOutletSegmentForMD( const std::vector<CellSegmentEntry>& cellSegMap, dou
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigMswBranch buildMainBoreBranchFromGeometry( const RimWellPath* wellPath,
const std::vector<WellPathCellIntersectionInfo>& filteredIntersections,
const RigMainGrid* mainGrid,
const RimEclipseCase* eclipseCase,
const std::vector<const RimPerforationInterval*>& perforationIntervals,
const std::set<const RimPerforationInterval*>& valvedIntervals,
const std::string& infoType,
double heelMD,
double heelTVD,
int branchNumber,
int& segmentNumber,
int outletSegmentNumber,
double maxSegmentLength,
const std::vector<std::pair<double, double>>& customSegmentIntervals,
const std::optional<QDateTime>& exportDate,
RiaDefines::EclipseUnitSystem unitSystem,
std::vector<CellSegmentEntry>* cellSegMap,
const RigActiveCellInfo* activeCellInfo )
RigMswBranch buildMainBoreBranch( const RimWellPath* wellPath,
const std::vector<WellPathCellIntersectionInfo>& filteredIntersections,
const RigMainGrid* mainGrid,
const RimEclipseCase* eclipseCase,
const std::vector<const RimPerforationInterval*>& perforationIntervals,
const std::set<const RimPerforationInterval*>& valvedIntervals,
const std::string& infoType,
double heelMD,
double heelTVD,
int branchNumber,
int& segmentNumber,
int outletSegmentNumber,
double maxSegmentLength,
const std::vector<std::pair<double, double>>& customSegmentIntervals,
const std::optional<QDateTime>& exportDate,
RiaDefines::EclipseUnitSystem unitSystem,
std::vector<CellSegmentEntry>* cellSegMap,
const RigActiveCellInfo* activeCellInfo )
{
std::vector<RigMswSegment> result;
@@ -297,20 +297,20 @@ RigMswBranch buildMainBoreBranchFromGeometry( const RimWellPath*
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RigMswBranch> buildValveBranchesFromGeometry( const RimWellPath* wellPath,
const std::vector<WellPathCellIntersectionInfo>& filteredIntersections,
const RigMainGrid* mainGrid,
const RimEclipseCase* eclipseCase,
const std::vector<const RimPerforationInterval*>& perforationIntervals,
const std::vector<CellSegmentEntry>& cellSegMap,
const std::string& infoType,
const std::string& wellNameForExport,
int& segmentNumber,
int& branchNumber,
double maxSegmentLength,
const std::vector<std::pair<double, double>>& customSegmentIntervals,
const std::optional<QDateTime>& exportDate,
RiaDefines::EclipseUnitSystem unitSystem )
std::vector<RigMswBranch> buildValveBranches( const RimWellPath* wellPath,
const std::vector<WellPathCellIntersectionInfo>& filteredIntersections,
const RigMainGrid* mainGrid,
const RimEclipseCase* eclipseCase,
const std::vector<const RimPerforationInterval*>& perforationIntervals,
const std::vector<CellSegmentEntry>& cellSegMap,
const std::string& infoType,
const std::string& wellNameForExport,
int& segmentNumber,
int& branchNumber,
double maxSegmentLength,
const std::vector<std::pair<double, double>>& customSegmentIntervals,
const std::optional<QDateTime>& exportDate,
RiaDefines::EclipseUnitSystem unitSystem )
{
std::vector<RigMswBranch> result;
@@ -588,13 +588,13 @@ std::vector<RigMswBranch> buildValveBranchesFromGeometry( const RimWellPath*
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RigMswBranch> buildFractureBranchesFromGeometry( RimEclipseCase* eclipseCase,
const RimWellPath* wellPath,
const RigMainGrid* mainGrid,
const std::vector<CellSegmentEntry>& cellSegMap,
const std::string& infoType,
int& segmentNumber,
int& branchNumber )
std::vector<RigMswBranch> buildFractureBranches( RimEclipseCase* eclipseCase,
const RimWellPath* wellPath,
const RigMainGrid* mainGrid,
const std::vector<CellSegmentEntry>& cellSegMap,
const std::string& infoType,
int& segmentNumber,
int& branchNumber )
{
std::vector<RigMswBranch> result;
@@ -685,16 +685,16 @@ std::vector<RigMswBranch> buildFractureBranchesFromGeometry( RimEclipseCase*
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RigMswBranch> buildFishbonesBranchesFromGeometry( const RimEclipseCase* eclipseCase,
const RimWellPath* wellPath,
const RigMainGrid* mainGrid,
const std::vector<WellPathCellIntersectionInfo>& filteredIntersections,
const std::vector<CellSegmentEntry>& cellSegMap,
const std::string& infoType,
const std::string& wellNameForExport,
int& segmentNumber,
int& branchNumber,
RiaDefines::EclipseUnitSystem unitSystem )
std::vector<RigMswBranch> buildFishbonesBranches( const RimEclipseCase* eclipseCase,
const RimWellPath* wellPath,
const RigMainGrid* mainGrid,
const std::vector<WellPathCellIntersectionInfo>& filteredIntersections,
const std::vector<CellSegmentEntry>& cellSegMap,
const std::string& infoType,
const std::string& wellNameForExport,
int& segmentNumber,
int& branchNumber,
RiaDefines::EclipseUnitSystem unitSystem )
{
std::vector<RigMswBranch> result;
@@ -76,66 +76,66 @@ int findOutletSegmentForMD( const std::vector<CellSegmentEntry>& cellSegMap, dou
/// For each grid-cell intersection overlapping a bare perforation (no active valve) a COMPSEGS
/// entry is embedded. Optionally fills cellSegMap for later valve outlet-segment lookups.
//--------------------------------------------------------------------------------------------------
RigMswBranch buildMainBoreBranchFromGeometry( const RimWellPath* wellPath,
const std::vector<WellPathCellIntersectionInfo>& filteredIntersections,
const RigMainGrid* mainGrid,
const RimEclipseCase* eclipseCase,
const std::vector<const RimPerforationInterval*>& perforationIntervals,
const std::set<const RimPerforationInterval*>& valvedIntervals,
const std::string& infoType,
double heelMD,
double heelTVD,
int branchNumber,
int& segmentNumber,
int outletSegmentNumber,
double maxSegmentLength,
const std::vector<std::pair<double, double>>& customSegmentIntervals,
const std::optional<QDateTime>& exportDate,
RiaDefines::EclipseUnitSystem unitSystem,
std::vector<CellSegmentEntry>* cellSegMap,
const RigActiveCellInfo* activeCellInfo = nullptr );
RigMswBranch buildMainBoreBranch( const RimWellPath* wellPath,
const std::vector<WellPathCellIntersectionInfo>& filteredIntersections,
const RigMainGrid* mainGrid,
const RimEclipseCase* eclipseCase,
const std::vector<const RimPerforationInterval*>& perforationIntervals,
const std::set<const RimPerforationInterval*>& valvedIntervals,
const std::string& infoType,
double heelMD,
double heelTVD,
int branchNumber,
int& segmentNumber,
int outletSegmentNumber,
double maxSegmentLength,
const std::vector<std::pair<double, double>>& customSegmentIntervals,
const std::optional<QDateTime>& exportDate,
RiaDefines::EclipseUnitSystem unitSystem,
std::vector<CellSegmentEntry>* cellSegMap,
const RigActiveCellInfo* activeCellInfo = nullptr );
//--------------------------------------------------------------------------------------------------
/// Build WELSEGS + COMPSEGS segments for ICD/ICV/AICD/SICD valve completions.
//--------------------------------------------------------------------------------------------------
std::vector<RigMswBranch> buildValveBranchesFromGeometry( const RimWellPath* wellPath,
const std::vector<WellPathCellIntersectionInfo>& filteredIntersections,
const RigMainGrid* mainGrid,
const RimEclipseCase* eclipseCase,
const std::vector<const RimPerforationInterval*>& perforationIntervals,
const std::vector<CellSegmentEntry>& cellSegMap,
const std::string& infoType,
const std::string& wellNameForExport,
int& segmentNumber,
int& branchNumber,
double maxSegmentLength,
const std::vector<std::pair<double, double>>& customSegmentIntervals,
const std::optional<QDateTime>& exportDate,
RiaDefines::EclipseUnitSystem unitSystem );
std::vector<RigMswBranch> buildValveBranches( const RimWellPath* wellPath,
const std::vector<WellPathCellIntersectionInfo>& filteredIntersections,
const RigMainGrid* mainGrid,
const RimEclipseCase* eclipseCase,
const std::vector<const RimPerforationInterval*>& perforationIntervals,
const std::vector<CellSegmentEntry>& cellSegMap,
const std::string& infoType,
const std::string& wellNameForExport,
int& segmentNumber,
int& branchNumber,
double maxSegmentLength,
const std::vector<std::pair<double, double>>& customSegmentIntervals,
const std::optional<QDateTime>& exportDate,
RiaDefines::EclipseUnitSystem unitSystem );
//--------------------------------------------------------------------------------------------------
/// Build WELSEGS + COMPSEGS segments for fracture completions.
//--------------------------------------------------------------------------------------------------
std::vector<RigMswBranch> buildFractureBranchesFromGeometry( RimEclipseCase* eclipseCase,
const RimWellPath* wellPath,
const RigMainGrid* mainGrid,
const std::vector<CellSegmentEntry>& cellSegMap,
const std::string& infoType,
int& segmentNumber,
int& branchNumber );
std::vector<RigMswBranch> buildFractureBranches( RimEclipseCase* eclipseCase,
const RimWellPath* wellPath,
const RigMainGrid* mainGrid,
const std::vector<CellSegmentEntry>& cellSegMap,
const std::string& infoType,
int& segmentNumber,
int& branchNumber );
//--------------------------------------------------------------------------------------------------
/// Build WELSEGS + COMPSEGS + WSEGVALV segments for fishbones completions.
//--------------------------------------------------------------------------------------------------
std::vector<RigMswBranch> buildFishbonesBranchesFromGeometry( const RimEclipseCase* eclipseCase,
const RimWellPath* wellPath,
const RigMainGrid* mainGrid,
const std::vector<WellPathCellIntersectionInfo>& filteredIntersections,
const std::vector<CellSegmentEntry>& cellSegMap,
const std::string& infoType,
const std::string& wellNameForExport,
int& segmentNumber,
int& branchNumber,
RiaDefines::EclipseUnitSystem unitSystem );
std::vector<RigMswBranch> buildFishbonesBranches( const RimEclipseCase* eclipseCase,
const RimWellPath* wellPath,
const RigMainGrid* mainGrid,
const std::vector<WellPathCellIntersectionInfo>& filteredIntersections,
const std::vector<CellSegmentEntry>& cellSegMap,
const std::string& infoType,
const std::string& wellNameForExport,
int& segmentNumber,
int& branchNumber,
RiaDefines::EclipseUnitSystem unitSystem );
} // namespace RicMswBranchBuilder
@@ -155,24 +155,24 @@ std::vector<RigMswBranch> buildLateralBranches( RimEclipseCase*
const RigActiveCellInfo* activeCellInfo = eclipseCase->eclipseCaseData()->activeCellInfo( RiaDefines::PorosityModelType::MATRIX_MODEL );
auto lateralBranch = RicMswBranchBuilder::buildMainBoreBranchFromGeometry( wellPath,
filteredIntersections,
mainGrid,
eclipseCase,
perforationIntervals,
valvedIntervals,
infoType,
tieInMD,
tieInTVD,
lateralBranchNum,
segmentNumber,
childOutletSeg,
mswParameters->maxSegmentLength(),
{},
exportDate,
unitSystem,
&childCellSegMap,
activeCellInfo );
auto lateralBranch = RicMswBranchBuilder::buildMainBoreBranch( wellPath,
filteredIntersections,
mainGrid,
eclipseCase,
perforationIntervals,
valvedIntervals,
infoType,
tieInMD,
tieInTVD,
lateralBranchNum,
segmentNumber,
childOutletSeg,
mswParameters->maxSegmentLength(),
{},
exportDate,
unitSystem,
&childCellSegMap,
activeCellInfo );
if ( tieInValve && !lateralBranch.segments.empty() ) lateralBranch.segments.front().description.clear();
lateralBranch.tieInValve = std::move( tieInValve );
@@ -201,46 +201,41 @@ std::vector<RigMswBranch> buildLateralBranches( RimEclipseCase*
result.push_back( std::move( lateralBranch ) );
auto valveBranches = RicMswBranchBuilder::buildValveBranchesFromGeometry( wellPath,
filteredIntersections,
mainGrid,
eclipseCase,
perforationIntervals,
childCellSegMap,
infoType,
wellNameForExport,
segmentNumber,
branchNumber,
mswParameters->maxSegmentLength(),
{},
exportDate,
unitSystem );
auto valveBranches = RicMswBranchBuilder::buildValveBranches( wellPath,
filteredIntersections,
mainGrid,
eclipseCase,
perforationIntervals,
childCellSegMap,
infoType,
wellNameForExport,
segmentNumber,
branchNumber,
mswParameters->maxSegmentLength(),
{},
exportDate,
unitSystem );
result.insert( result.end(), std::make_move_iterator( valveBranches.begin() ), std::make_move_iterator( valveBranches.end() ) );
if ( ( completionType & CompletionType::FRACTURES ) == CompletionType::FRACTURES )
{
auto fracBranches = RicMswBranchBuilder::buildFractureBranchesFromGeometry( eclipseCase,
wellPath,
mainGrid,
childCellSegMap,
infoType,
segmentNumber,
branchNumber );
auto fracBranches =
RicMswBranchBuilder::buildFractureBranches( eclipseCase, wellPath, mainGrid, childCellSegMap, infoType, segmentNumber, branchNumber );
result.insert( result.end(), std::make_move_iterator( fracBranches.begin() ), std::make_move_iterator( fracBranches.end() ) );
}
if ( ( completionType & CompletionType::FISHBONES ) == CompletionType::FISHBONES )
{
auto fishBranches = RicMswBranchBuilder::buildFishbonesBranchesFromGeometry( eclipseCase,
wellPath,
mainGrid,
filteredIntersections,
childCellSegMap,
infoType,
wellNameForExport,
segmentNumber,
branchNumber,
unitSystem );
auto fishBranches = RicMswBranchBuilder::buildFishbonesBranches( eclipseCase,
wellPath,
mainGrid,
filteredIntersections,
childCellSegMap,
infoType,
wellNameForExport,
segmentNumber,
branchNumber,
unitSystem );
result.insert( result.end(), std::make_move_iterator( fishBranches.begin() ), std::make_move_iterator( fishBranches.end() ) );
}
@@ -321,24 +316,24 @@ RigMswWellExportData buildMswWellExportData( RimEclipseCase*
const RigActiveCellInfo* activeCellInfo = eclipseCase->eclipseCaseData()->activeCellInfo( RiaDefines::PorosityModelType::MATRIX_MODEL );
auto mainBoreBranch = RicMswBranchBuilder::buildMainBoreBranchFromGeometry( wellPath,
filteredIntersections,
mainGrid,
eclipseCase,
perforationIntervals,
valvedIntervals,
infoType,
initialMD,
initialTVD,
branchNumber,
segmentNumber,
1, // outlet = heel (segment 1)
maxSegmentLength,
customSegmentIntervals,
exportDate,
unitSystem,
&cellSegMap,
activeCellInfo );
auto mainBoreBranch = RicMswBranchBuilder::buildMainBoreBranch( wellPath,
filteredIntersections,
mainGrid,
eclipseCase,
perforationIntervals,
valvedIntervals,
infoType,
initialMD,
initialTVD,
branchNumber,
segmentNumber,
1, // outlet = heel (segment 1)
maxSegmentLength,
customSegmentIntervals,
exportDate,
unitSystem,
&cellSegMap,
activeCellInfo );
const std::string wellNameForExport = wellPath->completionSettings()->wellNameForExport().toStdString();
@@ -365,43 +360,43 @@ RigMswWellExportData buildMswWellExportData( RimEclipseCase*
}
}
auto valveBranches = RicMswBranchBuilder::buildValveBranchesFromGeometry( wellPath,
filteredIntersections,
mainGrid,
eclipseCase,
perforationIntervals,
cellSegMap,
infoType,
wellNameForExport,
segmentNumber,
branchNumber,
maxSegmentLength,
customSegmentIntervals,
exportDate,
unitSystem );
auto valveBranches = RicMswBranchBuilder::buildValveBranches( wellPath,
filteredIntersections,
mainGrid,
eclipseCase,
perforationIntervals,
cellSegMap,
infoType,
wellNameForExport,
segmentNumber,
branchNumber,
maxSegmentLength,
customSegmentIntervals,
exportDate,
unitSystem );
const bool includeFractures = ( completionType & CompletionType::FRACTURES ) == CompletionType::FRACTURES;
std::vector<RigMswBranch> fractureBranches;
if ( includeFractures )
{
fractureBranches =
RicMswBranchBuilder::buildFractureBranchesFromGeometry( eclipseCase, wellPath, mainGrid, cellSegMap, infoType, segmentNumber, branchNumber );
RicMswBranchBuilder::buildFractureBranches( eclipseCase, wellPath, mainGrid, cellSegMap, infoType, segmentNumber, branchNumber );
}
const bool includeFishbones = ( completionType & CompletionType::FISHBONES ) == CompletionType::FISHBONES;
std::vector<RigMswBranch> fishbonesBranches;
if ( includeFishbones )
{
fishbonesBranches = RicMswBranchBuilder::buildFishbonesBranchesFromGeometry( eclipseCase,
wellPath,
mainGrid,
filteredIntersections,
cellSegMap,
infoType,
wellNameForExport,
segmentNumber,
branchNumber,
unitSystem );
fishbonesBranches = RicMswBranchBuilder::buildFishbonesBranches( eclipseCase,
wellPath,
mainGrid,
filteredIntersections,
cellSegMap,
infoType,
wellNameForExport,
segmentNumber,
branchNumber,
unitSystem );
}
// Tie-in child laterals (recursive)