#1025 Removed unsused code and renamed to isWellPipe/SpheresVisible

This commit is contained in:
Magne Sjaastad
2016-12-14 07:15:44 +01:00
parent f7437438d1
commit 860b51931c
8 changed files with 114 additions and 148 deletions

View File

@@ -148,106 +148,6 @@ caf::PdmFieldHandle* RimEclipseWell::objectToggleField()
return &showWell;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimEclipseWell::calculateWellPipeVisibility(size_t frameIndex)
{
if (m_reservoirView == NULL) return false;
if (this->wellResults() == NULL) return false;
if (frameIndex >= this->wellResults()->m_resultTimeStepIndexToWellTimeStepIndex.size())
{
return false;
}
size_t wellTimeStepIndex = this->wellResults()->m_resultTimeStepIndexToWellTimeStepIndex[frameIndex];
if (wellTimeStepIndex == cvf::UNDEFINED_SIZE_T)
{
return false;
}
if (!m_reservoirView->wellCollection()->isActive())
return false;
if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimEclipseWellCollection::PIPES_FORCE_ALL_ON)
return true;
if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimEclipseWellCollection::PIPES_FORCE_ALL_OFF)
return false;
if ( this->showWell() == false )
return false;
if ( this->showWellPipes() == false )
return false;
if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimEclipseWellCollection::PIPES_INDIVIDUALLY)
return true;
if (m_reservoirView->crossSectionCollection()->hasActiveIntersectionForSimulationWell(this))
return true;
if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimEclipseWellCollection::PIPES_OPEN_IN_VISIBLE_CELLS)
{
return visibleCellsInstersectsWell(frameIndex);
}
CVF_ASSERT(false); // Never end here. have you added new pipe visibility modes ?
return false;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimEclipseWell::calculateWellSphereVisibility(size_t frameIndex)
{
if (m_reservoirView == NULL) return false;
if (this->wellResults() == NULL) return false;
if (frameIndex >= this->wellResults()->m_resultTimeStepIndexToWellTimeStepIndex.size())
{
return false;
}
size_t wellTimeStepIndex = this->wellResults()->m_resultTimeStepIndexToWellTimeStepIndex[frameIndex];
if (wellTimeStepIndex == cvf::UNDEFINED_SIZE_T)
{
return false;
}
if (!m_reservoirView->wellCollection()->isActive())
return false;
if (m_reservoirView->wellCollection()->wellSphereVisibility() == RimEclipseWellCollection::PIPES_FORCE_ALL_ON)
return true;
if (m_reservoirView->wellCollection()->wellSphereVisibility() == RimEclipseWellCollection::PIPES_FORCE_ALL_OFF)
return false;
if (this->showWell() == false)
return false;
if (this->showWellSpheres() == false)
return false;
if (m_reservoirView->wellCollection()->wellSphereVisibility() == RimEclipseWellCollection::PIPES_INDIVIDUALLY)
return true;
if (m_reservoirView->crossSectionCollection()->hasActiveIntersectionForSimulationWell(this))
return true;
if (m_reservoirView->wellCollection()->wellSphereVisibility() == RimEclipseWellCollection::PIPES_OPEN_IN_VISIBLE_CELLS)
{
return visibleCellsInstersectsWell(frameIndex);
}
CVF_ASSERT(false); // Never end here. have you added new pipe visibility modes ?
return false;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -326,7 +226,99 @@ void RimEclipseWell::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
//--------------------------------------------------------------------------------------------------
bool RimEclipseWell::isWellPipeVisible(size_t frameIndex)
{
return calculateWellPipeVisibility(frameIndex);
if (m_reservoirView == NULL) return false;
if (this->wellResults() == NULL) return false;
if (frameIndex >= this->wellResults()->m_resultTimeStepIndexToWellTimeStepIndex.size())
{
return false;
}
size_t wellTimeStepIndex = this->wellResults()->m_resultTimeStepIndexToWellTimeStepIndex[frameIndex];
if (wellTimeStepIndex == cvf::UNDEFINED_SIZE_T)
{
return false;
}
if (!m_reservoirView->wellCollection()->isActive())
return false;
if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimEclipseWellCollection::PIPES_FORCE_ALL_ON)
return true;
if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimEclipseWellCollection::PIPES_FORCE_ALL_OFF)
return false;
if (this->showWell() == false)
return false;
if (this->showWellPipes() == false)
return false;
if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimEclipseWellCollection::PIPES_INDIVIDUALLY)
return true;
if (m_reservoirView->crossSectionCollection()->hasActiveIntersectionForSimulationWell(this))
return true;
if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimEclipseWellCollection::PIPES_OPEN_IN_VISIBLE_CELLS)
{
return visibleCellsInstersectsWell(frameIndex);
}
CVF_ASSERT(false); // Never end here. have you added new pipe visibility modes ?
return false;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimEclipseWell::isWellSpheresVisible(size_t frameIndex)
{
if (m_reservoirView == NULL) return false;
if (this->wellResults() == NULL) return false;
if (frameIndex >= this->wellResults()->m_resultTimeStepIndexToWellTimeStepIndex.size())
{
return false;
}
size_t wellTimeStepIndex = this->wellResults()->m_resultTimeStepIndexToWellTimeStepIndex[frameIndex];
if (wellTimeStepIndex == cvf::UNDEFINED_SIZE_T)
{
return false;
}
if (!m_reservoirView->wellCollection()->isActive())
return false;
if (m_reservoirView->wellCollection()->wellSphereVisibility() == RimEclipseWellCollection::PIPES_FORCE_ALL_ON)
return true;
if (m_reservoirView->wellCollection()->wellSphereVisibility() == RimEclipseWellCollection::PIPES_FORCE_ALL_OFF)
return false;
if (this->showWell() == false)
return false;
if (this->showWellSpheres() == false)
return false;
if (m_reservoirView->wellCollection()->wellSphereVisibility() == RimEclipseWellCollection::PIPES_INDIVIDUALLY)
return true;
if (m_reservoirView->crossSectionCollection()->hasActiveIntersectionForSimulationWell(this))
return true;
if (m_reservoirView->wellCollection()->wellSphereVisibility() == RimEclipseWellCollection::PIPES_OPEN_IN_VISIBLE_CELLS)
{
return visibleCellsInstersectsWell(frameIndex);
}
CVF_ASSERT(false); // Never end here. have you added new pipe visibility modes ?
return false;
}
//--------------------------------------------------------------------------------------------------