mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-08 23:23:01 -06:00
#1451 Add data structures for perforation intervals
This commit is contained in:
parent
e3e35bcc3c
commit
d3bcc1644c
@ -16,6 +16,8 @@ ${CEE_CURRENT_LIST_DIR}RimCellRangeFilterCollection.h
|
||||
${CEE_CURRENT_LIST_DIR}RimDefines.h
|
||||
${CEE_CURRENT_LIST_DIR}RimLegendConfig.h
|
||||
${CEE_CURRENT_LIST_DIR}RimOilField.h
|
||||
${CEE_CURRENT_LIST_DIR}RimPerforationCollection.h
|
||||
${CEE_CURRENT_LIST_DIR}RimPerforationInterval.h
|
||||
${CEE_CURRENT_LIST_DIR}RimProject.h
|
||||
${CEE_CURRENT_LIST_DIR}RimEclipseCase.h
|
||||
${CEE_CURRENT_LIST_DIR}RimIdenticalGridCaseGroup.h
|
||||
@ -106,6 +108,8 @@ ${CEE_CURRENT_LIST_DIR}RimCellRangeFilterCollection.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimDefines.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimLegendConfig.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimOilField.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimPerforationCollection.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimPerforationInterval.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimProject.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimEclipseCase.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimIdenticalGridCaseGroup.cpp
|
||||
|
@ -0,0 +1,85 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2015- Statoil ASA
|
||||
// Copyright (C) 2015- Ceetron Solutions AS
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimPerforationCollection.h"
|
||||
|
||||
#include "RimEclipseWell.h"
|
||||
#include "RimPerforationInterval.h"
|
||||
#include "RimView.h"
|
||||
#include "RimProject.h"
|
||||
|
||||
#include "RigWellPath.h"
|
||||
|
||||
#include "RifWellPathImporter.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimPerforationCollection, "PerforationCollection");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimPerforationCollection::RimPerforationCollection()
|
||||
{
|
||||
CAF_PDM_InitObject("Perforations", ":/Folder.png", "", "");
|
||||
|
||||
m_name.uiCapability()->setUiHidden(true);
|
||||
m_name = "Perforations";
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_perforations, "Perforations", "Perforations", "", "", "");
|
||||
m_perforations.uiCapability()->setUiHidden(true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimPerforationCollection::~RimPerforationCollection()
|
||||
{
|
||||
m_perforations.deleteAllChildObjects();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPerforationCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfTypeAsserted(proj);
|
||||
proj->createDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPerforationCollection::appendPerforation(RimPerforationInterval* perforation)
|
||||
{
|
||||
m_perforations.push_back(perforation);
|
||||
|
||||
updateConnectedEditors();
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(perforation);
|
||||
|
||||
RimView* rimView = NULL;
|
||||
firstAncestorOrThisOfType(rimView);
|
||||
if (rimView)
|
||||
{
|
||||
rimView->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
|
48
ApplicationCode/ProjectDataModel/RimPerforationCollection.h
Normal file
48
ApplicationCode/ProjectDataModel/RimPerforationCollection.h
Normal file
@ -0,0 +1,48 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2015- Statoil ASA
|
||||
// Copyright (C) 2015- Ceetron Solutions AS
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RimCheckableNamedObject.h"
|
||||
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmChildArrayField.h"
|
||||
#include "cafPdmField.h"
|
||||
|
||||
class RimPerforationInterval;
|
||||
|
||||
//==================================================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==================================================================================================
|
||||
class RimPerforationCollection : public RimCheckableNamedObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
RimPerforationCollection();
|
||||
~RimPerforationCollection();
|
||||
|
||||
void appendPerforation(RimPerforationInterval* perforation);
|
||||
|
||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
||||
|
||||
caf::PdmChildArrayField<RimPerforationInterval*> m_perforations;
|
||||
};
|
72
ApplicationCode/ProjectDataModel/RimPerforationInterval.cpp
Normal file
72
ApplicationCode/ProjectDataModel/RimPerforationInterval.cpp
Normal file
@ -0,0 +1,72 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2011- Statoil ASA
|
||||
// Copyright (C) 2013- Ceetron Solutions AS
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimPerforationInterval.h"
|
||||
|
||||
#include "RimProject.h"
|
||||
|
||||
#include "cafPdmUiListEditor.h"
|
||||
#include "cafPdmUiTextEditor.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimPerforationInterval, "Perforation");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimPerforationInterval::RimPerforationInterval()
|
||||
{
|
||||
CAF_PDM_InitObject("Perforation", ":/Default.png", "", "");
|
||||
m_name = "Perforation";
|
||||
CAF_PDM_InitField(&m_startMD, "StartMeasuredDepth", 0.0, "Start MD [m]", "", "", "");
|
||||
CAF_PDM_InitField(&m_endMD, "EndMeasuredDepth", 0.0, "End MD [m]", "", "", "");
|
||||
CAF_PDM_InitField(&m_radius, "Radius", 0.0, "Radius [m]", "", "", "");
|
||||
CAF_PDM_InitField(&m_skinFactor, "SkinFactor", 0.0, "Skin Factor", "", "", "");
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimPerforationInterval::~RimPerforationInterval()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPerforationInterval::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfType(proj);
|
||||
if (proj) proj->createDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPerforationInterval::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
{
|
||||
uiOrdering.add(&m_name);
|
||||
|
||||
uiOrdering.add(&m_startMD);
|
||||
uiOrdering.add(&m_endMD);
|
||||
uiOrdering.add(&m_radius);
|
||||
uiOrdering.add(&m_skinFactor);
|
||||
}
|
||||
|
47
ApplicationCode/ProjectDataModel/RimPerforationInterval.h
Normal file
47
ApplicationCode/ProjectDataModel/RimPerforationInterval.h
Normal file
@ -0,0 +1,47 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2011- Statoil ASA
|
||||
// Copyright (C) 2013- Ceetron Solutions AS
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RimCheckableNamedObject.h"
|
||||
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimPerforationInterval : public RimCheckableNamedObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
public:
|
||||
|
||||
RimPerforationInterval();
|
||||
virtual ~RimPerforationInterval();
|
||||
|
||||
virtual void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
virtual void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
|
||||
private:
|
||||
caf::PdmField< double > m_startMD;
|
||||
caf::PdmField< double > m_endMD;
|
||||
caf::PdmField< double > m_radius;
|
||||
caf::PdmField< double > m_skinFactor;
|
||||
};
|
@ -31,6 +31,7 @@
|
||||
#include "RimWellLogPlotCollection.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
#include "RimWellPathCompletionCollection.h"
|
||||
#include "RimPerforationCollection.h"
|
||||
|
||||
#include "RimFishbonesMultipleSubs.h"
|
||||
|
||||
@ -105,6 +106,10 @@ RimWellPath::RimWellPath()
|
||||
CAF_PDM_InitFieldNoDefault(&m_completionCollection, "Completions", "Completions", "", "", "");
|
||||
m_completionCollection = new RimWellPathCompletionCollection;
|
||||
m_completionCollection.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_perforationCollection, "Perforations", "Perforations", "", "", "");
|
||||
m_perforationCollection = new RimPerforationCollection;
|
||||
m_perforationCollection.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_wellLogFile, "WellLogFile", "Well Log File", "", "", "");
|
||||
m_wellLogFile.uiCapability()->setUiHidden(true);
|
||||
@ -288,6 +293,10 @@ void RimWellPath::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, Q
|
||||
{
|
||||
uiTreeOrdering.add(&m_completionCollection);
|
||||
}
|
||||
if (!m_perforationCollection->m_perforations.empty())
|
||||
{
|
||||
uiTreeOrdering.add(&m_perforationCollection);
|
||||
}
|
||||
uiTreeOrdering.add(&fishbonesSubs);
|
||||
}
|
||||
|
||||
|
@ -40,6 +40,7 @@ class RimWellPathCompletionCollection;
|
||||
class RivWellPathPartMgr;
|
||||
|
||||
class RimFishbonesMultipleSubs;
|
||||
class RimPerforationCollection;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
@ -73,6 +74,7 @@ public:
|
||||
|
||||
caf::PdmChildField<RimWellLogFile*> m_wellLogFile;
|
||||
caf::PdmChildField<RimWellPathCompletionCollection*> m_completionCollection;
|
||||
caf::PdmChildField<RimPerforationCollection*> m_perforationCollection;
|
||||
|
||||
RigWellPath* wellPathGeometry();
|
||||
caf::PdmChildArrayField<RimFishbonesMultipleSubs*> fishbonesSubs;
|
||||
|
Loading…
Reference in New Issue
Block a user