mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Renamed class RimWellCollection to RimEclipseWellCollection
This commit is contained in:
@@ -103,7 +103,7 @@ void RivReservoirPipesPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasic
|
||||
{
|
||||
if (!m_reservoirView->wellCollection()->isActive()) return;
|
||||
|
||||
if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimWellCollection::PIPES_FORCE_ALL_OFF) return;
|
||||
if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimEclipseWellCollection::PIPES_FORCE_ALL_OFF) return;
|
||||
|
||||
if (m_reservoirView->wellCollection()->wells.size() != m_wellPipesPartMgrs.size())
|
||||
{
|
||||
|
||||
@@ -113,7 +113,7 @@ void RivWellHeadPartMgr::buildWellHeadParts(size_t frameIndex)
|
||||
// Compute well head based on the z position of the top of the K column the well head is part of
|
||||
cvf::Vec3d whEndPos = whStartPos;
|
||||
|
||||
if (m_rimReservoirView->wellCollection()->wellHeadPosition() == RimWellCollection::WELLHEAD_POS_TOP_COLUMN)
|
||||
if (m_rimReservoirView->wellCollection()->wellHeadPosition() == RimEclipseWellCollection::WELLHEAD_POS_TOP_COLUMN)
|
||||
{
|
||||
// Position well head at top active cell of IJ-column
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ RimEclipseView::RimEclipseView()
|
||||
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&wellCollection, "WellCollection", "Simulation Wells", "", "", "");
|
||||
wellCollection = new RimWellCollection;
|
||||
wellCollection = new RimEclipseWellCollection;
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&faultCollection, "FaultCollection", "Faults", "", "", "");
|
||||
faultCollection = new RimFaultCollection;
|
||||
@@ -1131,7 +1131,7 @@ void RimEclipseView::calculateVisibleWellCellsIncFence(cvf::UByteArray* visibleC
|
||||
visibleCells->setAll(false);
|
||||
|
||||
// If all wells are forced off, return
|
||||
if (this->wellCollection()->wellCellsToRangeFilterMode() == RimWellCollection::RANGE_ADD_NONE) return;
|
||||
if (this->wellCollection()->wellCellsToRangeFilterMode() == RimEclipseWellCollection::RANGE_ADD_NONE) return;
|
||||
|
||||
RigActiveCellInfo* activeCellInfo = this->currentActiveCellInfo();
|
||||
|
||||
@@ -1141,7 +1141,7 @@ void RimEclipseView::calculateVisibleWellCellsIncFence(cvf::UByteArray* visibleC
|
||||
for (size_t wIdx = 0; wIdx < this->wellCollection()->wells().size(); ++wIdx)
|
||||
{
|
||||
RimEclipseWell* well = this->wellCollection()->wells()[wIdx];
|
||||
if (this->wellCollection()->wellCellsToRangeFilterMode() == RimWellCollection::RANGE_ADD_ALL || (well->showWell() && well->showWellCells()) )
|
||||
if (this->wellCollection()->wellCellsToRangeFilterMode() == RimEclipseWellCollection::RANGE_ADD_ALL || (well->showWell() && well->showWellCells()) )
|
||||
{
|
||||
RigSingleWellResultsData* wres = well->wellResults();
|
||||
if (!wres) continue;
|
||||
@@ -1191,17 +1191,17 @@ void RimEclipseView::calculateVisibleWellCellsIncFence(cvf::UByteArray* visibleC
|
||||
size_t cellCountFenceDirection = 0;
|
||||
size_t fIdx = 0;
|
||||
|
||||
if (this->wellCollection()->wellCellFenceType == RimWellCollection::K_DIRECTION)
|
||||
if (this->wellCollection()->wellCellFenceType == RimEclipseWellCollection::K_DIRECTION)
|
||||
{
|
||||
cellCountFenceDirection = grid->cellCountK();
|
||||
pK = &fIdx;
|
||||
}
|
||||
else if (this->wellCollection()->wellCellFenceType == RimWellCollection::J_DIRECTION)
|
||||
else if (this->wellCollection()->wellCellFenceType == RimEclipseWellCollection::J_DIRECTION)
|
||||
{
|
||||
cellCountFenceDirection = grid->cellCountJ();
|
||||
pJ = &fIdx;
|
||||
}
|
||||
else if (this->wellCollection()->wellCellFenceType == RimWellCollection::I_DIRECTION)
|
||||
else if (this->wellCollection()->wellCellFenceType == RimEclipseWellCollection::I_DIRECTION)
|
||||
{
|
||||
cellCountFenceDirection = grid->cellCountI();
|
||||
pI = &fIdx;
|
||||
|
||||
@@ -51,7 +51,7 @@ class RimEclipseFaultColors;
|
||||
class RimReservoirCellResultsStorage;
|
||||
class RimReservoirCellResultsStorage;
|
||||
class RimEclipseCellColors;
|
||||
class RimWellCollection;
|
||||
class RimEclipseWellCollection;
|
||||
class RiuViewer;
|
||||
class RivReservoirPipesPartMgr;
|
||||
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
|
||||
caf::PdmField<RimEclipsePropertyFilterCollection*> propertyFilterCollection;
|
||||
|
||||
caf::PdmField<RimWellCollection*> wellCollection;
|
||||
caf::PdmField<RimEclipseWellCollection*> wellCollection;
|
||||
caf::PdmField<RimFaultCollection*> faultCollection;
|
||||
|
||||
// Fields
|
||||
|
||||
@@ -165,10 +165,10 @@ bool RimEclipseWell::calculateWellPipeVisibility(size_t frameIndex)
|
||||
if (!m_reservoirView->wellCollection()->isActive())
|
||||
return false;
|
||||
|
||||
if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimWellCollection::PIPES_FORCE_ALL_ON)
|
||||
if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimEclipseWellCollection::PIPES_FORCE_ALL_ON)
|
||||
return true;
|
||||
|
||||
if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimWellCollection::PIPES_FORCE_ALL_OFF)
|
||||
if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimEclipseWellCollection::PIPES_FORCE_ALL_OFF)
|
||||
return false;
|
||||
|
||||
if ( this->showWell() == false )
|
||||
@@ -177,10 +177,10 @@ bool RimEclipseWell::calculateWellPipeVisibility(size_t frameIndex)
|
||||
if ( this->showWellPipes() == false )
|
||||
return false;
|
||||
|
||||
if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimWellCollection::PIPES_INDIVIDUALLY)
|
||||
if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimEclipseWellCollection::PIPES_INDIVIDUALLY)
|
||||
return true;
|
||||
|
||||
if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimWellCollection::PIPES_OPEN_IN_VISIBLE_CELLS)
|
||||
if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimEclipseWellCollection::PIPES_OPEN_IN_VISIBLE_CELLS)
|
||||
{
|
||||
const std::vector<RivCellSetEnum>& visGridParts = m_reservoirView->visibleGridParts();
|
||||
cvf::cref<RivReservoirViewPartMgr> rvMan = m_reservoirView->reservoirGridPartManager();
|
||||
|
||||
@@ -31,12 +31,12 @@
|
||||
namespace caf
|
||||
{
|
||||
template<>
|
||||
void RimWellCollection::WellVisibilityEnum::setUp()
|
||||
void RimEclipseWellCollection::WellVisibilityEnum::setUp()
|
||||
{
|
||||
addItem(RimWellCollection::PIPES_FORCE_ALL_OFF, "FORCE_ALL_OFF", "All Off");
|
||||
addItem(RimWellCollection::PIPES_INDIVIDUALLY, "ALL_ON", "Individual");
|
||||
addItem(RimWellCollection::PIPES_OPEN_IN_VISIBLE_CELLS,"OPEN_IN_VISIBLE_CELLS", "Visible cells filtered");
|
||||
addItem(RimWellCollection::PIPES_FORCE_ALL_ON, "FORCE_ALL_ON", "All On");
|
||||
addItem(RimEclipseWellCollection::PIPES_FORCE_ALL_OFF, "FORCE_ALL_OFF", "All Off");
|
||||
addItem(RimEclipseWellCollection::PIPES_INDIVIDUALLY, "ALL_ON", "Individual");
|
||||
addItem(RimEclipseWellCollection::PIPES_OPEN_IN_VISIBLE_CELLS,"OPEN_IN_VISIBLE_CELLS", "Visible cells filtered");
|
||||
addItem(RimEclipseWellCollection::PIPES_FORCE_ALL_ON, "FORCE_ALL_ON", "All On");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,43 +44,43 @@ namespace caf
|
||||
namespace caf
|
||||
{
|
||||
template<>
|
||||
void RimWellCollection::WellCellsRangeFilterEnum::setUp()
|
||||
void RimEclipseWellCollection::WellCellsRangeFilterEnum::setUp()
|
||||
{
|
||||
addItem(RimWellCollection::RANGE_ADD_NONE, "FORCE_ALL_OFF", "All Off");
|
||||
addItem(RimWellCollection::RANGE_ADD_INDIVIDUAL, "ALL_ON", "Individually");
|
||||
addItem(RimWellCollection::RANGE_ADD_ALL, "FORCE_ALL_ON", "All On");
|
||||
addItem(RimEclipseWellCollection::RANGE_ADD_NONE, "FORCE_ALL_OFF", "All Off");
|
||||
addItem(RimEclipseWellCollection::RANGE_ADD_INDIVIDUAL, "ALL_ON", "Individually");
|
||||
addItem(RimEclipseWellCollection::RANGE_ADD_ALL, "FORCE_ALL_ON", "All On");
|
||||
}
|
||||
}
|
||||
|
||||
namespace caf
|
||||
{
|
||||
template<>
|
||||
void RimWellCollection::WellFenceEnum::setUp()
|
||||
void RimEclipseWellCollection::WellFenceEnum::setUp()
|
||||
{
|
||||
addItem(RimWellCollection::K_DIRECTION, "K_DIRECTION", "K - Direction");
|
||||
addItem(RimWellCollection::J_DIRECTION, "J_DIRECTION", "J - Direction");
|
||||
addItem(RimWellCollection::I_DIRECTION, "I_DIRECTION", "I - Direction");
|
||||
setDefault(RimWellCollection::K_DIRECTION);
|
||||
addItem(RimEclipseWellCollection::K_DIRECTION, "K_DIRECTION", "K - Direction");
|
||||
addItem(RimEclipseWellCollection::J_DIRECTION, "J_DIRECTION", "J - Direction");
|
||||
addItem(RimEclipseWellCollection::I_DIRECTION, "I_DIRECTION", "I - Direction");
|
||||
setDefault(RimEclipseWellCollection::K_DIRECTION);
|
||||
}
|
||||
}
|
||||
|
||||
namespace caf
|
||||
{
|
||||
template<>
|
||||
void RimWellCollection::WellHeadPositionEnum::setUp()
|
||||
void RimEclipseWellCollection::WellHeadPositionEnum::setUp()
|
||||
{
|
||||
addItem(RimWellCollection::WELLHEAD_POS_ACTIVE_CELLS_BB, "WELLHEAD_POS_ACTIVE_CELLS_BB", "Top of active cells BB");
|
||||
addItem(RimWellCollection::WELLHEAD_POS_TOP_COLUMN, "WELLHEAD_POS_TOP_COLUMN", "Top of active cells IJ-column");
|
||||
setDefault(RimWellCollection::WELLHEAD_POS_TOP_COLUMN);
|
||||
addItem(RimEclipseWellCollection::WELLHEAD_POS_ACTIVE_CELLS_BB, "WELLHEAD_POS_ACTIVE_CELLS_BB", "Top of active cells BB");
|
||||
addItem(RimEclipseWellCollection::WELLHEAD_POS_TOP_COLUMN, "WELLHEAD_POS_TOP_COLUMN", "Top of active cells IJ-column");
|
||||
setDefault(RimEclipseWellCollection::WELLHEAD_POS_TOP_COLUMN);
|
||||
}
|
||||
}
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimWellCollection, "Wells");
|
||||
CAF_PDM_SOURCE_INIT(RimEclipseWellCollection, "Wells");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellCollection::RimWellCollection()
|
||||
RimEclipseWellCollection::RimEclipseWellCollection()
|
||||
{
|
||||
CAF_PDM_InitObject("Wells", ":/WellCollection.png", "", "");
|
||||
|
||||
@@ -116,7 +116,7 @@ RimWellCollection::RimWellCollection()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellCollection::~RimWellCollection()
|
||||
RimEclipseWellCollection::~RimEclipseWellCollection()
|
||||
{
|
||||
wells.deleteAllChildObjects();
|
||||
}
|
||||
@@ -124,7 +124,7 @@ RimWellCollection::~RimWellCollection()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEclipseWell* RimWellCollection::findWell(QString name)
|
||||
RimEclipseWell* RimEclipseWellCollection::findWell(QString name)
|
||||
{
|
||||
for (size_t i = 0; i < this->wells().size(); ++i)
|
||||
{
|
||||
@@ -139,7 +139,7 @@ RimEclipseWell* RimWellCollection::findWell(QString name)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimWellCollection::hasVisibleWellCells()
|
||||
bool RimEclipseWellCollection::hasVisibleWellCells()
|
||||
{
|
||||
if (!this->isActive()) return false;
|
||||
if (this->wellCellsToRangeFilterMode() == RANGE_ADD_NONE) return false;
|
||||
@@ -174,7 +174,7 @@ bool RimWellCollection::hasVisibleWellCells()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Used to know if we need animation of timesteps due to the wells
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimWellCollection::hasVisibleWellPipes()
|
||||
bool RimEclipseWellCollection::hasVisibleWellPipes()
|
||||
{
|
||||
if (!this->isActive()) return false;
|
||||
if (this->wellPipeVisibility() == PIPES_FORCE_ALL_OFF) return false;
|
||||
@@ -188,7 +188,7 @@ bool RimWellCollection::hasVisibleWellPipes()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
void RimEclipseWellCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
if (&showWellLabel == changedField || &isActive == changedField)
|
||||
{
|
||||
@@ -257,7 +257,7 @@ void RimWellCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellCollection::setReservoirView(RimEclipseView* ownerReservoirView)
|
||||
void RimEclipseWellCollection::setReservoirView(RimEclipseView* ownerReservoirView)
|
||||
{
|
||||
m_reservoirView = ownerReservoirView;
|
||||
}
|
||||
@@ -265,7 +265,7 @@ void RimWellCollection::setReservoirView(RimEclipseView* ownerReservoirView)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellCollection::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
void RimEclipseWellCollection::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
{
|
||||
caf::PdmUiGroup* filterGroup = uiOrdering.addNewGroup("Well range filter");
|
||||
filterGroup->add(&wellCellsToRangeFilterMode);
|
||||
@@ -291,7 +291,7 @@ void RimWellCollection::defineUiOrdering(QString uiConfigName, caf::PdmUiOrderin
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmFieldHandle* RimWellCollection::objectToggleField()
|
||||
caf::PdmFieldHandle* RimEclipseWellCollection::objectToggleField()
|
||||
{
|
||||
return &isActive;
|
||||
}
|
||||
@@ -300,7 +300,7 @@ caf::PdmFieldHandle* RimWellCollection::objectToggleField()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<cvf::ubyte>& RimWellCollection::isWellPipesVisible(size_t frameIndex)
|
||||
const std::vector<cvf::ubyte>& RimEclipseWellCollection::isWellPipesVisible(size_t frameIndex)
|
||||
{
|
||||
calculateIsWellPipesVisible(frameIndex);
|
||||
return m_isWellPipesVisible[frameIndex];
|
||||
@@ -309,7 +309,7 @@ const std::vector<cvf::ubyte>& RimWellCollection::isWellPipesVisible(size_t fram
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellCollection::scheduleIsWellPipesVisibleRecalculation()
|
||||
void RimEclipseWellCollection::scheduleIsWellPipesVisibleRecalculation()
|
||||
{
|
||||
m_isWellPipesVisible.clear();
|
||||
}
|
||||
@@ -317,7 +317,7 @@ void RimWellCollection::scheduleIsWellPipesVisibleRecalculation()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellCollection::calculateIsWellPipesVisible(size_t frameIndex)
|
||||
void RimEclipseWellCollection::calculateIsWellPipesVisible(size_t frameIndex)
|
||||
{
|
||||
if (m_isWellPipesVisible.size() > frameIndex && m_isWellPipesVisible[frameIndex].size()) return;
|
||||
|
||||
|
||||
@@ -37,13 +37,13 @@ class RimEclipseWell;
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimWellCollection : public caf::PdmObject
|
||||
class RimEclipseWellCollection : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
public:
|
||||
|
||||
RimWellCollection();
|
||||
virtual ~RimWellCollection();
|
||||
RimEclipseWellCollection();
|
||||
virtual ~RimEclipseWellCollection();
|
||||
|
||||
void setReservoirView(RimEclipseView* ownerReservoirView);
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
PIPES_OPEN_IN_VISIBLE_CELLS,
|
||||
PIPES_FORCE_ALL_ON
|
||||
};
|
||||
typedef caf::AppEnum<RimWellCollection::WellVisibilityType> WellVisibilityEnum;
|
||||
typedef caf::AppEnum<RimEclipseWellCollection::WellVisibilityType> WellVisibilityEnum;
|
||||
|
||||
enum WellCellsRangeFilterType
|
||||
{
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
RANGE_ADD_INDIVIDUAL,
|
||||
RANGE_ADD_NONE
|
||||
};
|
||||
typedef caf::AppEnum<RimWellCollection::WellCellsRangeFilterType> WellCellsRangeFilterEnum;
|
||||
typedef caf::AppEnum<RimEclipseWellCollection::WellCellsRangeFilterType> WellCellsRangeFilterEnum;
|
||||
|
||||
enum WellFenceType
|
||||
{
|
||||
@@ -70,14 +70,14 @@ public:
|
||||
J_DIRECTION,
|
||||
I_DIRECTION
|
||||
};
|
||||
typedef caf::AppEnum<RimWellCollection::WellFenceType> WellFenceEnum;
|
||||
typedef caf::AppEnum<RimEclipseWellCollection::WellFenceType> WellFenceEnum;
|
||||
|
||||
enum WellHeadPositionType
|
||||
{
|
||||
WELLHEAD_POS_ACTIVE_CELLS_BB,
|
||||
WELLHEAD_POS_TOP_COLUMN
|
||||
};
|
||||
typedef caf::AppEnum<RimWellCollection::WellHeadPositionType> WellHeadPositionEnum;
|
||||
typedef caf::AppEnum<RimEclipseWellCollection::WellHeadPositionType> WellHeadPositionEnum;
|
||||
|
||||
|
||||
caf::PdmField<bool> showWellLabel;
|
||||
|
||||
@@ -1776,7 +1776,7 @@ void RiuMainWindow::refreshDrawStyleActions()
|
||||
m_toggleFaultsLabelAction->blockSignals(false);
|
||||
|
||||
m_addWellCellsToRangeFilterAction->blockSignals(true);
|
||||
m_addWellCellsToRangeFilterAction->setChecked(eclView->wellCollection()->wellCellsToRangeFilterMode() != RimWellCollection::RANGE_ADD_NONE);
|
||||
m_addWellCellsToRangeFilterAction->setChecked(eclView->wellCollection()->wellCellsToRangeFilterMode() != RimEclipseWellCollection::RANGE_ADD_NONE);
|
||||
m_addWellCellsToRangeFilterAction->blockSignals(false);
|
||||
}
|
||||
}
|
||||
@@ -2072,8 +2072,8 @@ void RiuMainWindow::slotAddWellCellsToRangeFilterAction(bool doAdd)
|
||||
RimEclipseView* riv = dynamic_cast<RimEclipseView*>(RiaApplication::instance()->activeReservoirView());
|
||||
if (riv)
|
||||
{
|
||||
caf::AppEnum<RimWellCollection::WellCellsRangeFilterType> rangeAddType;
|
||||
rangeAddType = doAdd ? RimWellCollection::RANGE_ADD_INDIVIDUAL : RimWellCollection::RANGE_ADD_NONE;
|
||||
caf::AppEnum<RimEclipseWellCollection::WellCellsRangeFilterType> rangeAddType;
|
||||
rangeAddType = doAdd ? RimEclipseWellCollection::RANGE_ADD_INDIVIDUAL : RimEclipseWellCollection::RANGE_ADD_NONE;
|
||||
riv->wellCollection()->wellCellsToRangeFilterMode.setValueFromUi(static_cast<unsigned int>(rangeAddType.index()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user