#2483 Refactoring : Simplify generation of well branch geometry (1)

This commit is contained in:
Magne Sjaastad
2018-03-02 13:54:42 +01:00
parent e39105503b
commit 7bd0bdc612
6 changed files with 32 additions and 53 deletions

View File

@@ -87,23 +87,10 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
{
std::vector<RigCompletionData> completionData;
std::vector< std::vector <cvf::Vec3d> > pipeBranchesCLCoords;
std::vector< std::vector <RigWellResultPoint> > pipeBranchesCellIds;
RimEclipseView* view = nullptr;
well->firstAncestorOrThisOfTypeAsserted(view);
size_t timeStep = view->currentTimeStep();
auto branches = well->wellPipeBranches();
well->calculateWellPipeDynamicCenterLine(timeStep, pipeBranchesCLCoords, pipeBranchesCellIds);
for (size_t branchIndex = 0; branchIndex < pipeBranchesCLCoords.size(); ++branchIndex)
for (size_t branchIndex = 0; branchIndex < branches.size(); ++branchIndex)
{
RigSimulationWellCoordsAndMD coordsAndMD(pipeBranchesCLCoords[branchIndex]);
RigWellPath wellPathGeometry;
wellPathGeometry.m_wellPathPoints = coordsAndMD.wellPathPoints();
wellPathGeometry.m_measuredDepths = coordsAndMD.measuredDepths();
std::vector<RimFracture*> fractures;
for (RimSimWellFracture* fracture : well->simwellFractureCollection->simwellFractures())
{
@@ -113,7 +100,7 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
}
}
std::vector<RigCompletionData> branchCompletions = generateCompdatValues(eclipseCase, well->name(), &wellPathGeometry, fractures, outputStreamForIntermediateResultsText);
std::vector<RigCompletionData> branchCompletions = generateCompdatValues(eclipseCase, well->name(), branches[branchIndex], fractures, outputStreamForIntermediateResultsText);
completionData.insert(completionData.end(), branchCompletions.begin(), branchCompletions.end());
}