mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1037 - pre-proto - added classes RimSimWellFracture and RimSimWellFractureCollection, and functions for creating new / deleting.
This commit is contained in:
parent
b0968a2534
commit
e6ef4fee42
@ -44,6 +44,7 @@ ${CEE_CURRENT_LIST_DIR}RicNewWellPathCollFractureFeature.h
|
|||||||
${CEE_CURRENT_LIST_DIR}RicNewWellPathCollFractureAtPosFeature.h
|
${CEE_CURRENT_LIST_DIR}RicNewWellPathCollFractureAtPosFeature.h
|
||||||
${CEE_CURRENT_LIST_DIR}RicFractureDefinitionsDeleteAllFeature.h
|
${CEE_CURRENT_LIST_DIR}RicFractureDefinitionsDeleteAllFeature.h
|
||||||
${CEE_CURRENT_LIST_DIR}RicFracturesDeleteAllFeature.h
|
${CEE_CURRENT_LIST_DIR}RicFracturesDeleteAllFeature.h
|
||||||
|
${CEE_CURRENT_LIST_DIR}RicSimWellFracturesDeleteAllFeature.h
|
||||||
|
|
||||||
|
|
||||||
# General delete of any object in a child array field
|
# General delete of any object in a child array field
|
||||||
@ -92,6 +93,7 @@ ${CEE_CURRENT_LIST_DIR}RicNewWellPathCollFractureFeature.cpp
|
|||||||
${CEE_CURRENT_LIST_DIR}RicNewWellPathCollFractureAtPosFeature.cpp
|
${CEE_CURRENT_LIST_DIR}RicNewWellPathCollFractureAtPosFeature.cpp
|
||||||
${CEE_CURRENT_LIST_DIR}RicFractureDefinitionsDeleteAllFeature.cpp
|
${CEE_CURRENT_LIST_DIR}RicFractureDefinitionsDeleteAllFeature.cpp
|
||||||
${CEE_CURRENT_LIST_DIR}RicFracturesDeleteAllFeature.cpp
|
${CEE_CURRENT_LIST_DIR}RicFracturesDeleteAllFeature.cpp
|
||||||
|
${CEE_CURRENT_LIST_DIR}RicSimWellFracturesDeleteAllFeature.cpp
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -44,6 +44,8 @@
|
|||||||
#include "RimGeoMechPropertyFilter.h"
|
#include "RimGeoMechPropertyFilter.h"
|
||||||
#include "RimViewController.h"
|
#include "RimViewController.h"
|
||||||
#include "RimWellLogCurve.h"
|
#include "RimWellLogCurve.h"
|
||||||
|
#include "RimSimWellFracture.h"
|
||||||
|
#include "RimSimWellFractureCollection.h"
|
||||||
#include "RimSummaryCurve.h"
|
#include "RimSummaryCurve.h"
|
||||||
#include "RimSummaryCurveFilter.h"
|
#include "RimSummaryCurveFilter.h"
|
||||||
#include "RimIntersection.h"
|
#include "RimIntersection.h"
|
||||||
@ -78,6 +80,9 @@ bool isDeletable(PdmUiItem * uiItem)
|
|||||||
if (dynamic_cast<RimFractureCollection*>(uiItem)) return true;
|
if (dynamic_cast<RimFractureCollection*>(uiItem)) return true;
|
||||||
if (dynamic_cast<RimFracture*>(uiItem)) return true;
|
if (dynamic_cast<RimFracture*>(uiItem)) return true;
|
||||||
if (dynamic_cast<RimFractureDefinition*>(uiItem)) return true;
|
if (dynamic_cast<RimFractureDefinition*>(uiItem)) return true;
|
||||||
|
if (dynamic_cast<RimSimWellFractureCollection*>(uiItem)) return true;
|
||||||
|
if (dynamic_cast<RimSimWellFracture*>(uiItem)) return true;
|
||||||
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
|
|
||||||
#include "RimCase.h"
|
#include "RimCase.h"
|
||||||
#include "RimEclipseWell.h"
|
#include "RimEclipseWell.h"
|
||||||
#include "RimFracture.h"
|
#include "RimSimWellFracture.h"
|
||||||
#include "RimFractureCollection.h"
|
#include "RimSimWellFractureCollection.h"
|
||||||
#include "RimProject.h"
|
#include "RimProject.h"
|
||||||
|
|
||||||
#include "cafSelectionManager.h"
|
#include "cafSelectionManager.h"
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
|
|
||||||
#include "RimCase.h"
|
#include "RimCase.h"
|
||||||
#include "RimEclipseWell.h"
|
#include "RimEclipseWell.h"
|
||||||
#include "RimFracture.h"
|
#include "RimSimWellFracture.h"
|
||||||
#include "RimFractureCollection.h"
|
#include "RimSimWellFractureCollection.h"
|
||||||
#include "RimProject.h"
|
#include "RimProject.h"
|
||||||
|
|
||||||
#include "cafSelectionManager.h"
|
#include "cafSelectionManager.h"
|
||||||
@ -49,12 +49,12 @@ void RicNewSimWellFractureFeature::onActionTriggered(bool isChecked)
|
|||||||
RimEclipseWell* eclipseWell = nullptr;
|
RimEclipseWell* eclipseWell = nullptr;
|
||||||
objHandle->firstAncestorOrThisOfType(eclipseWell);
|
objHandle->firstAncestorOrThisOfType(eclipseWell);
|
||||||
|
|
||||||
RimFractureCollection* fractureCollection = nullptr;
|
RimSimWellFractureCollection* fractureCollection = nullptr;
|
||||||
objHandle->firstAncestorOrThisOfType(fractureCollection);
|
objHandle->firstAncestorOrThisOfType(fractureCollection);
|
||||||
CVF_ASSERT(fractureCollection);
|
CVF_ASSERT(fractureCollection);
|
||||||
|
|
||||||
RimFracture* fracture = new RimFracture();
|
RimSimWellFracture* fracture = new RimSimWellFracture();
|
||||||
fractureCollection->fractures.push_back(fracture);
|
fractureCollection->simwellFractures.push_back(fracture);
|
||||||
|
|
||||||
fracture->name = "New Simulation Well Fracture";
|
fracture->name = "New Simulation Well Fracture";
|
||||||
|
|
||||||
|
@ -0,0 +1,76 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// 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 "RicSimWellFracturesDeleteAllFeature.h"
|
||||||
|
|
||||||
|
#include "RimSimWellFractureCollection.h"
|
||||||
|
|
||||||
|
#include "cafSelectionManager.h"
|
||||||
|
|
||||||
|
#include <QAction>
|
||||||
|
|
||||||
|
namespace caf
|
||||||
|
{
|
||||||
|
|
||||||
|
CAF_CMD_SOURCE_INIT(RicSimWellFracturesDeleteAllFeature, "RicSimWellFracturesDeleteAllFeature");
|
||||||
|
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RicSimWellFracturesDeleteAllFeature::isCommandEnabled()
|
||||||
|
{
|
||||||
|
std::vector<RimSimWellFractureCollection*> objects;
|
||||||
|
caf::SelectionManager::instance()->objectsByType(&objects);
|
||||||
|
|
||||||
|
if (objects.size() == 1)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RicSimWellFracturesDeleteAllFeature::onActionTriggered(bool isChecked)
|
||||||
|
{
|
||||||
|
std::vector<RimSimWellFractureCollection*> objects;
|
||||||
|
caf::SelectionManager::instance()->objectsByType(&objects);
|
||||||
|
|
||||||
|
RimSimWellFractureCollection* fractureCollection = nullptr;
|
||||||
|
if (objects.size() > 0)
|
||||||
|
{
|
||||||
|
fractureCollection = objects[0];
|
||||||
|
fractureCollection->deleteFractures();
|
||||||
|
fractureCollection->uiCapability()->updateConnectedEditors();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RicSimWellFracturesDeleteAllFeature::setupActionLook(QAction* actionToSetup)
|
||||||
|
{
|
||||||
|
actionToSetup->setText("Delete All Fractures");
|
||||||
|
actionToSetup->setIcon(QIcon(":/Erase.png"));
|
||||||
|
}
|
||||||
|
|
||||||
|
} // end namespace caf
|
@ -0,0 +1,43 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// 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 "cafCmdFeature.h"
|
||||||
|
|
||||||
|
namespace caf
|
||||||
|
{
|
||||||
|
|
||||||
|
//==================================================================================================
|
||||||
|
///
|
||||||
|
//==================================================================================================
|
||||||
|
class RicSimWellFracturesDeleteAllFeature : public CmdFeature
|
||||||
|
{
|
||||||
|
CAF_CMD_HEADER_INIT;
|
||||||
|
protected:
|
||||||
|
|
||||||
|
// Overrides
|
||||||
|
virtual bool isCommandEnabled();
|
||||||
|
virtual void onActionTriggered( bool isChecked );
|
||||||
|
virtual void setupActionLook( QAction* actionToSetup );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} // end namespace caf
|
@ -87,7 +87,10 @@ ${CEE_CURRENT_LIST_DIR}RimMultiSnapshotDefinition.h
|
|||||||
${CEE_CURRENT_LIST_DIR}RimFractureDefinition.h
|
${CEE_CURRENT_LIST_DIR}RimFractureDefinition.h
|
||||||
${CEE_CURRENT_LIST_DIR}RimFractureDefinitionCollection.h
|
${CEE_CURRENT_LIST_DIR}RimFractureDefinitionCollection.h
|
||||||
${CEE_CURRENT_LIST_DIR}RimFracture.h
|
${CEE_CURRENT_LIST_DIR}RimFracture.h
|
||||||
|
${CEE_CURRENT_LIST_DIR}RimSimWellFracture.h
|
||||||
${CEE_CURRENT_LIST_DIR}RimFractureCollection.h
|
${CEE_CURRENT_LIST_DIR}RimFractureCollection.h
|
||||||
|
${CEE_CURRENT_LIST_DIR}RimSimWellFractureCollection.h
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set (SOURCE_GROUP_SOURCE_FILES
|
set (SOURCE_GROUP_SOURCE_FILES
|
||||||
@ -173,7 +176,9 @@ ${CEE_CURRENT_LIST_DIR}RimMultiSnapshotDefinition.cpp
|
|||||||
${CEE_CURRENT_LIST_DIR}RimFractureDefinition.cpp
|
${CEE_CURRENT_LIST_DIR}RimFractureDefinition.cpp
|
||||||
${CEE_CURRENT_LIST_DIR}RimFractureDefinitionCollection.cpp
|
${CEE_CURRENT_LIST_DIR}RimFractureDefinitionCollection.cpp
|
||||||
${CEE_CURRENT_LIST_DIR}RimFracture.cpp
|
${CEE_CURRENT_LIST_DIR}RimFracture.cpp
|
||||||
|
${CEE_CURRENT_LIST_DIR}RimSimWellFracture.cpp
|
||||||
${CEE_CURRENT_LIST_DIR}RimFractureCollection.cpp
|
${CEE_CURRENT_LIST_DIR}RimFractureCollection.cpp
|
||||||
|
${CEE_CURRENT_LIST_DIR}RimSimWellFractureCollection.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND CODE_HEADER_FILES
|
list(APPEND CODE_HEADER_FILES
|
||||||
|
@ -48,6 +48,8 @@
|
|||||||
#include "RimGeoMechView.h"
|
#include "RimGeoMechView.h"
|
||||||
#include "RimIdenticalGridCaseGroup.h"
|
#include "RimIdenticalGridCaseGroup.h"
|
||||||
#include "RimIntersectionBox.h"
|
#include "RimIntersectionBox.h"
|
||||||
|
#include "RimSimWellFracture.h"
|
||||||
|
#include "RimSimWellFractureCollection.h"
|
||||||
#include "RimScriptCollection.h"
|
#include "RimScriptCollection.h"
|
||||||
#include "RimSummaryCase.h"
|
#include "RimSummaryCase.h"
|
||||||
#include "RimSummaryCurve.h"
|
#include "RimSummaryCurve.h"
|
||||||
@ -363,6 +365,12 @@ QStringList RimContextCommandBuilder::commandsFromSelection()
|
|||||||
commandIds << "RicNewWellPathCollFractureFeature";
|
commandIds << "RicNewWellPathCollFractureFeature";
|
||||||
commandIds << "RicFracturesDeleteAllFeature";
|
commandIds << "RicFracturesDeleteAllFeature";
|
||||||
}
|
}
|
||||||
|
else if (dynamic_cast<RimSimWellFractureCollection*>(uiItem) ||
|
||||||
|
dynamic_cast<RimSimWellFracture*>(uiItem))
|
||||||
|
{
|
||||||
|
commandIds << "RicNewSimWellFractureFeature";
|
||||||
|
commandIds << "RicSimWellFracturesDeleteAllFeature";
|
||||||
|
}
|
||||||
else if (dynamic_cast<RimFractureDefinitionCollection*>(uiItem) ||
|
else if (dynamic_cast<RimFractureDefinitionCollection*>(uiItem) ||
|
||||||
dynamic_cast<RimFractureDefinition*>(uiItem))
|
dynamic_cast<RimFractureDefinition*>(uiItem))
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include "RimIntersectionCollection.h"
|
#include "RimIntersectionCollection.h"
|
||||||
#include "RimEclipseView.h"
|
#include "RimEclipseView.h"
|
||||||
#include "RimEclipseWellCollection.h"
|
#include "RimEclipseWellCollection.h"
|
||||||
#include "RimFractureCollection.h"
|
#include "RimSimWellFractureCollection.h"
|
||||||
|
|
||||||
#include "cvfMath.h"
|
#include "cvfMath.h"
|
||||||
|
|
||||||
@ -49,17 +49,17 @@ RimEclipseWell::RimEclipseWell()
|
|||||||
|
|
||||||
CAF_PDM_InitField(&showWellCells, "ShowWellCells", true, "Add cells to range filter", "", "", "");
|
CAF_PDM_InitField(&showWellCells, "ShowWellCells", true, "Add cells to range filter", "", "", "");
|
||||||
CAF_PDM_InitField(&showWellCellFence, "ShowWellCellFence", false, "Use well fence", "", "", "");
|
CAF_PDM_InitField(&showWellCellFence, "ShowWellCellFence", false, "Use well fence", "", "", "");
|
||||||
CAF_PDM_InitFieldNoDefault(&fractureCollection, "FractureCollection", "Fractures", "", "", "");
|
CAF_PDM_InitFieldNoDefault(&simwellFractureCollection, "FractureCollection", "Fractures", "", "", "");
|
||||||
|
|
||||||
name.uiCapability()->setUiHidden(true);
|
name.uiCapability()->setUiHidden(true);
|
||||||
name.uiCapability()->setUiReadOnly(true);
|
name.uiCapability()->setUiReadOnly(true);
|
||||||
fractureCollection.uiCapability()->setUiHidden(true);
|
simwellFractureCollection.uiCapability()->setUiHidden(true);
|
||||||
|
|
||||||
m_resultWellIndex = cvf::UNDEFINED_SIZE_T;
|
m_resultWellIndex = cvf::UNDEFINED_SIZE_T;
|
||||||
|
|
||||||
m_reservoirView = NULL;
|
m_reservoirView = NULL;
|
||||||
|
|
||||||
fractureCollection = new RimFractureCollection();
|
simwellFractureCollection= new RimSimWellFractureCollection();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -67,7 +67,7 @@ RimEclipseWell::RimEclipseWell()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RimEclipseWell::~RimEclipseWell()
|
RimEclipseWell::~RimEclipseWell()
|
||||||
{
|
{
|
||||||
if (fractureCollection()) delete fractureCollection();
|
if (simwellFractureCollection()) delete simwellFractureCollection();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
#include "cafPdmChildField.h"
|
#include "cafPdmChildField.h"
|
||||||
|
|
||||||
class RimEclipseView;
|
class RimEclipseView;
|
||||||
class RimFractureCollection;
|
class RimSimWellFractureCollection;
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
@ -78,7 +78,7 @@ public:
|
|||||||
caf::PdmField<cvf::Color3f> wellPipeColor;
|
caf::PdmField<cvf::Color3f> wellPipeColor;
|
||||||
caf::PdmField<double> pipeRadiusScaleFactor;
|
caf::PdmField<double> pipeRadiusScaleFactor;
|
||||||
|
|
||||||
caf::PdmChildField<RimFractureCollection*> fractureCollection;
|
caf::PdmChildField<RimSimWellFractureCollection*> simwellFractureCollection;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
112
ApplicationCode/ProjectDataModel/RimSimWellFracture.cpp
Normal file
112
ApplicationCode/ProjectDataModel/RimSimWellFracture.cpp
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) 2016- Statoil ASA
|
||||||
|
//
|
||||||
|
// 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 "RimSimWellFracture.h"
|
||||||
|
|
||||||
|
#include "RiaApplication.h"
|
||||||
|
|
||||||
|
#include "RimFractureDefinition.h"
|
||||||
|
#include "RimFractureDefinitionCollection.h"
|
||||||
|
#include "RimOilField.h"
|
||||||
|
#include "RimProject.h"
|
||||||
|
#include "RimWellPath.h"
|
||||||
|
|
||||||
|
#include "cafPdmFieldHandle.h"
|
||||||
|
#include "cafPdmObject.h"
|
||||||
|
#include "cafPdmUiItem.h"
|
||||||
|
|
||||||
|
#include "QToolBox"
|
||||||
|
#include "QList"
|
||||||
|
#include "cvfVector3.h"
|
||||||
|
|
||||||
|
|
||||||
|
CAF_PDM_SOURCE_INIT(RimSimWellFracture, "SimWellFracture");
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RimSimWellFracture::RimSimWellFracture(void)
|
||||||
|
{
|
||||||
|
CAF_PDM_InitObject("SimWellFracture", "", "", "");
|
||||||
|
|
||||||
|
CAF_PDM_InitField(&name, "UserDescription", QString("Fracture Name"), "Name", "", "", "");
|
||||||
|
|
||||||
|
CAF_PDM_InitField(&i, "I", 1, "Fracture location cell I", "", "", "");
|
||||||
|
CAF_PDM_InitField(&j, "J", 1, "Fracture location cell J", "", "", "");
|
||||||
|
CAF_PDM_InitField(&k, "K", 1, "Fracture location cell K", "", "", "");
|
||||||
|
|
||||||
|
CAF_PDM_InitFieldNoDefault(&fractureDefinition, "FractureDef", "FractureDef", "", "", "");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RimSimWellFracture::~RimSimWellFracture()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QList<caf::PdmOptionItemInfo> RimSimWellFracture::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly)
|
||||||
|
{
|
||||||
|
|
||||||
|
QList<caf::PdmOptionItemInfo> options;
|
||||||
|
|
||||||
|
RimProject* proj = RiaApplication::instance()->project();
|
||||||
|
CVF_ASSERT(proj);
|
||||||
|
|
||||||
|
RimOilField* oilField = proj->activeOilField();
|
||||||
|
if (oilField == nullptr) return options;
|
||||||
|
|
||||||
|
if (fieldNeedingOptions == &fractureDefinition)
|
||||||
|
{
|
||||||
|
|
||||||
|
RimFractureDefinitionCollection* fracDefColl = oilField->fractureDefinitionCollection();
|
||||||
|
if (fracDefColl == nullptr) return options;
|
||||||
|
|
||||||
|
for (RimFractureDefinition* fracDef : fracDefColl->fractureDefinitions())
|
||||||
|
{
|
||||||
|
options.push_back(caf::PdmOptionItemInfo(fracDef->name(), fracDef));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return options;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimSimWellFracture::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||||
|
{
|
||||||
|
uiOrdering.add(&name);
|
||||||
|
|
||||||
|
caf::PdmUiGroup* geometryGroup = uiOrdering.addNewGroup("Fractures");
|
||||||
|
geometryGroup->add(&fractureDefinition);
|
||||||
|
|
||||||
|
geometryGroup->add(&i);
|
||||||
|
geometryGroup->add(&j);
|
||||||
|
geometryGroup->add(&k);
|
||||||
|
|
||||||
|
uiOrdering.setForgetRemainingFields(true);
|
||||||
|
|
||||||
|
}
|
57
ApplicationCode/ProjectDataModel/RimSimWellFracture.h
Normal file
57
ApplicationCode/ProjectDataModel/RimSimWellFracture.h
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) 2016- Statoil ASA
|
||||||
|
//
|
||||||
|
// 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 "cafAppEnum.h"
|
||||||
|
#include "cafPdmField.h"
|
||||||
|
#include "cafPdmObject.h"
|
||||||
|
#include "cafPdmPtrField.h"
|
||||||
|
#include "RimView.h"
|
||||||
|
#include "cvfVector3.h"
|
||||||
|
|
||||||
|
class RimFractureDefinition;
|
||||||
|
|
||||||
|
//==================================================================================================
|
||||||
|
///
|
||||||
|
///
|
||||||
|
//==================================================================================================
|
||||||
|
class RimSimWellFracture : public caf::PdmObject
|
||||||
|
{
|
||||||
|
CAF_PDM_HEADER_INIT;
|
||||||
|
|
||||||
|
public:
|
||||||
|
RimSimWellFracture(void);
|
||||||
|
virtual ~RimSimWellFracture(void);
|
||||||
|
|
||||||
|
caf::PdmField<QString> name;
|
||||||
|
caf::PdmPtrField<RimFractureDefinition* > fractureDefinition;
|
||||||
|
|
||||||
|
caf::PdmField<int> i;
|
||||||
|
caf::PdmField<int> j;
|
||||||
|
caf::PdmField<int> k;
|
||||||
|
|
||||||
|
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
};
|
@ -0,0 +1,57 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) 2016- Statoil ASA
|
||||||
|
//
|
||||||
|
// 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 "RimSimWellFractureCollection.h"
|
||||||
|
|
||||||
|
#include "RimSimWellFracture.h"
|
||||||
|
#include "cafPdmObject.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CAF_PDM_SOURCE_INIT(RimSimWellFractureCollection, "SimWellFractureCollection");
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RimSimWellFractureCollection::RimSimWellFractureCollection(void)
|
||||||
|
{
|
||||||
|
CAF_PDM_InitObject("Fracture Collection", "", "", "");
|
||||||
|
|
||||||
|
CAF_PDM_InitField(&isActive, "Active", true, "Active", "", "", "");
|
||||||
|
|
||||||
|
CAF_PDM_InitFieldNoDefault(&simwellFractures, "Fractures", "", "", "", "");
|
||||||
|
simwellFractures.uiCapability()->setUiHidden(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RimSimWellFractureCollection::~RimSimWellFractureCollection()
|
||||||
|
{
|
||||||
|
simwellFractures.deleteAllChildObjects();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimSimWellFractureCollection::deleteFractures()
|
||||||
|
{
|
||||||
|
simwellFractures.deleteAllChildObjects();
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) 2016- Statoil ASA
|
||||||
|
//
|
||||||
|
// 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 "cafPdmField.h"
|
||||||
|
#include "cafPdmObject.h"
|
||||||
|
#include "cafPdmChildArrayField.h"
|
||||||
|
|
||||||
|
class RimSimWellFracture;
|
||||||
|
|
||||||
|
//==================================================================================================
|
||||||
|
///
|
||||||
|
///
|
||||||
|
//==================================================================================================
|
||||||
|
class RimSimWellFractureCollection : public caf::PdmObject
|
||||||
|
{
|
||||||
|
CAF_PDM_HEADER_INIT;
|
||||||
|
|
||||||
|
public:
|
||||||
|
RimSimWellFractureCollection(void);
|
||||||
|
virtual ~RimSimWellFractureCollection(void);
|
||||||
|
|
||||||
|
caf::PdmChildArrayField<RimSimWellFracture*> simwellFractures;
|
||||||
|
caf::PdmField<bool> isActive;
|
||||||
|
|
||||||
|
void deleteFractures();
|
||||||
|
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user