#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

@@ -153,6 +153,25 @@ caf::PdmFieldHandle* RimSimWellInView::objectToggleField()
return &showWell;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<const RigWellPath*> RimSimWellInView::wellPipeBranches() const
{
RimSimWellInViewCollection* simWellCollection = nullptr;
this->firstAncestorOrThisOfTypeAsserted(simWellCollection);
RimEclipseCase* eclipseCase = nullptr;
this->firstAncestorOrThisOfTypeAsserted(eclipseCase);
RigEclipseCaseData* caseData = eclipseCase->eclipseCaseData();
CVF_ASSERT(caseData);
bool includeCellCenters = this->isUsingCellCenterForPipe();
bool detectBrances = simWellCollection->isAutoDetectingBranches;
return caseData->simulationWellBranches(this->name(), includeCellCenters, detectBrances);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -164,19 +183,6 @@ void RimSimWellInView::calculateWellPipeStaticCenterLine(std::vector<std::vector
pipeBranchesCellIds);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSimWellInView::calculateWellPipeDynamicCenterLine(size_t timeStepIdx,
std::vector<std::vector<cvf::Vec3d>>& pipeBranchesCLCoords,
std::vector<std::vector<RigWellResultPoint>>& pipeBranchesCellIds) const
{
RigSimulationWellCenterLineCalculator::calculateWellPipeDynamicCenterline(this,
static_cast<int>(timeStepIdx),
pipeBranchesCLCoords,
pipeBranchesCellIds);
}
//--------------------------------------------------------------------------------------------------
/// frameIndex = -1 will use the static well frame
//--------------------------------------------------------------------------------------------------